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

  1. #
  2. # Example 13-5
  3. # Getting a trace of the Tcl call stack.
  4. #
  5.  
  6. proc Call_Trace {{file stdout}} {
  7.     puts $file "Tcl Call Trace"
  8.     for {set x [expr [info level]-1]} {$x > 0} {incr x -1} {
  9.         puts $file "$x: [info level $x]"
  10.     }
  11. }
  12.  
  13.  
  14.