Darthfett
Aerospace/Cybersecurity Software Engineer
- Reaction score
- 615
Totally by accident I've found a new bug now, "--X" returns true when X > 0, same with "+-X".
Whoops. I updated the functions with an inner-loop check (which should only get evaluated a maximum of two times). Unfortunately, I can't simply skip the first character now, as if there are exactly two signs, it would return true unless I checked every single character, which would dismantle the algorithm. Instead, I'll simply check if there's a sign, and if it's the first character.
Sure, but i think the difference between using SubStringBJ and SubString is totally negligible comparing the use of SubString by itself though.
I mean cutting the string would be much more slower than this difference between the BJ and the native.
This is true, and it's the reason why I used the algorithm of checking the string in slices of 8. If I had any problems using the SubString function, I might use the BJ, but I don't. It starts at 0 like an array, and I understand it.
I think that 'sublen' is unneeded, i mean you can simply use 'i' instead.
That's what I was doing before the last update, but if a string was not a multiple of 8 in length, it would cause the function to try to evaluate 8 characters even if there were only 2 remaining. 'sublen' puts a limiter on the length of each substr.
Also i don't like this idea of cutting string, why not simply the whole string ?
[ljass]S2I("123456789123456789") == 2147483647[/ljass]
When you get large numbers that are longer than 8 (sometimes 9), it causes problems.
If you consider a string which have a length > 1 , that makes IsLetter as a no sense because of the existent of IsLetters
*sigh* fine!