Version 0 of argv

Updated 2001-06-12 07:36:13

This global variable is provided by tclsh and wish. It gives you the arguments the app was called with as a list, similar to C's argv, but without the app name itself (you get that in ::argv0). We don't need argc as we can always determine [llength $argv].

DGP -- It is true that we do not need ::argc, but tclsh and wish and any application embedding Tcl that calls Tcl_Main() provide it anyway.

http://purl.org/tcl/home/man/tcl8.3.2/UserCmd/tclsh.htm http://purl.org/tcl/home/man/tcl8.3.2/UserCmd/wish.htm

See command options for a discussion of various options one has in parsing the argv (and argv-like) information.

Tcl syntax help - Arts and crafts of Tcl-Tk programming