Parent Topic: Language
IF cond THEN IF cond THEN IF cond THEN
statement; statement; statement;
... ... ...
statement; statement; statement;
EXTRIF cond THEN ELSE ENDIF;
statement; statement;
... ...
statement; statement;
ELSE ENDIF;
statement;
...
statement;
ENDIF;
`statement' can be an ASSIGNMENT, GOTO, LABEL, STOP or another IF
statement.`cond' is a condition made up of a series of logical expressions joined by logical operators. This has the syntax:
(exp relopr exp) logopr (exp relopr exp) ...Where:
exp is an arithmetic or character expression relopr is a relational operator logopr is a logical operatorThe following relational operators are available and will work on either arithmetic or character expressions:
= equals > greater than < less than >= greater than or equal <= less than or equal <> not equalThe following logical operators are available:
and orExample:
if (%tree.2 = "spruce") and (%rain > 10) then
%result = 5;
else
%result = %rain / 3;
endif;