IF statements

IF - THEN (-ELSE) is conditional statement in Petit Computer. The full syntax is

Conditions may optionally be surrounded in parentheses. Multiple statements may be included after THEN or ELSE with the : separator. The ELSE and subsequent commands are optional; if included, those commands will be executed when condition is not satisfied.

Conditions
Conditions are often written with Relational Operators, e.g. . Additionally:


 * The form  will evaluate to true unless X is 0
 * The form  will evaluate to true only when X is 0 (see ! (Operator))

Multiple conditions may be considered with the AND, OR, and XOR operators, e.g.: