FANDOM


Syntax

IF statement [then-instructions] [else-instructions]

IF statement THEN instructions ELSE instructions

Explanation

IF runs the instructions if the result of the conditional statement is TRUE. If the conditional statement is FALSE, nothing is done unless ELSE follows the instructions.

See also IFFALSE and IFTRUE.

Examples

? TO TRY :NUMBER

> IF :NUMBER >100 THEN PR [THE NUMBER IS TOO BIG] STOP

> FD :NUMBER

> LT 90

> END

TRY defined.

? TRY 85

? TRY 105

THE NUMBER IS TOO BIG

?

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.