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

  1. #
  2. # Example 19-1
  3. # Creating and deleting an interpreter.
  4. #
  5.  
  6. interp create foo
  7. #=> foo
  8. interp eval foo {set a 5}
  9. #=> 5
  10. set sum [interp eval foo {expr {$a + $a}}]
  11. #=> 10
  12. interp delete foo
  13.  
  14.  
  15.