This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
No, it hasn't. If you write "long string" it has a length of 11; your comment about length = 60 is mistaken. You will need to check the lengths of your keys carefully; they are probably not 60. If you are actually getting -6 then (q + s1 + s2 + s3) must be a negative amount.
Avi Sridhar
Ranch Hand
Joined: May 31, 2007
Posts: 42
posted
0
Originally posted by Campbell Ritchie: No, it hasn't. If you write "long string" it has a length of 11; your comment about length = 60 is mistaken. You will need to check the lengths of your keys carefully; they are probably not 60. If you are actually getting -6 then (q + s1 + s2 + s3) must be a negative amount.
thanks for the reply. I ment to say that "a long string" , as an example.... and that string has a length of 60. The Short and long strings both of lengths of 60 too...
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32833
4
posted
0
In which case you might be calling substring(3, 1). You can't have the first number larger than the second number. Read this.
Avi Sridhar
Ranch Hand
Joined: May 31, 2007
Posts: 42
posted
0
Originally posted by Campbell Ritchie: In which case you might be calling substring(3, 1). You can't have the first number larger than the second number. Read this.
Thanks for the information. I just happened to fix that.