Symbols

###
Symbols

SIC allows the user to define symbols, which are abbreviations of any character string. Any command line is first parsed for symbols in the symbol table. The command interpretor assumes that the following entities may be symbols :

- the first word of command line (e.g. AA in command AA /OPTION)
- any string (without spaces) included between single quotes (e.g. 'AA'). This syntax may also indicate a character variable (See “Character Variables and Implicit Formatting”).

There is no recursive analysis of the line for the symbol translation. Note that, contrary to character variables, the symbol translation occurs even within strings, and that case does not matter.

Symbols are defined by issuing the following command

            SIC> SYMBOL TOTO "Whatever you want"

A symbol definition may refer to an other already defined symbol. Whenever 'TOTO' is found in a command line, it will be replaced by the string Whatever you want e.g.

            SIC> LABEL "Units 'TOTO'"

will be interpreted as

            SIC> LABEL "Units Whatever you want"

The Symbol Table can be listed using command SYMBOL without arguments. If SYMBOL has a symbol name for argument, the translation of this symbol is given. DELETE /SYMBOL TOTO will delete symbol TOTO from the current symbol table. Note that symbols should only include alphanumeric characters.