home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
mac
/
exsource.old
/
8_4.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
235b
|
14 lines
#
# Example 8-4
# ArrayInvert inverts an array.
#
proc ArrayInvert {arrName inverseName {pattern *}} {
upvar $arrName array $inverseName inverse
foreach {index value} [array get array $pattern] {
set inverse($value) $index
}
}