Artifacts Associated With Ticket 219153
Ticket change [a32e44f3ca] (rid 110009) by nobody on 2000-10-26 05:02:22:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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 - - foundin initialized to: "obsolete: 8.1b1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "10. Objects"
- title initialized to: ""!" operator can't handle string booleans"
- type initialized to: "Bug"
Ticket change [5baa0a6a2d] (rid 118369) by dkf on 2000-11-24 22:14:36:
- assignee changed to: "dkf"
- icomment:
Added test to detect this.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
Ticket change [7db461f7ba] (rid 97284) by dkf on 2000-11-24 22:28:03:
- assignee changed to: "nobody"
- closedate changed to: "2000-11-24T15:28:03"
- closer changed to: "dkf"
- icomment:
Now handles the variable case properly. Only a problem now if expressions are not quoted properly with braces.
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"
Ticket change [0727dd76d1] (rid 89339) by dkf on 2001-04-09 16:56:17:
- assignee changed to: "dkf"
Ticket change [eff7e0de13] (rid 109090) by dkf on 2001-04-09 16:56:18:
- closedate changed to: "2001-04-09T09:56:18"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Now handles the non-numeric boolean literal case properly. This bug is now 100% resolved.
- login: "dkf"
- mimetype: "text/plain"
- title changed to: ""!" operator can't handle string booleans"
- username: "dkf"