home *** CD-ROM | disk | FTP | other *** search
/ Practical Programming in Tcl & Tk (4th Edition) / TCLBOOK4.BIN / pc / exsource.old / 8_7.tcl < prev    next >
Text File  |  2003-04-15  |  284b  |  17 lines

  1. #
  2. # Example 8-7
  3. # Using arrays for records, version 3.
  4. #
  5.  
  6. proc Emp_AddRecord {id name manager phone} {
  7.     global employee
  8.     set employee($name) [list $name $id $manager $phone]
  9.     set employee($id) $name
  10. }
  11. proc Emp_Manager {name} {
  12.     global employee
  13.     return [lindex $employee($name) 2]
  14. }
  15.  
  16.  
  17.