I have one receive.tcl script which contains only single proc which consist of some 1KLOC
puts "DEBUG_1"
proc Receive { arg1 arg2} {
puts "DEBUG_2"
... TCL Code
}
puts "DEBUG_3"
Now i need to use this proc Receive at so many different scripts;
Lets say in; 1.tcl 2.tcl 3.tcl and so on and all these 1.tcl 2.tcl are getting called from Master(Master.tcl).
Is it neccessary to include/write source PATH/receive.tcl in every 1.tcl 2.tcl and so on; to use Receive.
OR
I can call "source PATH/receive.tcl" from some Master(Master.tcl)script and it can be used further in any 1.tcl 2.tcl and so on without including anything separately; will TCL interpreter store/remember this proc Receive and can be used in any further scripts?
Problem : When I "source $PATH/receive.tcl in every 1.tcl 2.tcl and so on and not in Master.tcl; Master.tcl contains source $PATH/1.tcl source $PATH/2.tcl and so on; then i am executing Master.tcl.
- In First iteration
1.tclgets successfully executed; - Interpreter will go in
receive.tcl; it's printingDEBUG_1andDEBUG_3and furtherproc Receiveis used by1.tclsuccessfully. - but when interpreter moves to
2.tclit findssource $PATH/receive.tcl - Interpreter goes to
receive.tcl - and TCL gets crashing again and again; means i can see only
DEBUG_1only; segmentation fault after that.