IF/SELECT
IF statements are the primary conditional instructions. They evaluate whether a condition is true, and execute a Jump or Call if it is.
If it is not true, the instruction will occur as if the line were blank.
IF | Variable | Math | Variable | Action | Destination |
---|---|---|---|---|---|
IF | R[1] | = | 1 | Call | Program1 |
IF | DI[3] | = | ON | JMP | LBL2 |
Additionally, when selecting the action field, another condition can be added with the AND or OR selection. When wanting to make a large list of possible conditions for each variable, you'll likely want to use the SELECT option.
SELECT | Variable | Math | Variable | Action | Destination |
---|---|---|---|---|---|
SELECT | R[1] | = | 1 | Call | Program1 |
= | 2 | Call | Program2 | ||
= | 1 | Call | Program3 | ||
Else | JMP | LBL2 |