I am new to TCL programming
I have a tcl script called test1.tcl and test2.tcl separately in two different
of the directories F: \ TCLPrograms \ SamplePrograms \ test1.tcl and F: \ TCLPrograms \ test2.tcl
I want to know the full path of test2.tcl, which is proc
if I provide [script] information inside proc disp {}, it returns the path from which it is called
ie F: \ TCLPrograms \ SamplePrograms \ test1.tcl
kindly someone will tell me to get the path to proc
test1.tcl:
puts "Processing test1..."
source "F:\\TCLPrograms\\test2.tcl"
set rc [disp]
puts "Executed...."
test2.tcl:
proc disp { } {
puts "Successfully executed test2.tcl"
set path [info script]
puts "Script is invoked from the path: $path"
}
Thanks in advance
Vivek source
share