EXECUTES THE NEXT STATEMENT OR THE NEXT BLOCK OF STATEMENTS IF THE CONDITION IS FALSE
ACTION
The statements after the ELSE are executed if the evaluation of the logical condition after IF gives a false result.
The "condition" is a single logical expression (built with comparators >, <, >=, <>, =, ...) or a complex expression combined with logical operators AND, OR, NOT and parenthesis. Only the result (True or False) is used to execute or not the following statements.
IF Condition
Statement(s)
ELSE
Statement(s)
END_IF
If the condition is true, the statement or the block of statements between IF and ELSE is executed. Otherwise, the statement or the block of statements between ELSE and END_IF is executed.
SYNTAX:
IF C
USE ERROR EXAMPLE
dim a,b
a=1:b=2
if b>a
print "b is greater than a"
else
print "b is less than or equal to a"
end_if
ELSE
ELSE
SEE ALSO
THEN
END_IF
WHILE
END_WHILE
REPEAT
UNTIL
AND
OR
NOT