Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-21
02:58 • Ticket [218263ffff] expr parse failure on 08 and 09 status still Closed with... artifact: d0a6a19dce user: dgp
2000-10-26
08:17 • Closed ticket [218263ffff]. artifact: 3f93dc2146 user: welch
00:55 • New ticket [218263ffff]. artifact: c923378916 user: nobody

expr parse failure on 08 and 09

Closed / Invalid218263ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:55:13
OriginalBugID: 3238 Bug
Version: 8.0.5
SubmitDate: '1999-10-28'
LastModified: '1999-10-29'
Severity: SER
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Linux-Red Hat
OSVersion: 2.3.14
Machine: Other
FixedDate: '2000-10-25'
ClosedDate: '1999-10-29'


Name:
Hannes Reinecke

Extensions:
None

CustomShell:
No

ReproducibleScript:
$ tclsh
    % expr 09 * 1
    syntax error in expression "09 * 1"
    % expr 08 * 1
    syntax error in expression "08 * 1"
    % expr 07 * 1
    7
    % expr 06 * 1
    6
    % info tclversion
    8.0

ObservedBehavior:
Expr seems to have problems with parsing '08' and '09'. All other
    combinations ('01' up to '07') are
    treated as numbers, whereas '08' and '09' results in a parsing error.

DesiredBehavior:
Consistent behaviour for expr. Either result _always_ in a parsing error
    on numbers starting with '0'
    (although in that case I'd rather like to see an explanation as to why)
    or treat '08' and '09' as numbers, as is done with the others.
    The same bug also appears in tcl8.2, so no hope there.



Standard pilot error.  The docs state that leading zeros
indicate octal numbers (just like C), for which 08 and 09
are illegal. 
-- 10/29/1999 hobbs
welch Closed ticket [218263ffff]. [History diff]2000-10-26 08:17:56
dgp Ticket [218263ffff]: 4 changes [History diff]2001-04-21 02:58:36
Log in (anonymous is fine) to add a comment.