EXit
Interface instruction: leave Interface and return to AMOS Professional Basic
EX;
The EXit command must always be the last instruction in an Interface program. It is used to return to the more familiar environment of AMOS Professional Basic programs, by informing I lie system that the last line of an Interface program has been reached. If the EXit command is omitted, a syntax error will be generated when the routine is tested or run.
Variables and numbers
The AMOS Professional Interface provides a standard way of performing calculations, and
saving the results into variables.
All Interface programs have their own list of variables, stored in an internal array. These variables have exactly the same format as ordinary AMOS Professional numbers.
Each variable is referred to by an index number, from zero upwards. However, instead of reading an array in the conventional way, like this:
X> VARIABLE(index number)
Interface variables must have the item number placed first, like this:
X> index number VARIABLE
VAriable
Interface function: return value held by an index
value=index number VA;
VA will return the value associated with the item number index, making it available for your Interface program. As a default, up to 17 variables can be used at one time, but this number can be increased via the DIALOG OPEN command, which is explained later.
Setting a variable
Set Variable
Interface instruction: set an Interface variable
SV index number,value;
Setting a variable for the AMOS Professional Interface is very easy. Simply give the command, followed by the number of the variable to be changed and the value to be entered. Interface variables are not limited to numbers, and complete strings of characters may be assigned as necessary. For example:
X> SetVar 0,42: this loads the value forty two into item number zero. SetVar 1,'The answer is'; this loads a string into item number one.