Skip to content
Tcl Source Code History Of Ticket 219153ffffffffff
Login

History Of Ticket 219153ffffffffff

Artifacts Associated With Ticket 219153ffffffffff

  1. Ticket change [a32e44f3ca] (rid 110009) by nobody on 2000-10-26 05:02:22:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 1194 RFE
      Version: 8.1b1
      SubmitDate: '1999-02-11'
      LastModified: '1999-12-03'
      Severity: LOW
      Status: Assigned
      Submitter: pat
      ChangedBy: hobbs
      RelatedBugIDs: 616
      OS: Linux
      OSVersion: 2.0.35
      Machine: Other
      FixedDate: '2000-10-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      Steve McAndrewSmith
      
      ReproducibleScript:
      # These all work fine ...
      set b 1
      if { $b } { puts "ooga" }
      
      set b 0
      if { ! $b } { puts "ooga" }
      
      set b yes
      if { $b } { puts "ooga" }
      
      set b no
      if { $b } { puts "no ooga" } else { puts "ooga" }
      
      if { ($b && $b) || $b } { puts "ooga ooga ooga" }
      
      # This produces an error.:  can't use non-numeric string as operand of "!"
      if { ! $b } { puts "GAKK!" }
      
      ObservedBehavior:
      When using string boolean values (e.g. "true", "false", "yes", "no") in if expressions, the negation operator ("!") does not recognize the strings as boolean values.  Only "0" and "1" are correctly accepted.  It gives the following error:
      
        can't use non-numeric string as operand of "!" 
      
      However, both "&&" and "||" (and probably others) accept these boolean strings correctly.
      
      DesiredBehavior:
      "!true",  "!false", "!yes", and "!no" should all evaluate correctly.
      
      
      
      This is not the defined behavior.  03/23/1999 18:13 - surles -
      
    4. foundin initialized to: "obsolete: 8.1b1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "10. Objects"
    10. title initialized to: ""!" operator can't handle string booleans"
    11. type initialized to: "Bug"
  2. Ticket change [5baa0a6a2d] (rid 118369) by dkf on 2000-11-24 22:14:36:

    1. assignee changed to: "dkf"
    2. icomment:
      Added test to detect this.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  3. Ticket change [7db461f7ba] (rid 97284) by dkf on 2000-11-24 22:28:03:

    1. assignee changed to: "nobody"
    2. closedate changed to: "2000-11-24T15:28:03"
    3. closer changed to: "dkf"
    4. icomment:
      Now handles the variable case properly.  Only a problem now if expressions are not quoted properly with braces.
      
      
    5. login: "dkf"
    6. mimetype: "text/plain"
    7. priority changed to: "2"
    8. resolution changed to: "Fixed"
    9. status changed to: "Closed"
    10. username: "dkf"
  4. Ticket change [0727dd76d1] (rid 89339) by dkf on 2001-04-09 16:56:17:

    1. assignee changed to: "dkf"
  5. Ticket change [eff7e0de13] (rid 109090) by dkf on 2001-04-09 16:56:18:

    1. closedate changed to: "2001-04-09T09:56:18"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      Now handles the non-numeric boolean literal case properly.
      This bug is now 100% resolved.
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. title changed to: ""!" operator can't handle string booleans"
    7. username: "dkf"