home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tclX6.5c / tcllib / help / status / info < prev    next >
Encoding:
Text File  |  1992-12-19  |  7.3 KB  |  134 lines

  1.           info option ?arg arg ...?
  2.                Provide information about various internals to the  Tcl
  3.                interpreter.    The   legal   option's  (which  may  be
  4.                abbreviated) are:
  5.  
  6.                info args procname
  7.                     Returns  a  list  containing  the  names  of   the
  8.                     arguments   to   procedure   procname,  in  order.
  9.                     Procname  must  be  the  name  of  a  Tcl  command
  10.                     procedure.
  11.  
  12.                info body procname
  13.                     Returns the body of procedure procname.   Procname
  14.                     must be the name of a Tcl command procedure.
  15.  
  16.                info cmdcount
  17.                     Returns a count of the total  number  of  commands
  18.                     that have been invoked in this interpreter.
  19.  
  20.                info commands ?pattern?
  21.                     If pattern isn't  specified,  returns  a  list  of
  22.                     names  of all the Tcl commands, including both the
  23.                     built-in commands written in  C  and  the  command
  24.                     procedures  defined  using  the  proc command.  If
  25.                     pattern is specified, only  those  names  matching
  26.                     pattern  are  returned.   Matching  is  determined
  27.                     using the same rules as for string match.
  28.  
  29.                info complete command
  30.                     Returns 1 if command is a complete Tcl command  in
  31.                     the  sense  of  having no unclosed quotes, braces,
  32.                     brackets or array element names,  If  the  command
  33.                     doesn't  appear to be complete then 0 is returned.
  34.                     This command is typically  used  in  line-oriented
  35.                     input  environments  to  allow  users  to  type in
  36.                     commands that span multiple lines;  if the command
  37.                     isn't complete, the script can delay evaluating it
  38.                     until additional lines have been typed to complete
  39.                     the command.
  40.  
  41.                info default procname arg varname
  42.                     Procname  must  be  the  name  of  a  Tcl  command
  43.                     procedure  and arg must be the name of an argument
  44.                     to that procedure.  If arg doesn't have a  default
  45.                     value  then  the  command returns 0.  Otherwise it
  46.                     returns 1 and places the default value of arg into
  47.                     variable varname.
  48.  
  49.                info exists varName
  50.                     Returns 1 if the variable named varName exists  in
  51.                     the  current  context (either as a global or local
  52.                     variable), returns 0 otherwise.
  53.  
  54.                info globals ?pattern?
  55.                     If pattern isn't specified, returns a list of  all
  56.                     the  names  of currently-defined global variables.
  57.                     If pattern is specified, only those names matching
  58.                     pattern  are  returned.   Matching  is  determined
  59.                     using the same rules as for string match.
  60.  
  61.                info level ?number?
  62.                     If number is not specified, this command returns a
  63.                     number  giving  the  stack  level  of the invoking
  64.                     procedure, or 0 if the command is invoked at  top-
  65.                     level.  If number is specified, then the result is
  66.                     a list consisting of the name  and  arguments  for
  67.                     the  procedure  call at level number on the stack.
  68.                     If number is positive then it selects a particular
  69.                     stack  level  (1  refers  to  the  top-most active
  70.                     procedure, 2 to the procedure it  called,  and  so
  71.                     on);  otherwise  it  gives a level relative to the
  72.                     current level (0 refers to the current  procedure,
  73.                     -1  to  its  caller,  and so on).  See the uplevel
  74.                     command for more information on what stack  levels
  75.                     mean.
  76.  
  77.                info library
  78.                     Returns the name of the library directory in which
  79.                     standard  Tcl  scripts  are  stored.   The default
  80.                     value for the library is compiled into Tcl, but it
  81.                     may  be  overridden  by  setting  the  TCL_LIBRARY
  82.                     environment variable.  If there is no  TCL_LIBRARY
  83.                     variable  and  no compiled-in value then and error
  84.                     is generated.  See the library  manual  entry  for
  85.                     details  of  the  facilities  provided  by the Tcl
  86.                     script library.  Normally  each  application  will
  87.                     have  its  own application-specific script library
  88.                     in addition to the Tcl script library;  I  suggest
  89.                     that each application set a global variable with a
  90.                     name  like  $app_library   (where   app   is   the
  91.                     application's  name)  to hold the location of that
  92.                     application's library directory.
  93.  
  94.                info locals ?pattern?
  95.                     If pattern isn't specified, returns a list of  all
  96.                     the  names  of  currently-defined local variables,
  97.                     including arguments to the current  procedure,  if
  98.                     any.   Variables defined with the global and upvar
  99.                     commands will not  be  returned.   If  pattern  is
  100.                     specified,  only  those names matching pattern are
  101.                     returned.  Matching is determined using  the  same
  102.                     rules as for string match.
  103.  
  104.                info procs ?pattern?
  105.                     If pattern isn't specified, returns a list of  all
  106.                     the  names  of Tcl command procedures.  If pattern
  107.                     is specified, only those  names  matching  pattern
  108.                     are  returned.   Matching  is determined using the
  109.                     same rules as for string match.
  110.  
  111.                info script
  112.                     If a Tcl script file is currently being  evaluated
  113.                     (i.e.  there  is  a call to Tcl_EvalFile active or
  114.                     there  is  an  active  invocation  of  the  source
  115.                     command),  then  this  command returns the name of
  116.                     the innermost file being processed.  Otherwise the
  117.                     command returns an empty string.
  118.  
  119.                info tclversion
  120.                     Returns the version number for this version of Tcl
  121.                     in  the  form  x.y,  where  changes to x represent
  122.                     major changes with probable incompatibilities  and
  123.                     changes  to y represent small enhancements and bug
  124.                     fixes that retain backward compatibility.
  125.  
  126.                info vars ?pattern?
  127.                     If pattern isn't specified, returns a list of  all
  128.                     the    names   of   currently-visible   variables,
  129.                     including  both   locals   and   currently-visible
  130.                     globals.   If  pattern  is  specified,  only those
  131.                     names matching pattern are returned.  Matching  is
  132.                     determined  using  the  same  rules  as for string
  133.                     match.
  134.