if total_count_ = 163 then -- when total count
turn rows yellow -- of music is 163,
endif -- whole tree is yellow
|
The if statement is like unto the PASCAL or BASIC "IF".
The syntax is the word if followed by a comparison and finally by
the word then.
The entire construct is enclosed by the words if and endif.
Optionally, there may also be an else clause:
if n \ 2 = 0 then
turn row i green
else
turn row i blue
endif
There may be as many statements in each clause (between if and else,
and between else and endif) as needed.
Conditions
The following operators may be used:
= equality
< less than
> greater than
<= less than or equal to
>= greater than or equal to
<> not equal to
Comparisons may be made between integers and between colors. Expressions should be
used with fear and trembling; there are no guarantees that the compiler will handle
them correctly. (In theory, you should be able to use any expression valid in C,
including Boolean variables, but some of my theories aren't borne out in reality.)