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
866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax