Skip to content
This repository was archived by the owner on Aug 27, 2021. It is now read-only.
JBtje edited this page Jun 8, 2015 · 4 revisions

Syntax

IF <expression>
...
END
IF <expression>
...
ELSE
...
END
IF <expression>
...
ELIF <expression>
...
ELSE
...
END

Description

This code is rather self explaining. Besides mathematical operations, the following logical operators can be used.

&  and
|  or
^  xor
>  larger than
>= larger than or equal
<  smaller than
<= smaller than or equal
== is equal
!= is not equal

Example

NEW
10 IF A = 0
20 PRINT "A = 0"
30 END
40 DIM A = 2
50 IF A = 1
60 PRINT "This is not executed"
70 ELIF A > 1
80 PRINT "A=2"
90 END
RUN

The above code prints A=0 and A=2. Note that the variable A is 0 by default.

Clone this wiki locally