The command function is used to alter various long term states of the editor and to perform other actions. After entering the command function (Esc-X), a prompt for the command name is issued. The following commands are available:
BASIC | Saves the current record and runs the Basic compiler. This command is similar to COMPILE (described below) but it inserts marker lines into the source program where error or warning messages have been produced by the compiler. |
BWORD | Sets Basic Word mode for search and replace functions as described for the forward search function. |
CASE_OFF | Sets Case Insensitive mode for search and replace functions. |
CASE_ON | Sets Case Sensitive mode for search and replace functions. |
COMPILE | Saves the current record and runs the Basic compiler. For compatibility with SED on other platforms, if this record includes a line |
*$CATALOG catname
the compiled program will be catalogued automatically after successful compilation. The actual cataloguing command issued is
CATALOG filename catname recordname
It is thus possible to perform either private or global cataloguing. The same action can be performed on QM using the $CATALOG compiler directive.
EXPAND.TABS | Expands tab characters in the record being edited to align data on the columns determined by the current setting of the tab interval. The default tab columns are 11, 21, 31, etc. |
FORMAT | Applies standard format rules to the layout of a QMBasic program. |
FUNDAMENTAL | Reverts to the default (fundamental mode) key bindings. |
INDENT | Toggles indent mode. |
KEYS | Displays the name of the active key binding record. |
LNUM | The LNUM command controls display of line numbering. Used alone, it toggles the current state of numbering on the displayed buffer. It may also be used with the following qualifiers: |
OFF | Turn off line numbering in the current buffer. |
ON | Turn on line numbering in the current buffer. |
ALL | Turn on line numbering in all buffers. |
OFF ALL | Turn off line numbering in all buffers. |
LOAD.KEYS | Loads a named key binding record. |
OVERLAY | Toggles overlay mode. The OVERLAY function (Ctrl-O) has the same effect. |
QUIT | Ends editing of the current record in a similar way to the quit key sequence but also aborts any select list. |
RELEASE | Releases the update lock on the current record. |
RUN | Entering RUN with no qualifying details runs the program in the current buffer (which must have been compiled). |
SAVE.KEYS | Saves the key bindings as described later. |
SPOOL | Spools the contents of the current buffer to print unit zero. |
The SPOOL command has optional qualifiers which may be used together if required. LNUM adds a line number prefix to each line printed. REGION prints only the lines between the mark and the cursor (which may be in either order). AT followed by a printer name selects the destination printer.
TABS | Sets the tab interval to be used by the tab function and the EXPAND.TABS command. The value given after TABS must be in the range 1 to 99. |
WORD | Sets Word mode for search and replace commands. |
XEQ {cmnd} | Executes QM command cmnd. The XEQ command prefix is only required where cmnd is also an internal SED command. All commands not recognised by SED are passed to the command processor for execution. |
The command function maintains a stack of the last 100 commands executed. The up line and down line functions can be used to restore commands from the stack when the command prompt is displayed.
|