It seems that the parseInt second argument [, base] that was optional (and maybe default 10) became mandatory for decimal conversion
for exemple
var vtest=parsint('07') //vtest = 7 is ok
var vtest=parseInt('08') // vtest = NaN is Not ok
var vtest=parseInt('08',10) //vtest = 8 is ok
var vtest=parseInt('16') //vtest = 16 is ok
var vtest=parseInt('016') //vtest = 14 is Not ok servoy seems to think that it's an octal value, it why my second line was NaN
Must I conclude that if my string starts with zero servoy think that it’s an octal value?
This behavior is in variance with the current JavaScript spec, which says base 10 should be assumed as the radix unless the string begins with ‘0x’ – however, it is the standard behavior of almost all javascript interpreters.
Firefox (including v3), IE (including v7) will also assume an octal radix if you pass a string starting with “0” to parseInt. So, this isn’t a Servoy issue, it’s a general javascript issue…and is not new, Servoy’s always done this as far as I know.
It’s best just to be explicit and pass the radix when calling parseInt.