Personal Computer News


Error-spotting BBC Routine

Categories: Letter

 
Author: Jonathan Temple
Published in Personal Computer News #092

Error-Spotting BBC Routine

This routine for the BBC will automatically list the line where an error has occurred so you can edit the mistake out quickly and easily.

To use the routine, include near the beginning of the line:

ON ERROR GOTO 10000

 
To see this routine in action, type it in and try this short demonstation:

10 ON ERROR GOTO 10000
20 PRINT"By Jonathan Temple"

 
The computer will print 'mistake' and then list 20.

10000 MODE 7: *FX4,0
10010 PRINT ' ':REPORT:VDU 10,152
10020 E$="L."+STR$(ERL)+CHR$(13)
10030 FOR L%=1 TO LEN(E$)
10040 A%=&8A:X%=&0:Y%=ASC(MID$(E$,L%))
10050 CALL &FFF4:NEXT
10060 END

Jonathan Temple
Beeston, Notts.

Jonathan Temple