f.TP  commandloop  ?-async?  ?-interactive  on|off|tty? ?-prompt1
cmd? ?-prompt2 cmd? ?-endcommand cmd?
Create an interactive command loop reading  commands  from  stdin
and writing results to stdout.  Command loops are maybe either be
blocking or event oriented.   This  command  is  useful  for  Tcl
scripts  that  do not normally converse interactively with a user
through a Tcl command interpreter, but which  sometimes  want  to
enter  this  mode,  perhaps  for debugging or user configuration.
The command loop terminates on EOF.

The following options are available:

            A command handler will be associated with stdin.
                   When  input  is available
                   on stdin, it  will  be  read  and  accumulated
                   until  a full command is available.  That com-
                   mand will then be evaluated.   An  event  loop
                   must  be  entered to make for input to be pro-
                   cessed.

            Enable or disable interactive command mode.  In
                   interactive mode, commands
                   are prompted for and the results  of  comments
                   are  printed.   The  value  maybe  any boolean
                   value or tty.  If  tty  is  used,  interactive
                   mode  is enabled if stdin is associated with a
                   terminal or terminal emulator.  The default is
                   tty.

            If  specified,  cmd   is used is evaluate and its
                   result used for the
                   main  command  prompt.   If not specified, the
                   command in tcl_prompt1 is evaluated to  output
                   the  prompt.  Note the difference in behavior,
                   cmd results is used,  while  tcl_prompt1  out-
                   puts.   This  is to allow for future expansion
                   to command loops that write to other than std-
                   out.

            If specified, cmd is used is evaluate and its result
                   used for the
                   secondary  (continuation)  command prompt.  If
                   not specified, the command in  tcl_prompt2  is
                   evaluated to output the prompt.

            If  specified, cmd is evaluated when the command loop
                   terminates.

       In  interactive mode, the results of set commands with two
       arguments are not printed.

       If SIGINT is configured to generate a Tcl error, it can be
       used  to  delete  the  current  command being type without
       aborting the program in progress.
       This command is provided by Extended Tcl.
