I'm kinda new to tcl but I have to write a proc that looks like this:
proc TestVerb { Data Data_txt } {
VERBATIM [format "// Data: $Data - $Data_txt"]
if { $argc == 2} {
VERBATIM {// SUCCESS //}
else {
exit 1
}
I call the proc like this: TestVerb Switch"This is used for..."
The proc is in a different file and the proc call is in another one. They seem properly sourced because I get the desired output if I do not use $argc
but once I use either $argv
or $argc
I get the following compilation error: Can't read $argv/$argc
no such variable
If I refer to this variables with $::argc
and $::argv
the result is not correct. $argv
is empty and $argc is 0