editor.p

Command/Editor, Releases: AP and R83

Defines/invokes prestored command.

Syntax

p{number} editor.command{[editor.command}

Description

either defines or executes a 'prestored' command; 'p' by itself assumes 'p0' (zero).

Defining prestored commands:

An editor command sequence may be assigned to a specified number (in the range 0-9). Each prestored command may contain up to 100 bytes. When no number is specified, zero (0) is assumed. The <escape> key, is used as a command delimiter to separate multiple editor commands.

Prestored editor command sequences must be reloaded each time the editor is initiated.

The default prestore, P0, is 'l22', or list 22 lines.

Executing prestored commands:

To execute a prestored command, the 'p' command is issued along with the desired number of the command to execute:

p{number}

The 'p' command, followed by a <return>, executes the command sequence stored in 'p0' (zero).

The 'pd' command displays the current prestored commands. Its a good idea to review prestored commands after defining them and before executing them.

Example

1) .p1 b[u22[l22<return>

This defines prestored command 'p1' with the following command
sequence:

1) go to 'bottom' of item
2) move the line pointer 'up' 22 lines
3) list 22 lines.

Each time the 'p1' command is issued, the 'last' 22 lines
of the item are displayed.

Note that the '[' character displayed in BOTH examples is the
character echoed to the screen when the <escape> key is pressed. This
further assumes that the <escape> key is NOT currently programmed to
'push' a level.

2) .p2 ru9999.abc.xyz[fi[p2<return>

This defines prestored command 'p2' as:

1) replace, in the next 9999 lines, all occurrences of 'abc' with
'xyz'.
2) file the item
3) repeat the process on the next item (by calling the 'p2' command)
, or, if all items have been processed, the process falls out to TCL.

See Also

Command Name Type Description
editor.pd Command Display prestored commands.
tcl.esc-data Verb: Access Makes escape key behave normal.
tcl.esc-level Verb: Access Makes escape key push a level.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.