4 ms·
The standard encourages implementations to interpret numbers as decimal, and it doesn't say to interpret non-numbers (such as octal 9, which is what the number
by chc 15y ago
The standard encourages implementations to interpret numbers as decimal, and it doesn't say to interpret non-numbers (such as octal 9, which is what the number would have to be if you were taking "0" as the octal prefix) as 0. I don't see how it's necessary for compliance or even sensible to interpret numbers that don't exist in octal as octal 0, except that it's a quirk older implementations had and new ones don't want to break compatibility.
- gcp 15y agoI don't see how it's necessary for compliance or even sensible to interpret numbers that don't exist in octal as octal 0 It's not. That isn't what happens, either. The parser stops when it sees the 9.