up.zw

Command/Update Processor, Releases: AP

Writes prestore buffer into a specified item.

Syntax

<ctrl>+zw{(file.reference} item-id<return>

Description

writes the contents of the prestore buffer to a file for reuse.

'<ctrl>+zw' causes the Update processor to prompt:

Prestore id:

This displays at the top left corner of the terminal. At this time an item-id may be specified or a file.reference and item-id may be specified.

If only an item-id is entered, the prestore item is saved in the current master dictionary (md). If the md already has an item with the specified item-id, the following prompt displays at the top left corner of the screen :

'prestore.id' item exists on file, press 'y' to overwrite:

If any key other than 'y' is typed, the prestore item is NOT saved. If 'y' is typed, the md item that was on file is overwritten with the prestore command.

If the response to the prompt for Prestore id is a file.reference and item-id, the item is written to the designated file with the specified item-id. The format of the saved item is :

attribute 1 = p
attribute 2 = prestore command

Example

The following example shows a prestore command composed of only a literal
string, with no UP commands. Since there is no file.reference specified in
response to the Prestore id prompt, the command is saved in the md.

:u document document.id
invoke UP to edit document
<ctrl>+zl
command to define prestore
P:
terminal prompt
'This is text'<return>
actual prestore command
<ctrl>+zw
command to save prestore
Prestore id:
terminal prompt for item-id
id<return>
user-defined item-id


The next example shows a prestore command consisting of UP commands and text.
This command does the following :

mm
issues two carriage returns
r
puts UP in insert mode
'This is text'm
Text to insert, plus a <ctrl>+m (return)
r
puts UP back in overtype mode

The command is saved in the file 'commands' with the id of
'holdit'.

u document document.id
invoke UP to edit document
<ctrl>+zl
command to define prestore
P:
terminal prompt
mmr'This is text'mr<return>
actual prestore command
<ctrl>+zw
command to save prestore
Prestore id:
terminal prompt for item-id
(commands holdit<return>
user-defined file and item-id

The file commands 'holdit' contains the following :

01 P
02 mmr'This is text'mr

See Also

Command Name Type Description
up.prestore Command Description of UP prestored commands.
up.zl Command To edit or create a prestore command in the prestore buffer.
up.p Command Executes the command in the prestore buffer.
up.z Command Initiates several separate UP commands.
up.za Command Redisplays item or searches through tcl-stack.
up.zb Command Redisplays item, placing current line at bottom of screen.
up.zc Command Displays column position guide.
up.zd Command Deletes all text to end of item.
up.ze Command Moves cursor to end of item.
up.zg Command Moves cursor to end of previous paragraph.
up.zh Command Moves cursor down one-half page.
up.zn Command Moves cursor to the beginning of next page.
up.zo Command Deletes all text to end of paragraph or attribute.
up.zy Command Moves back a page.
update.processor Definition a dictionary-driven, full-screen editor and data processor.
up Introductory
updte.processor Definition a dictionary-driven, full-screen editor and data processor.

User Comments

What do you think?

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

Login to leave your comments.