Bug?

P

peter@clgus

Hello

Ive recently found that you cannot type anything over 7 into a number that is preceded with a 0.
ex: SyntaxError: invalid token

I know this isnt that big of a problem,
but i cannot think of one reason why they would not allow numbers preceded with a 0 to have a number
higher then a 7 in them...
And it seems very inconsistant to me...

Is there a reason for this?

Thanks
Peter
 
A

Artie Gold

peter@clgus said:
Hello

Ive recently found that you cannot type anything over 7 into a number that is preceded with a 0.
ex:
SyntaxError: invalid token

I know this isnt that big of a problem,
but i cannot think of one reason why they would not allow numbers preceded with a 0 to have a number
higher then a 7 in them...
And it seems very inconsistant to me...

Is there a reason for this?

Yup. ;-)

Numbers beginning with a `0' are in octal (base 8), so only the digits
`0' through `7' are valid.

HTH,
--ag
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,222
Messages
2,571,141
Members
47,756
Latest member
JulienneY0

Latest Threads

Top