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-FileTRON proc TRACE$ proc: procedure name With help of the instruction 'TRON proc', a procedure can be specified which is called before the execution of each individual command. The variable TRACE$ then contains the command which is to be processed next. The command TRON proc makes for very efficient error tracing when used in conjunction with TRACE$. In addition, as well the next command to be processed being displayed, specified variables can be output to screen or printer, allowing changes in the variables to be followed during the course of the program run. It is important that the TRON procedure should not affect the program itself while running, so while in use, no PRINT commands should be made to the screen (TEXT, ATEXT, ...) and the use of VDI routines should be avoided because of GDOS's use of DEFTEXT, Line-A, etc. Example: TRON tr_proc GRAPHMODE 3 DO UNTIL MOUSEK x1%=100+RAND(200) y1%=100+RAND(100) x2%=200+RAND(200) y2%=200+RAND(100) PBOX xl%,y1%,x2%,y2% LOOP ' PROCEDURE tr_proc IF BIOS(11,-1) AND &X100 ! Control key adr%=XBIOS(2) BMOVE adr%+1280,adr%,4*1280 PRINT AT(1,5);SPACE$(80); PRINT AT(1,5);LEFT$(TRACE$,79); PAUSE 20 ENDIF RETURN --> This program draws randomly-distributed rectangles on the screen. Pressing the Control key causes the command just processed to appear on the screen. The program is terminated by the pressing of a mouse button. Memo: TRON is not usable in compiled applications. The editor does not report a missing procedure with TRON proc.