Else, Elseif – Xylem System 5000 BASIC Manual User Manual
Page 23

21
Basic Commands and Functions
Begins an infinite loop encompassed by DO and LOOP. A BREAK or GOTO statement may be
used to leave the loop.
DO
REM Break out of the loop when our seconds are greater than 30
x = DATETIME(SECONDS)
IF (x > 30) BREAK
LOOP
DO
Used in conjunction with the SETNETWORK command, DNS will find or set the Domain
Nameservers to use for the network. Available parameters are AUTO or MANUAL. AUTO will
automatically find the nameservers (performed when the IP AUTO command is issued);
MANUAL sets the given parameter as the Preferred DNS. If another DNS MANUAL entry is
given, that entry will become the Preferred DNS, and the previous entry will move to the
Alternate DNS position.
SETNETWORK DNS AUTO
SETNETWORK DNS MANUAL, “192.168.0.6” REM set as Alternate DNS
SETNETWORK DNS MANUAL, “192.168.0.5” REM set as Preferred DNS
DNS
Optionally used as part of an IF statement to indicate a default branch if no other conditions are
evaluated as true.
var = 16
IF (var >= 21) THEN
PRINT “Adult”
ELSE
PRINT “Not Adult” REM prints “Not Adult”
ENDIF
ELSE
Optionally used as part of an IF statement to indicate another condition to evaluate. The option is
only evaluated if all previous options have resulted in FALSE.
var = 16
IF (var >= 21) THEN
PRINT “Adult”
ELSEIF (var >= 13) THEN
PRINT “Teen” REM prints “Teen”
ELSE
PRINT “Not Adult”
ENDIF
ELSEIF