.K Command

The .K command deletes (kills) a statement currently in the stack.

Format

.Kn

Parameter(s)

n

Number of the stack statement to be deleted.

When a statement is deleted from the stack, the stack statements that follow it each move up one position in the stack. Once a statement has been deleted, you cannot get it back (unless, of course, you re-enter the statement at the TCL prompt).

You can delete only one statement at a time from the stack. If you want to delete several consecutive statements using .K, it’s best to do so in descending order: that is, if you want to delete statements 9, 10, and 11, delete statement 11 first, then 10, then 9. Alternatively, use the .E command to delete multiple statements.

Deleting a Statement from the Stack

This example displays the first six statements in the stack, then deletes statement 4:

>.L6

001 COPY DICT ORDERS 7445

002 SORT ORDERS BY-DSND DATE

003 LIST ORDERS WITH ORDER# < "10110"

004 TIME

005 COUNT ORDERS WITH ORDER# < "10110"

006 LIST CUSTOMERS LAST-NAME

>.K4

 

>.L6

001 COPY DICT ORDERS 7445

002 SORT ORDERS BY-DSND DATE

003 LIST ORDERS WITH ORDER# < "10110"

004 COUNT ORDERS WITH ORDER# < "10110"

005 LIST CUSTOMERS LAST-NAME

006 LIST CUSTOMERS

See Also

TCL Stacker Command Reference