4 TRON
5 OPEN "output" FOR OUTPUT AS 1
7 ON ERROR GOTO 1000
10 A=0:WHILE A < 100 PRINT
20 PRINT#1, A
30 A = A*2+1
40 WEND
110 A=0:WHILE A < 100
120 PRINT#1, A
130 A = A*2+1
140 WEND PRINT
210 A=0:WHILE A < 100
220 PRINT#1, A
230 A = A*2+1
240 WEND A
310 A%=0:WHILE A% < 100
320 PRINT#1, A%
330 A% = A%*2+1
340 WEND
310 A#=0:WHILE A# < 100
320 PRINT#1, A#
330 A# = A#*2+1
340 WEND
999 CLOSE: END
1000 PRINT#1, "error:", ERR, ERL: PRINT ERR, ERL: RESUME NEXT
