Version 1 of command

Updated 2002-04-22 11:08:38

Richard Suchenwirth - Tcl is the Tool Command Language. Execution is done by splitting scripts into commands (by newline or semicolon). A command is a sequence of words, the first being the command name, the rest its arguments. (So far from Tcl syntax).

All available command names at a given time (and namespace) are returned by

 info commands

They may have come from several sources:

  • C-implemented commands
  • Tcl-implemented procs, listed in info procs
  • Aliases for other commands, listed in interp aliases {}
  • Tk widgets use their pathname as command
  • images also use their name as command name

To introspect commands in other than the current namespace, walk the tree with namespace children.