Previous section   Next section

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch

Table of Contents
Chapter 2.  Getting Started

Predefined Variables

Table 2-2. Variables defined by tclsh and wish.
argcThe number of command-line arguments.
argvA list of the command-line arguments.
argv0The name of the script being executed. If being used interactively, argv0 is the name of the shell program.
embed_argsThe list of arguments in the <EMBED> tag. Tcl applets only. See page 298.
envAn array of the environment variables. See page 117.
tcl_interactiveTrue (one) if the tclsh is prompting for commands.
tcl_libraryThe script library directory.
tcl_patchLevelModified version number, e.g., 8.0b1.
tcl_platformArray containing operating system information. See page 182.
tcl_prompt1If defined, this is a command that outputs the prompt.
tcl_prompt2If defined, this is a command that outputs the prompt if the current command is not yet complete.
tcl_versionVersion number.
auto_pathThe search path for script library directories. See page 162.
auto_indexA map from command name to a Tcl command that defines it.
auto_noloadIf set, the library facility is disabled.
auto_noexecIf set, the auto execute facility is disabled.
geometry(wish only). The value of the -geometry argument.

      Previous section   Next section