VOC PA-type records - Paragraphs

VOC PA-Type Records  -  Paragraphs

Top  Previous  Next

 

A paragraph is a sequence of stored commands or sentences which will be executed in turn by entering the paragraph name in response to the command prompt.

 

1:PA  { descriptive text }
2:First sentence
3:Second sentence
4:etc...

 

Field 1 of the VOC paragraph record commences with PA, fields 2 onwards are the commands to execute. Any sentence within the paragraph may be broken into shorter parts by using the underscore character to indicate that the command continues on the next line.

 

The Cn and In control codes of inline prompts may be used to substitute additional text from the sentence that started the paragraph into the commands within the paragraph.

 

Paragraphs may contain a number of special commands and constructs that are not allowed in sentences. These are

DATAEmbedded data for an application
IFConditional execution
GOJumps to labels
LOOPRepeated execution of a loop
$ECHOTrace execution of the paragraph

 

Comment lines may be included in a paragraph. These have an asterisk as the first non-space character. There must be at least one space between the asterisk and the actual comment text. Note that expansion of inline prompts is the first action of the command processor and hence inline prompts are evaluated in comment lines. This slightly odd behaviour is useful in controlling the timing and sequence of inline prompts independently from the use of their substitution text.

 

Paragraphs may invoke other paragraphs. Beware of accidental recursive invocation of the same paragraph.

 

 

There are four reserved paragraph names for special functions. These are:

 

LOGINExecuted on entry to QM and also when the LOGTO command is used to switch to a new account.

 

ON.LOGTOExecuted on use of the LOGTO command before switching to the new account.

 

ON.EXITExecuted on leaving QM by use of the QUIT command.

 

ON.ABORTExecuted when QM aborts a program.

 

The QMSYS account may contain a paragraph with a further reserved name:

 

MASTER.LOGINExecuted on initial entry to QM in any account before the LOGIN paragraph.

 

For more details of the above, see Command Scripts.

 

 

A summary of PA-type VOC records may be displayed or printed using LISTPA.