SIC_LOAD(LANG,HELP,MCOM,VOCAB,VERSION)LANG is a Character constant (less than 12 characters) which gives the name of the language. LANG need not be distinct from the command names, and it must not include the character
CHARACTER*12 VOCAB(MVOCAB) INTEGER SIC_COMMANDS,USER_COMMANDS PARAMETER (SIC_COMMANDS=34) PARAMETER (USER_COMMANDS=MVOCAB-SIC_COMMANDS) DATA VOCAB/ + ' BREAK', ' CONTINUE', '$DCL', '/PROCESS', + ' DEFINE', '/GLOBAL', ' DELETE', '/SYMBOL', + '/VARIABLE', '#EDIT', ' ELSE', ' ENDIF', + ' EXAMINE', '/GLOBAL', '#EXIT', ' FOR', + '/WHILE', '*HELP', ' IF', ' LET', + '/NEW', '/PROMPT', ' NEXT', ' ON', + ' PAUSE', '#QUIT', '#RECALL', ' RETURN', + ' SAY', ' SIC', '$SYMBOL', '/INQUIRE', + '*TYPE', ' @', USER_COMMANDS*' '/The first character code is interpreted as follow
The * code can also be used for complex commands using alphanumeric keywords that you wish to expand yourself before saving them in the Log_File and the Stack, or for commands that may require to output several records (See SIC_INSERT, SIC_LOG and SIC_LIRE). The GreG command DRAW is an example of this.
The programmer should be careful about deciding what attribute to give to any command. All the options referring to a command must immediately follow it. At initialization time, SIC recognizes the options and set up a table of pointers connecting the options to their respective commands. A failure to respect the adequate order results in a very strange vocabulary.
Finally, VERSION is a character string which must contain the version number, and may contain the date of last modification, the name of the programmer,... The following example is recommended for optimum presentation (respect the alignment of the date for different languages):
VERSION='1.0 21-APR-1984 Programmer Name'
In addition to setting the vocabulary, the programmer must decide the program prompt, the log file and the Stack usage. This is entirely optional because SIC provides default setups, and it is done using routine
SIC_OPT (PROMPT,LOGFILE,MEMORY)where PROMPT is a character string (less than 8 characters) defining the prompt (SIC adds automatically the caret > at end of prompt), LOGFILE is a character string defining the Log_File for the session and MEMORY is a logical flag defining the Stack usage. There two modes for Stack usage: the first mode defines the Stack as an internal procedure which is entirely at the disposition of the user (MEMORY=.FALSE.), the second mode defines the stack as an internal Log_File, in which almost all commands (with the restriction in the command code) typed at the top level in Read Mode are automatically written to the Stack (MEMORY=.TRUE.). This mode provides a playback capability for interactive sessions. Modes can be commuted at run time using SIC command SIC MEMORY .
Default values are 'SIC', 'LOG' and .TRUE. respectively. Hence, if you use the defaults, the Log_File can also be defined by an assignation to logical name LOG. The call to SIC_OPT is completely effective if placed before any call to SIC_LOAD. Otherwise, only the prompt will be changed.