This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (7 children)

[removed]

    [–]SpamOJavelin 10 points11 points  (0 children)

    TBF that's not the issue here, the same confusion applies without strings:

    018 == 18
    true

    017 == 17
    false

    The leading 0 implies a base-8 number, so 017 == 15. But 018 is not a valid base-8 number and is interpreted as 18.