Overview
| Artifact ID: | 3ae1e6b18003cdc42fee4c0c7099ca4756fe31d9 |
|---|---|
| Ticket: | 3169173fffffffffffffffffffffffffffffffff
crosstalk between arrays |
| User & Date: | msofer on 2011-02-01 19:25:42 |
Changes
- icomment:
Not sure about what you are trying to do, but: the type/intrep of a Tcl_Obj is just a cache optimising the representation for the *last* usage of this obj. It is *not* really a property of the Tcl_Obj, and is subject to changing (aka shimmering). In your script, let us follow what happens to 'a': set foo(b) a set bar(a) b # 'a' is just a string foreach i [array names bar] { puts "$i : [otype $i]" } # 'a' has only been ever used used as a string, still a string set l {} foreach {i j} [array get foo] { foreach k $j { lappend k $l } } # 'a' has been treated as a list by doing [foreach] on it; type is now list - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"