Why do [string is true {}] and [string is false {}] BOTH ret
Closed / Fixed218445ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:57:41
OriginalBugID: 6352 Bug
Version: 8.2
SubmitDate: '2000-10-10'
LastModified: '2000-10-11'
Severity: LOW
Status: Closed
Submitter: techsupp
ChangedBy: hobbs
OS: Windows NT
OSVersion: NT 4 SP6a
Machine: Compaq Dual Pentium!!! 550MHz, 2GB RAM
FixedDate: '2000-10-25'
ClosedDate: '2000-10-11'
Name:
Carlos Bueno
CustomShell:
This is the TCL package that ships with StoryServer 5.0. The only modifications made by Vignette I am aware of is the disabling of the [encoding] command.
ReproducibleScript:
if {[string is true {}] && [string is false {}]} {
puts "huh?"
}
ObservedBehavior:
We are using TCL 8.2 shipping with StoryServer 5.0. The docs state that "If string is any of 0, false, no, or off, then Tcl_GetBoolean stores a zero value at *boolPtr. If string is any of 1, true, yes, or on, then 1 is stored at *boolPtr."
Doesn't mention behavior with empty strings, though from the above you'd assume it would always return 0. If this returning of 1 is correct,
1. Why?
2. Could you please put that in the docs?
DesiredBehavior:
I expect [string is true {}] and [string is false {}] to zero or explain the reason why.
Please see docs. This is defined behavior when -strict is not used.
-- 10/11/2000 hobbs
welch Closed ticket [218445ffff].
[History diff]2000-10-26 08:22:16
dgp Ticket [218445ffff]: 3 changes
[History diff]2001-04-19 03:00:23
Log in (anonymous is fine) to add a comment.