VOC S-type records - Sentences

VOC-S Type Records  -  Sentences

Top  Previous  Next

 

Where a particular command is executed frequently, it may be useful to store it as a sentence.

 

1:S  { descriptive text }
2:Sentence text

 

A sentence is a command containing a verb and, optionally, its arguments. Sentence names may be entered in response to the command prompt in the same way as a verb. Any arguments following the sentence name on the command line entered at the keyboard will be appended to the sentence retrieved from the VOC.

 

Field 1 of a VOC sentence record must commence with a letter S. Field 2 holds the text of the sentence. This text replaces the sentence name in the current command and parsing continues with the first word of the substituted sentence.

 

Where a sentence is very long it may be broken into multiple lines within the VOC record by terminating all but the final line with an underscore character. When the sentence is executed, the lines are merged, replacing the underscore with a single space.

 

Any additional text following the sentence name in a command that starts the sentence will be appended to the sentence expansion retrieved from the VOC. For example, the EDIT.LIST command is actually a sentence stored as

1:  S

2:  ED $SAVEDLISTS

 

Typing

EDIT.LIST MYLIST

actually executes the command

ED $SAVEDLISTS MYLIST

This automatic appending of additional text in the command makes stored sentences very useful as the start of commands but prevents effective use of some inline prompt control codes in the sentence expansion.

 

 

A summary of S-type VOC records may be displayed or printed using LISTS.