Re:Strangest Language Features
by chc on Thursday December 15, 2011 @03:55PM
(#3357917)
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.
[ Parent
| on HN ]
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
It's not. That isn't what happens, either. The parser stops when it sees the 9.