Or, more directly, examine the value of the pre-defined global variable argc.
By the way, note that Tcl handles argc/argv a little differently than in C programming. First, the contents of argv is a Tcl list of the arguments, not an array. Second, the argv list (and the argc count) does not include the program (script) as the first "argument". Thus, it's quite possible for argc to be 0 and argv be an empty list. If you really do need the name used to invoke the script, that information is provided in a separate global variable, argv0. - Ken Jones, President
Avia Training and Consulting
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.