Overview
| Artifact ID: | e3aae74d0cc239e8eed78b3ac7edcfb90a9d1c5a |
|---|---|
| Ticket: | 218546ffffffffffffffffffffffffffffffffff
"variable foo(x)" has inconsistant behavior |
| User & Date: | nobody on 2000-10-26 01:01:59 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
OriginalBugID: 981 Bug Version: 8.3b2 SubmitDate: '1998-12-16' LastModified: '2000-01-20' Severity: SER Status: Released Submitter: admin ChangedBy: ericm OS: All FixedDate: '2000-01-20' FixedInVersion: 8.3 ClosedDate: '2000-10-25' The original bug description is below the --------snip--------- line below. That description, however, acknowledges that the bug was fixed in 8.1, by changing the behavior of "variable foo(x)". But in investigating the bug, I found this behavior: namespace eval bar { variable foo(1) } => can't define "foo(1)": no such element in array However: namespace eval boo { set foo(1) x variable foo(1) } => # no error I corrected this by making the variable command always return an error when the variable name given refers to an array element: namespace eval bar { variable foo(1) } can't define "foo(1)": name refers to an element in an array - eric Original bug report below. -------------------snip------------------------- In 8.0.4, the command "variable foo(x)" creates a scalar variable "foo(x)" that is not related to the foo array. This bug is not present in 8.1, where the variable command raises an error. # repeatable script namespace eval ns { variable a array set a { 1one 2two } } proc ns::bug {varname value} { variable $varname $value } ns::bug a(3) three puts "[info vars ns::*]" Fixed in 8.3. - eric -- 01/20/2000 ericm - foundin changed to: "obsolete: 8.3b2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "07. Variables"
- title changed to: ""variable foo(x)" has inconsistant behavior"
- type changed to: "Bug"