Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c2f76a32390ee585ebafe733b305e17d79f96677
Ticket: 218310ffffffffffffffffffffffffffffffffff
expr command not substituting operator
User & Date: nobody on 2000-10-26 00:55:59
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 3697 Bug
    Version: 8.2
    SubmitDate: '1999-11-29'
    LastModified: '1999-11-29'
    Severity: LOW
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Windows NT
    OSVersion: Windows NT 4
    FixedDate: '2000-10-25'
    ClosedDate: '1999-11-29'
    
    
    Name:
    Jay Schmidgall
    
    ReproducibleScript:
    set opr +
    set x 5
    set y 15
    expr $x $opr $y   ;# this works
    expr {$x $opr $y} ;# this doesn't work
    
    ObservedBehavior:
    The line which doesn't work gives the error:
    
    syntax error in expression "$x $opr $y"
    
    DesiredBehavior:
    I would expect to get the answer, 15.
    
    
    
    expr needs to know about operators ahead of time (early
    error detection), which is why the first, which does one
    level of substitution first, works. 
    -- 11/29/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.2"
  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 command not substituting operator"
  11. type changed to: "Bug"