100 REM Purpose: Verify ON ERROR GOTO is local to FUNCTION/SUB
110 REM  Author: Howard Wulf, AF5NE
120 REM    Date: 2015-02-05
130 REM
140 FUNCTION tom()
150 ON ERROR GOTO HELL
160 ERROR 1
170 PRINT "*** TEST FAILED ***"
180 STOP
190 HELL:
200 PRINT "*** TEST PASSED ***"
210 END FUNCTION
220 ON ERROR GOTO MAINHELL
240 tom
250 GOTO 900
260 MAINHELL:
270 PRINT "*** TEST FAILED ***"
280 STOP
900 PRINT "*** TEST PASSED ***"
999 END
