10 REM PC-BASIC test 
15 OPEN "ERROR.TXT" FOR OUTPUT AS 1
30 ON ERROR GOTO 100
40 ERROR
50 END
100 REM
110 PRINT#1, ERR, ERL, I
120 CLEAR
130 ON ERROR GOTO 1000
140 ERROR
1000 OPEN "ERROR2.TXT" FOR OUTPUT AS 2
1010 PRINT#2, ERR, ERL
1020 CLOSE
