Skip to content

Script Expressions

An expression can be either a test expression or an action expression. An expression can occupy several rows. Several action expressions can be separated by a ";".

A test expression is an expression that returns a value. It can only be used in an IF or ELSE IF statement, or in an assignment ("variable = test expression"). Note that an assignment can be used in an IF or ELSE IF statement, where the test will be if the value is zero (false) or non-zero (true).

Examples of test expression:

COMMENTcall subroutine 10 if var is greater than 5
IFvar > 5
THENCALL SR10;
COMMENTincrement loop index and compare if
loop is finished, otherwise go back
IF(ix = ix + 1) < 10
THENGOTO POS10;
COMMENTcheck if flag variable is true
(non-zero), then clear flag and take action
IFreadyflag
THENreadyflag = 0; CALL SR20;

An action expression is an assignment or an instruction. Several assignments can be performed after each other.

COMMENTreturn if all is done
IFalldone
THENRETURN;
COMMENTseveral assignments
DOvar1 = var2 = var3 * 10;