Files
gw-basic-2026/tests/programs/error_handler.bas
Eremey Valetov 9ca23e5d10 Fix variable names with digits, ERL, update docs
- Tokenizer now copies entire identifier (letters+digits) when no
  keyword matches, fixing variables like K2, V1, AB3%
- ERL returns actual error line number instead of 0
- Update README and Sphinx docs for v0.5.0
2026-02-10 17:01:50 -05:00

12 lines
289 B
QBasic

10 REM ON ERROR GOTO / RESUME test
20 ON ERROR GOTO 100
30 PRINT "Before error"
40 ERROR 5
50 PRINT "After resume"
60 PRINT "Triggering div by zero"
70 X = 1 / 0
80 PRINT "After second resume"
90 PRINT "Error handler OK" : END
100 PRINT "Caught error"; ERR; "at line"; ERL
110 RESUME NEXT