FANDOM


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!

?

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.