Seth Woolley's Man Viewer

Manual for info - man n info

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

info(1,5,n)(n)                      Tcl Built-In Commands                     info(1,5,n)(n)



NAME
       info(1,5,n) - Return information about the state of the Tcl interpreter

SYNOPSIS
       info(1,5,n) option ?arg arg ...?


DESCRIPTION
       This  command  provides  information about various internals of the Tcl
       interpreter.  The legal option's (which may be abbreviated) are:

       info(1,5,n) args procname
              Returns a list containing the names of the arguments  to  proce-
              dure  procname,  in(1,8)  order.   Procname must be the name of a Tcl
              command procedure.

       info(1,5,n) body procname
              Returns the body of procedure procname.  Procname  must  be  the
              name of a Tcl command procedure.

       info(1,5,n) cmdcount
              Returns  a  count of the total number of commands that have been
              invoked in(1,8) this interpreter.

       info(1,5,n) commands ?pattern?
              If pattern isn't specified, returns a list of names of  all  the
              Tcl commands in(1,8) the current namespace, including both the built-
              in(1,8) commands written in(1,8) C  and  the  command  procedures  defined
              using  the  proc(5,n)  command.   If pattern is specified, only those
              names matching pattern are  returned.   Matching  is  determined
              using  the  same  rules  as  for string(3,n) match.  pattern can be a
              qualified name like Foo::print*.  That is, it may specify a par-
              ticular  namespace using a sequence of namespace names separated
              by ::s, and may have pattern matching special characters at  the
              end  to specify a set(7,n,1 builtins) of commands in(1,8) that namespace.  If pattern
              is a qualified name, the resulting list  of  command  names  has
              each one qualified with the name of the specified namespace.

       info(1,5,n) complete command
              Returns  1  if(3,n) command is a complete Tcl command in(1,8) the sense of
              having no unclosed quotes, braces,  brackets  or  array  element
              names,  If  the  command doesn't appear to be complete then 0 is
              returned.  This command is typically used in(1,8) line-oriented input
              environments to allow users(1,5) to type in(1,8) commands that span multi-
              ple lines;  if(3,n) the command isn't complete, the script can  delay
              evaluating it until additional lines have been typed to complete
              the command.

       info(1,5,n) 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.  Other-
              wise it returns 1 and places the default value of arg into vari-
              able varname.

       info(1,5,n) exists varName
              Returns 1 if(3,n) the variable named(5,8) varName exists  in(1,8)  the  current
              context  (either  as  a  global  or local variable) and has been
              defined by being given a value, returns 0 otherwise.

       info(1,5,n) functions ?pattern?
              If pattern isn't specified, returns a list of all the math func-
              tions  currently  defined.   If pattern is specified, only those
              functions whose name matches pattern are returned.  Matching  is
              determined using the same rules as for string(3,n) match.

       info(1,5,n) globals ?pattern?
              If  pattern  isn't specified, returns a list of all the names of
              currently-defined global variables.  Global variables are  vari-
              ables  in(1,8)  the  global namespace.  If pattern is specified, only
              those names matching pattern are returned.  Matching  is  deter-
              mined using the same rules as for string(3,n) match.

       info(1,5,n) hostname
              Returns  the  name  of  the computer on which this invocation is
              being executed.  Note that this name is not guaranteed to be the
              fully  qualified  domain  name of the host.  Where machines have
              several different names (as  is  common  on  systems  with  both
              TCP/IP  (DNS) and NetBIOS-based networking installed,) it is the
              name that is suitable for TCP/IP networking that is returned.

       info(1,5,n) level ?number?
              If number is not specified, this command returns a number giving
              the  stack  level of the invoking procedure, or 0 if(3,n) 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 posi-
              tive  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 lev-
              els mean.

       info(1,5,n) library
              Returns the name of the library directory in(1,8) which standard  Tcl
              scripts   are  stored.   This  is  actually  the  value  of  the
              tcl_library variable and may be changed by setting  tcl_library.
              See the tclvars manual entry for more information.

       info(1,5,n) loaded ?interp?
              Returns  a  list  describing  all of the packages that have been
              loaded into interp with the load(7,n) command.  Each list element  is
              a  sub-list with two elements consisting of the name of the file(1,n)
              from which the package was loaded and the name of  the  package.
              For  statically-loaded  packages  the file(1,n) name will be an empty
              string.  If interp is omitted then information is  returned  for
              all packages loaded in(1,8) any interpreter in(1,8) the process.  To get a
              list of just the packages in(1,8) the current interpreter, specify an
              empty string(3,n) for the interp argument.

       info(1,5,n) 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(3,n) any.  Variables defined with the global,
              upvar  and variable commands will not be returned.   If  pattern
              is  specified,  only  those names matching pattern are returned.
              Matching is determined using the same rules as for string(3,n) match.

       info(1,5,n) nameofexecutable
              Returns  the  full  path  name of the binary file(1,n) from which the
              application was invoked.  If Tcl  was  unable  to  identify  the
              file(1,n), then an empty string(3,n) is returned.

       info(1,5,n) patchlevel
              Returns the value of the global variable tcl_patchLevel; see the
              tclvars manual entry for more information.

       info(1,5,n) procs ?pattern?
              If pattern isn't specified, returns a list of all the  names  of
              Tcl  command procedures in(1,8) the current namespace.  If pattern is
              specified, only those procedure names in(1,8) the  current  namespace
              matching pattern are returned.  Matching is determined using the
              same rules as for string(3,n) match.

       info(1,5,n) script ?filename?
              If a Tcl script file(1,n) is currently being evaluated (i.e. there is
              a  call  to Tcl_EvalFile active or there is an active invocation
              of the source command), then this command returns  the  name  of
              the  innermost  file(1,n) being processed.  If filename is specified,
              then the return value of this command will be modified  for  the
              duration  of the active invocation to return that name.  This is
              useful in(1,8) virtual(5,8) file(1,n) system applications.  Otherwise the  com-
              mand returns an empty string.

       info(1,5,n) sharedlibextension
              Returns  the  extension  used  on this platform for the names of
              files  containing  shared  libraries  (for  example,  .so  under
              Solaris).  If shared libraries aren't supported on this platform
              then an empty string(3,n) is returned.

       info(1,5,n) tclversion
              Returns the value of the global variable  tcl_version;  see  the
              tclvars manual entry for more information.

       info(1,5,n) vars ?pattern?
              If  pattern  isn't specified, returns a list of all the names of
              currently-visible variables.   This  includes  locals  and  cur-
              rently-visible  globals.   If  pattern  is specified, only those
              names matching pattern are  returned.   Matching  is  determined
              using  the  same  rules  as  for string(3,n) match.  pattern can be a
              qualified name like Foo::option*.  That is,  it  may  specify  a
              particular  namespace  using a sequence of namespace names sepa-
              rated by ::s, and may have pattern matching  special  characters
              at  the end to specify a set(7,n,1 builtins) of variables in(1,8) that namespace.  If
              pattern is a qualified name,  the  resulting  list  of  variable
              names  has  each  matching namespace variable qualified with the
              name of its namespace.


SEE ALSO
       global(n), proc(5,n)(n)


KEYWORDS
       command, information, interpreter, level, namespace,  procedure,  vari-
       able




Tcl                                   8.4                              info(1,5,n)(n)

References for this manual (incoming links)