Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileON BREAK ON BREAK CONT ON BREAK GOSUB proc proc: procedure name These three commands control the response to the simultaneous pressing of the Control, Shift (left shift-key only), and Alternate keys. Normally, pressing this key combination causes the termination of a program but, it can also be used to call a particular procedure. To do this, the procedure to be called is defined by means of the instruction ON BREAK GOSUB proc. When an ON BREAK CONT is present in a program, the Control, Shift, and Alternate key combination is deactivated. An ON BREAK reactivates this key combination once again. Example: ON BREAK GOSUB test PRINT "Press CONTROL, SHIFT, (the left one) and ALTERNATE" DO LOOP ' PROCEDURE test PRINT "that was it" ON BREAK RETURN --> The request to press the key combination is displayed. When they are pressed, the procedure 'test' switches the normal BREAK routine on again. Memo: Return code will be -128 if the program is stopped (compiled). For compiler related options see sections 'Interrupt Routines' and 'Checking the BREAK keys, EVERY and AFTER'. If the procedure used with ON BREAK GOSUB is undefined the compiler will not issue an error message. Instead the compiler writes a bad binary where ON BREAK GOSUB is translated into JSR 0.l! The editor does not report a missing procedure with ON BREAK GOSUB.