Return code from script.
Script | Location of script to source. |
args | Optional. These will be added to argv, if any. |
Like source
except it will first populate argv with args so that it is more like running the script from the command line.
For information regarding exceptions / errors, see
here.
% set QuickScript {puts "[expr [lindex $argv 0] + [lindex $argv 1]]"}
puts "[expr [lindex $argv 0] + [lindex $argv 1]]"
% String2File $QuickScript adder.tcl
% Run adder.tcl 1 2
3