- Last post
- 4 Responses
Numbers starting with "0" are parsed as octal numbers (base 8). Just like "0x" are parsed as hex numbers (base 16). the digits "8" and "9" aren't within the octal range (0-7), that's why you get an error with "080" and "090". As already mentioned, convert them to strings and you're set.
Genius - thanks for that response. How on earth did you know that!
I really hate it when something won't work and there appears to be no logic as to why. But you've done the equivalent of explaing to a flat earther why the world is round.
I know that you'll get weird things if you try and put an extra 0 in front of an integer...
but i'd off thought you's get that all the time... make sure that you're parsing a string if it has to have a leading 0
when creating arrays I've tried doing that, just so they all line up correctly... and that broke
try a different character instead of 0??
like "n" for example??
oot yer box, ken?