FANDOM


Syntax

TOPLEVEL

Explanation

TOPLEVEL stops execution of a procedure and returns Logo to toplevel, the command mode. TOPLEVEL is the primitive to use in a procedure to perform the same function that Control-G does from the keyboard.

Note that TOPLEVEL is different from STOP in that control is not returned to any calling procedure.

Example

The procedure below can be used as a subprocedure of a game program. If the player wants to end the game, the procedure returns to toplevel.

TO ENDALL

PR [DO YOU WISH TO CONTINUE?]
PR [PLEASE TYPE YES OR NO]
MAKE "ANSWER READLIST
IF :ANSWER = [YES] THEN GAME
IF :ANSWER = [NO] THEN PR[THAT'S ALL FOR THIS GAME.] TOPLEVEL ENDALL

END

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.