home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource.old
/
8_2.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
245b
|
18 lines
#
# Example 8-2
# Referencing an array indirectly.
#
set name TheArray
#=> TheArray
set ${name}(xyz) {some value}
#=> some value
set x $TheArray(xyz)
#=> some value
set x ${name}(xyz)
#=> TheArray(xyz)
set x [set ${name}(xyz)]
#=> some value