Next: Debugging
Up: Basic Tcl
Previous: Arrays
Most of the Tcl internal data is available to the programs,
i.e. metaprogramming is possible and easy.
The command info
and others return various data
reflecting the internal state.
Some of the available commands are:
- info
commands
-
Returns the list of all commands defined in this interpreter.
- info
exists varName
-
Returns 1 if the variable with the given name exists,
i.e. if it has a value.
- info
globals
-
Returns a list of all defined global variables.
- info
script
-
Returns the file name if a file script
is being evaluated.
- time
script ?count?
-
Execute the script count times (default 1)
and return the time in microseconds per iteration.
Micha Meier
Tue Jul 2 09:49:39 MET DST 1996