Elseif, Endif – Xylem STORM 3 Basic Programming manual User Manual
Page 17

15
Commands and Functions
Optionally used as part of an IF statement to indicate another condition to evaluate. The option is
evaluated if all previous options have resulted in FALSE. Multiple ELSEIF conditions may be tested
If the condition evaluates to TRUE, all following conditions will not be tested.
var = DATETIME(MINUTES)
sync = 0
IF (var == 0) THEN
sync = 1
ELSEIF (var == 15) THEN
sync = 2
ELSEIF (var == 30) THEN
sync = 3
ELSEIF (var == 45) THEN
sync = 4
ELSE
sync = -1
ENDIF
ELSEIF
Immediately ends the Basic program. Optional if used as the last statement.
var = DATETIME(MINUTES)
IF (var == 0) THEN
REM if top of the hour, end the program
END
Declares the end of a multi-line IF-THEN statement. Not required on single-line if statements.
var = DATETIME(MINUTES)
sync = 0
IF (var == 0) THEN
sync = 1
ELSEIF (var == 30) THEN
sync = 2
ELSE
sync = -1
ENDIF
ENDIF