VOC K-Type Records - Keywords
Keywords affect the behaviour of commands or introduce optional components in the command syntax. Keywords are defined by K-type VOC records.
Each keyword is assigned a number which appears in field 2 of a keyword VOC entry.
Keywords with internal number 0 in field 2 are ignored by the query processor and some other parts of QM. They are provided to allow construction of more natural English sentences. For example, the THAN keyword can be used with other elements such as GREATER and LESS to allow a query such as
LIST STOCK WITH PRICE GREATER THAN 100
LIST STOCK WITH PRICE GREATER 100
Users can freely add new keywords with internal number 0 as required.
In some cases, a keyword is also needed as a command name (e.g. OFF which is a synonym for QUIT but also a modifier in several other commands). A keyword can never be the first token in a command. If the command processor finds a K-type VOC item used as the first token in a command, it looks for an alternative VOC record structure starting at field 3.
Thus, as an example, the OFF VOC entry reads
where fields 3 onwards contain an alternative V-type (verb) definition.
A summary of K-type VOC records may be displayed or printed using LISTK.