Overview
| Artifact ID: | 8b5636d366391bfece66cb04f41f329b1d3942566ce59ee77a7444bf7232994b |
|---|---|
| Ticket: | 6ee2f5d5d6bc7d697b735f5389d833ff9e61e217
Tcl 9.0 "invalid character in array index" error for $a("b") |
| User & Date: | jdelsign on 2026-07-29 20:20:21 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-fossil-plain"
- comment changed to:
I am in the process of upgrading from Tcl 8.6.14 to Tcl 9.0.4. The following commands produce an error in Tcl 9.0.4, but it was OK in Tcl 8.6.14. $ tclsh % set tcl_patchLevel 9.0.4 % set a("b") x x % array names a {"b"} % set a(b) y y % array names a b {"b"} % puts $a(b) y % puts $a("b") invalid character in array index % Why is that an error in Tcl 9.0.4? The workaround I have been using is to access the value using set: % set a("b") x % - foundin changed to: "9.0.4"
- is_private changed to: "0"
- login: "jdelsign"
- priority changed to: "5 Medium"
- private_contact changed to: "cda79e7c26c7aaa8a79a31b5a67382ef3b84d2c9"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "jdelsign"
- subsystem changed to: "07. Variables"
- title changed to:
Tcl 9.0 "invalid character in array index" error for $a("b") - type changed to: "Bug"