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

  1. #
  2. # Example 8-5
  3. # Using arrays for records, version 1.
  4. #
  5.  
  6. proc Emp_AddRecord {id name manager phone} {
  7.     global employeeID employeeManager \
  8.         employeePhone employeeName
  9.     set employeeID($name) $id
  10.     set employeeManager($name) $manager
  11.     set employeePhone($name) $phone
  12.     set employeeName($id) $name
  13. }
  14. proc Emp_Manager {name} {
  15.     global employeeManager
  16.     return $employeeManager($name)
  17. }
  18.  
  19.  
  20.