Overview
| Artifact ID: | e07f0a194ceed6ef1130beb8d87b569a9280f8c0 |
|---|---|
| Ticket: | 218146ffffffffffffffffffffffffffffffffff
the "variable" command doesn't always initialize properly. |
| User & Date: | nobody on 2000-10-26 00:53:44 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 2122 Bug Version: 8.1 SubmitDate: '1999-05-24' LastModified: '1999-08-08' Severity: MED Status: Closed Submitter: pat ChangedBy: hobbs OS: Windows 95 OSVersion: 8.1 and 8.0.4 Machine: X86 FixedDate: '2000-10-25' ClosedDate: '1999-08-08' Name: John Baxter ReproducibleScript: The following are commands typed in wish and the responses (on Windows 95). % variable x "" % puts $x % variable y "a" % puts $y a % namespace eval foo variable z "" % puts ${foo::z} can't read "foo::z": no such variable % namespace eval foo variable w "a" % puts ${foo::w} a % ObservedBehavior: The behavior with respect to the variable foo::z seems inconsistent with the other cases as well as with the man page on the "variable" command. DesiredBehavior: Initializing a variable with a value should make it readable. This is a conceptual error, and the result is as expected and documented. The namespace eval, like normal eval, will concat the args together. This causes an empty string ("") to just disappear. The command doesn't fail because variable with just one arg is acceptable. The safer way to call namespace eval is: namesapce eval foo { variable z "" } -- 08/08/1999 hobbs - foundin changed to: "obsolete: 8.1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to:
the "variable" command doesn't always initialize properly.
- type changed to: "Bug"