4 TRON
5 OPEN "output" FOR OUTPUT AS 1
7 ON ERROR GOTO 1000
10 PRINT#1, "A"
20 GOTO 110
100 FOR I= 1 TO 10
110 PRINT#1, I
115 GOTO 130
120 RESUME NEXT
130 PRINT#1, "B"
140 NEXT
200 FOR I= 1 TO 10
210 PRINT#1, I
215 GOTO 230
220 ELSE NEXT
230 PRINT#1, "C"
240 NEXT
300 FOR I= 1 TO 10
310 PRINT#1, I
315 GOTO 330
320 ELSE NEXT
330 PRINT#1, "D"
340 NEXT
999 CLOSE:END
1000 PRINT#1, "error:", ERR, ERL: PRINT ERR, ERL: RESUME NEXT
