Revision 1.1
WebSwitch™ Users Manual
Supported Statements
The following are the statements supported by the ControlByWeb™ BASIC interpreter, a short
description of the statements, and their formats.
LET
The LET statement assigns a variable a value. The format is:
LET (variable) = (expression)
IF THEN, ELSE, END IF
The IF THEN statement tests the truth of a condition. The ELSE statement defines a second function if
the condition is found false. In other words, if the condition is true, then a function is performed. If it is not
true, a second function may be performed. The second function may or may not be necessary
depending on the application. The IF THEN (ELSE) statement must always be followed with an END IF
statement. The format is:
IF (variable) (=, <, >, <=, >=, <>) (expression) THEN
(Function 1)
ELSE
(Function 2)
END IF
Note: In most BASIC interpreters, 'Function 1' (see above) may be placed after the THEN statement.
This interpreter requires 'Function 1' to be put on the following line.
FOR TO, NEXT
The FOR TO statement loops a section of code a predefined number of times. The NEXT statement
always follows the section of code to be looped. The format is:
FOR (variable) = (expression) TO (expression)
(code to be looped)
NEXT (variable)
DO WHILE, LOOP
The DO WHILE statement loops a section of code while a condition is found true. The LOOP statement
always follows the section of code to be looped. Note that if the condition is omitted, the code will be
looped without end. The format is:
DO WHILE (variable) (=, <, >, <=, >=, <>) (expression)
(code to be looped)
LOOP
Xytronix Research & Design, Inc.
99