FANDOM


BREAK is a reserved word, used as an input for the DEFEVENT command. It allows you to define a procedure which will be called whenever the Control-G key is pressed. The built-in Logo procedure stops all background procedures as well as the timer event procedure and returns to toplevel.

You should redefine the BREAK procedure with great care. If you do not issue a TOPLEVEL command in your procedure, your Logo programs cannot be interrupted.

Example

The following procedure may act as a replacement procedure for the built-in break procedure. Before returning to toplevel, however, you are asked whether you want to break at all. Note that all background tasks are halted with the HALT command.

TO MY.OWN.BREAK

LOCAL "ANSWER
PR "BREAK!
TYPE [RETURN TO TOPLEVEL? |(Y/N)|]
MAKE "ANSWER RC
(PR)
IF :ANSWER = "Y THEN (HALT) IGNORE TIMER "FALSE TOPLEVEL

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.