Using the TCL Stacker

The TCL stacker maintains a stack of previous commands entered by the user. Procs and mvBASIC programs can also add to the stack. The size of the stack, or the number of statements that can be stored, is set to 20 by default.

Each new command is pushed on top of the stack. For instance, once WHO is executed, it goes on to the stack as statement 1.

1 WHO

Entering another command pushes WHO into the second position. Entering TIME, for example, places TIME in the top position.

1 TIME

2 WHO

WHO is now referred to as statement 2. Each time you enter a statement, all previous statements are pushed down to make room for the new statement at the top.

1 TERM V

2 TIME

3 WHO

If a new command causes the size of the stack to be exceeded, a statement is removed from the bottom of the stack.

Any statement in the TCL stack can be retrieved, modified, executed, and saved from the stack using a few basic commands. TCL Stacker commands begin with a dot (.) and consist of a single letter. TCL Stacker commands are not stored in the stack.

The .? command lists a summary of the TCL Stacker commands.

Enabling the TCL Stacker

The TCL Stacker is normally enabled for an account. It can be disabled by the STACK-OFF command and enabled by the STACK-ON command.

If the TCL Stacker is disabled, the system attempts to interpret stack commands as verbs and produce an error message.

The following topics are presented in this section:

Referencing Other Processes

Listing the Stack (.L)

Executing Previous Statements (.X)

Modifying Previous Statements

Editing the Stack (.E)

Choosing a Command to Modify

Replacing Text in the Stack (.M)

Appending Text (.A)

Storing a Series of Statements (.C)

Retrieving an Item (.R)

Deleting Statements from the Stack (.K)

Setting TCL Stacker Options (.O, .P, .U)

See Also

Using the Terminal Control Language

Overview of TCL User Commands

Logging On and Off

Setting Line and Process Characteristics

TCL Stacker Command Reference