512 gains its new cause: a branch by number to a line the program did not
number. PARSE ERROR is what the prescans report as, since they run before
any statement does, so the class table says so.
514 claimed a branch to a line that does not exist raises it. Nothing does
-- AKBASIC_ERR_UNDEFINED comes from label, variable, field and host-struct
lookups only, and GOTO 500 with no line 500 walks to the end and stops.
That was already wrong before this work; it is more visible now that a
branch to a line that does exist can be refused.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ER# held numbers nothing explained. The appendix lists the four error classes
the interpreter prints, the eight codes it owns and what raises each, and the
codes that reach ER# from errno, libakerror and libakgl underneath it.
The table is not asserted. A program in the chapter trips seven of the eight and
prints what it got, and docs_examples byte-compares the result -- so the numbers
are checked rather than claimed. The eighth, 516, is not usefully trappable and
the chapter says why: entering a handler takes a scope, and the pool being empty
is what raised it.
Two things worth a reader's attention came out of writing it. Two codes register
the same ERR() text, so a program must compare the number and print the text.
And VAL reports libakerror's Value Error rather than the interpreter's 517,
which makes that number the platform's rather than ours -- filed as section 6
item 21, not fixed here, because deciding which libakstdlib failures to
translate is a boundary question and ENOENT out of DOPEN is the counter-case.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>