Bug?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • peter@clgus

    #1

    Bug?

    Hello

    Ive recently found that you cannot type anything over 7 into a number that is preceded with a 0.
    ex:[color=blue][color=green][color=darkred]
    >>> 01[/color][/color][/color]
    1[color=blue][color=green][color=darkred]
    >>> 07[/color][/color][/color]
    7[color=blue][color=green][color=darkred]
    >>> 08[/color][/color][/color]
    SyntaxError: invalid token[color=blue][color=green][color=darkred]
    >>> 011[/color][/color][/color]
    9[color=blue][color=green][color=darkred]
    >>> 017[/color][/color][/color]
    15[color=blue][color=green][color=darkred]
    >>> 077[/color][/color][/color]
    63[color=blue][color=green][color=darkred]
    >>> 078[/color][/color][/color]
    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

  • Artie Gold

    #2
    Re: Bug?

    peter@clgus wrote:[color=blue]
    > Hello
    >
    > Ive recently found that you cannot type anything over 7 into a number that is preceded with a 0.
    > ex:[color=green][color=darkred]
    > >>> 01[/color][/color]
    > 1[color=green][color=darkred]
    > >>> 07[/color][/color]
    > 7[color=green][color=darkred]
    > >>> 08[/color][/color]
    > SyntaxError: invalid token[color=green][color=darkred]
    > >>> 011[/color][/color]
    > 9[color=green][color=darkred]
    > >>> 017[/color][/color]
    > 15[color=green][color=darkred]
    > >>> 077[/color][/color]
    > 63[color=green][color=darkred]
    > >>> 078[/color][/color]
    > 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?
    >[/color]

    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

    Comment

    Working...