home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Practical Programming in Tcl & Tk (4th Edition)
/
TCLBOOK4.BIN
/
pc
/
exsource.old
/
8_7.tcl
< prev
next >
Wrap
Text File
|
2003-04-15
|
284b
|
17 lines
#
# Example 8-7
# Using arrays for records, version 3.
#
proc Emp_AddRecord {id name manager phone} {
global employee
set employee($name) [list $name $id $manager $phone]
set employee($id) $name
}
proc Emp_Manager {name} {
global employee
return [lindex $employee($name) 2]
}