Re: FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- From: "Michael Haufe (\"TNO\")" <tno@xxxxxxxxxxxxxxxxxxx>
- Date: Sat, 30 Jan 2010 19:16:31 -0800 (PST)
On Jan 30, 8:42 pm, Thomas 'PointedEars' Lahn <PointedE...@xxxxxx>
wrote:
If you had read that more carefully, you would have observed that the exact
wording is:
| 15.1.2.2 parseInt (string , radix)
|
| [...] If radix is undefined or 0, it is assumed to be 10 except when the
| number begins with the character pairs 0x or 0X, in which case a radix of
| 16 is assumed. [...]
Regardless, at this point ES5 only asks for a side note there, if that.
My comment was specifically aimed towards octal. I over-quoted the
relevant portion paragraph by including the hexadecimal portion along
with it.
.
- Follow-Ups:
- Re: FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- From: Thomas 'PointedEars' Lahn
- Re: FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- References:
- FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- From: FAQ server
- Re: FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- From: Michael Haufe (\"TNO\")
- Re: FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- From: Thomas 'PointedEars' Lahn
- FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- Prev by Date: Re: FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- Next by Date: Re: FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- Previous by thread: Re: FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- Next by thread: Re: FAQ Topic - Why does K = parseInt('09') set K to 0? (2010-01-31)
- Index(es):