[net.micro.apple] Error handling in Applesotf BASIC

cce (03/10/83)

The Applesoft BASIC programming reference manual states in page 81:

"Care must be taken when handling errors that occur within FOR...NEXT loops
or between GOSUB and RETURN, as the pointers and RETURN stacks disturbed.
The error-handling routine must *restart* the loop, returning to the FOR or
GOSUB statement, *not* the NEXT or RETURN statement. After error handling,
a return to a NEXT or a RETURN will cause the appropriate message:
?NEXT WITHOUT FOR ERROR or ?RETURN WITHOUT GOSUB ERROR"

I am trying to port a BASIC program written for the TRS-80 with extensive
error handling.  My problems/questions (flames?) are:
-How 'disturbed' does the stack get?
-Is this a bug or a feature?
-Does this mean that you can not do error handling within a subroutine?
(only within the main body?). Any solutions?