THEN

Syntax

IF conditional THEN instructionlist

Explanation

THEN denotes the operational clause in an IF...THEN statement. If the conditional input to IF is TRUE, then the Logo instruction list following THEN is executed. If the conditional is FALSE, then the Logo instruction list following THEN is not executed. If there is an ELSE clause, the Logo instruction list following ELSE is executed.

See also IFFALSE and IFTRUE.

Example

? TO ASK.OPINION

>    PRINT [DO YOU THINK LOGO IS FUN?]

>    MAKE "OPINION FIRST READLIST

>    IF :OPINION = "YES THEN PRINT[I THINK SO TOO!]

> END

ASK.OPINION defined.

? ASK.OPINION

DO YOU THINK LOGO IS FUN?

? YES

I THINK SO TOO!

?