I am having trouble in Tcl using numbers with leading zeros. I am parsing some numbers that can have leading zeros, such as "0012", which should be interpreted as the integer "twelve".
$ tclsh
% set a 8
8
% set b 08
08
% expr $a - 1
7
% expr $b - 1
expected integer but got "08" (looks like invalid octal number)
What is the best way to handle numbers that might have a leading zeros in Tcl?
On a side note, what would constitute a valid octal number in Tcl, if "08" is an invalid one?