commandloop(TCL)


commandloop -- create interactive command loop for Tcl interpreter

Synopsis

commandloop [prompt1] [prompt2]

Description

Creates an interactive command loop for the current Tcl interpreter. This command receives commands from stdin and executes them. It is useful for Tcl scripts that do not normally converse interactively with a user through a Tcl command interpreter, but sometimes want to enter this mode.

prompt1 is a Tcl command string that is evaluated to determine the text of the prompt string. The old value of tcl_prompt1 is saved and prompt is set to this value for the duration of the command loop. prompt2 is a command string that is evaluated to determine the ``downlevel prompt'', which is the prompt issued for continuation input. The old value of tcl_prompt2 is saved and the prompt is set to this value for the duration of the command loop.

When the command terminates, the variables for the prompt hooks will be set to their old value. If these arguments are not specified, the prompt hooks use their current value.


02 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 02 June 2005