From: <ke...@cr...> - 2005-06-10 14:02:03
|
lim...@gm... said: > package require Thread > package require Ttrace > for {set i 0} {$i < 4} {incr i} { > set tid($i) [thread::create -preserved] > bar > } > ttrace::eval { > proc foo {} { > puts foo > } > proc bar {} { > puts bar > } > } Your problem is not with Ttrace, but with understanding Tcl at a much more fundamental level. Tcl is not a compiled language - it evaluates the commands in its scripts in the order in which they appear. In your case, you are creating threads and calling [bar] in the [for] loop at the head of the script, before you have defined the [bar] procedure (in the ttrace::eval}. -- 73 de ke9tv/2, Kevin KENNY GE Corporate Research & Development ke...@cr... P. O. Box 8, Bldg. K-1, Rm. 5B36A Schenectady, New York 12301-0008 USA |