home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
dirs
/
tcl_447.lzh
/
TCL
/
tcl.lzh
/
tcl
/
help
/
info
< prev
next >
Wrap
Text File
|
1990-05-03
|
3KB
|
88 lines
info option arg arg ...
Provide information about various internals to the Tcl
interpreter. The legal option's (which may be
abbreviated) are:
info args procname
Returns a list containing the names of the
arguments to procedure procname, in order.
Procname must be the name of a Tcl command
procedure.
info body procname
Returns the body of procedure procname. Procname
must be the name of a Tcl command procedure.
info commands [pattern]
If pattern isn't specified, returns a list of
names of all the Tcl commands, including both the
built-in commands written in C and the command
procedures defined using the proc command. If
pattern is specified, only those names matching
pattern are returned. Matching is determined
using the same rules as for string match.
info cmdcount
Returns a count of the total number of commands
that have been invoked in this interpreter.
info default procname arg varname
Procname must be the name of a Tcl command
procedure and arg must be the name of an argument
to that procedure. If arg doesn't have a default
value then the command returns 0. Otherwise it
returns 1 and places the default value of arg into
variable varname.
info globals [pattern]
If pattern isn't specified, returns a list of all
the names of currently-defined global variables.
If pattern is specified, only those names matching
pattern are returned. Matching is determined
using the same rules as for string match.
info level [number]
If number is not specified, this command returns a
number giving the stack level of the invoking
procedure, or 0 if the command is invoked at top-
level. If number is specified, then the result is
a list consisting of the name and arguments for
the procedure call at level number on the stack.
If number is positive then it selects a particular
stack level (1 refers to the top-most active
procedure, 2 to the procedure it called, and so
on); otherwise it gives a level relative to the
current level (0 refers to the current procedure,
-1 to its caller, and so on). See the uplevel
command for more information on what stack levels
mean.
info locals [pattern]
If pattern isn't specified, returns a list of all
the names of currently-defined local variables,
including arguments to the current procedure, if
any. If pattern is specified, only those names
matching pattern are returned. Matching is
determined using the same rules as for string
match.
info procs [pattern]
If pattern isn't specified, returns a list of all
the names of Tcl command procedures. If pattern
is specified, only those names matching pattern
are returned. Matching is determined using the
same rules as for string match.
info tclversion
Returns the version number for this version of Tcl
in the form x.y, where changes to x represent
major changes with probable incompatibilities and
changes to y represent small enhancements and bug
fixes that retain backward compatibility.
info vars
Returns a list of all the names of currently-
visible variables, including both locals and
currently-visible globals.