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

  1. #
  2. # Example 1-17
  3. # Using info to determine if a variable exists.
  4. #
  5.  
  6. if {![info exists foobar]} {
  7.     set foobar 0
  8. } else {
  9.     incr foobar
  10. }
  11.  
  12.  
  13.