User Guide

Software Crestron SIMPL+
®
90 z SIMPL+
®
Language Reference Guide - DOC. 5797G
Description:
Executes a piece of code only if its associated <expression> evaluates to true. Many
expressions can be tested if the IF-ELSE-IF construct is used. Note that only one
<statements> block in an IF-ELSE or IF-ELSE-IF construct is executed. In any
section of the construct, if <statements> is only a single statement, then the { and }
characters may be omitted.
Example:
STRING_INPUT IN$[100];
STRING Y$[100];
INTEGER X;
IF (IN$ = “STRING1”)
{
X=5;
Y$ = IN$;
}
ELSE
{
X=6;
Y$ = ““;
}
In this example, if IN$ is equal to STRING1, then the first two statements are
executed. If IN$ is a different value, then the second groups of statements are
evaluated. A more complex IF-ELSE-IF construct appears as:
IF (IN$ = “STRING1”)
{
X=5;
Y$ = IN$;
}
ELSE IF (IN$=”STRING2”)
{
X=6;
Y$ = ““;
}
ELSE
{
X = 7;
Y$ = “ZZZ”;
}
Version:
SIMPL+ Version 1.00