Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c923378916a6aee15bcf548ea295e9ff238ef734
Ticket: 218263ffffffffffffffffffffffffffffffffff
expr parse failure on 08 and 09
User & Date: nobody on 2000-10-26 00:55:13
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    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
    
  4. foundin changed to: "final: 8.0.5"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "expr parse failure on 08 and 09"
  11. type changed to: "Bug"