|Syntax||IF expression [then-instructions]
IF expression [then-instructions] [else-instructions]
IF expression THEN instructions
IF expression THEN instructions ELSE instructions
|Explanation||IF runs the first set of instructions if the result of the expression is TRUE. If the expression is FALSE, the second set of instructions, if present, is run.|
|Examples||TO TRY :NUMBER
IF :NUMBER >100 THEN PR [THE NUMBER IS TOO BIG] STOP
THE NUMBER IS TOO BIG
PRINT "|Do you want to play again?|
IF RQ = "Y [GAME] [PRINT "|Thanks for playing!| TOPLEVEL]
Do you want to play again?
Thanks for playing!