Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2a56a182019ba7afd593cbc02c0ff81111cb157b
Ticket: 576512ffffffffffffffffffffffffffffffffff
Math problem.
User & Date: nobody on 2002-07-02 18:20:03
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    
    Using 8.2.3 (SGI), 8.3.1, or 8.3.3, (both linux)
    the following behavior is observed:
    
    % set x [expr 1.2*3.0]
    3.6
    
    % if {3.6 > $x} {puts "3.6 is greater than $x!"}
    3.6 is greater than 3.6!
    
    % puts [expr 3.6 > $x]
    0
    
    
    So, apparently the expr procedure evaluates differently
    than the parsing of the if conditional. 
    
    I would rather not make all of my if statements like:
    
    if {[expr 3.6 > $x] == 1} {...}
    
  4. foundin changed to: "None"
  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: "None"
  10. title changed to: "Math problem."
  11. type changed to: "Bug"