By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,931 Members | 2,015 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,931 IT Pros & Developers. It's quick & easy.

Bug?

P: n/a
Hello

Ive recently found that you cannot type anything over 7 into a number that is preceded with a 0.
ex:
01 1 07 7 08 SyntaxError: invalid token 011 9 017 15 077 63 078

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

--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.2 - Release Date: 3/11/2005

Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
peter@clgus wrote:
Hello

Ive recently found that you cannot type anything over 7 into a number that is preceded with a 0.
ex:
>>> 01 1 >>> 07 7 >>> 08 SyntaxError: invalid token >>> 011 9 >>> 017 15 >>> 077 63 >>> 078

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

--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.