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

  1. #
  2. # Example 18-11
  3. # The SiteLink procedure.
  4. #
  5.  
  6. proc SiteLink {label} {
  7.     global site
  8.     array set map $site(pages)
  9.     if {[info exist map($label)]} {
  10.         return "<a href=\" $map($label)\" >$label</a>"
  11.     } else {
  12.         return $label
  13.     }
  14. }
  15.  
  16.  
  17.