[ Team LiB ] Previous Section Next Section

Predefined Variables

Table 2-2. Variables defined by tclsh and wish

argc

The number of command-line arguments.

argv

A list of the command-line arguments.

argv0

The name of the script being executed. If being used interactively, argv0 is the name of the shell program.

embed_args

The list of arguments in the <EMBED> tag. Tcl applets only. See page 314.

env

An array of the environment variables. See page 124.

tcl_interactive

True (one) if the tclsh is prompting for commands.

tcl_library

The script library directory.

tcl_patchLevel

Modified version number, e.g., 8.0b1.

tcl_platform

Array containing operating system information. See page 192.

tcl_prompt1

If defined, this is a command that outputs the prompt.

tcl_prompt2

If defined, this is a command that outputs the prompt if the current command is not yet complete.

tcl_version

Version number.

auto_path

The search path for script library directories. See page 172.

auto_index

A map from command name to a Tcl command that defines it.

auto_noload

If set, the library facility is disabled.

auto_noexec

If set, the auto execute facility is disabled.

geometry

(wish only). The value of the -geometry argument.

    [ Team LiB ] Previous Section Next Section