0
Not a bug

parseInt wrong parse

Francesco Zangara 8 years ago in General updated by Dmitry - support (expert) 8 years ago 1

Project 1.irpz

parseInt function wrong parse "08" and "09" string.

more, the function wrong parse all string that start with "0" (ex.: "010" > 8, "011" > 9, "020" > 16)


I think that this bug is also present on iridium 2

Not a bug

Hello!


var intValue = parseInt(string[, radix])

You need to specify the radix to 10. Since you have a number begins with 0, then the radix is automatically set to 8.


So your script will work with radix = 10.


Project 1 (7).irpz