# expected integer but got "08"

*From*: Tobias Vesterlund <vakuum@xxxxxxxxx>*Date*: Fri, 9 Sep 2011 02:54:35 -0700 (PDT)

Hi!

If you do:

if {07 < 100} {

puts a

}

it works.

But if I do:

if {08 < 100} {

puts a

}

I get: expected integer but got "08"

Why is that?

I can remove the leading 0 with:

proc stripzeros {value} {

regsub ^0+(.+) $value \\1 retval

return $retval

}

But I don't understand why I get an error with 08 but 07 works.

Can someone shed some light on this for me please?

.

**Follow-Ups**:**Re: expected integer but got "08"***From:*Robert Heller

**Re: expected integer but got "08"***From:*Jonathan Bromley

- Prev by Date:
**Re: Off-by-one error in canvas?** - Next by Date:
**Re: expected integer but got "08"** - Previous by thread:
**nonhai cool** - Next by thread:
**Re: expected integer but got "08"** - Index(es):