Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: