Closed robhagemans closed 2 years ago
https://sourceforge.net/p/pcbasic/discussion/bugs/thread/49a22a070f/#3764
If the value of the expression higher than the quantities of the line numbers after GOSUB, a SYNTAX ERROR occurs:
10 A = 3 20 ON A GOSUB 30, 40: END 30 PRINT "1": RETURN 40 PRINT "2": RETURN
https://sourceforge.net/p/pcbasic/discussion/bugs/thread/49a22a070f/#3764/2f87
I can confirm this and that GW-BASIC doesn't do this. The program just ends there.
Fixed on develop by commit 09cb303eb, thanks @rbergen !
develop
https://sourceforge.net/p/pcbasic/discussion/bugs/thread/49a22a070f/#3764
If the value of the expression higher than the quantities of the line numbers after GOSUB, a SYNTAX ERROR occurs:
10 A = 3 20 ON A GOSUB 30, 40: END 30 PRINT "1": RETURN 40 PRINT "2": RETURN
https://sourceforge.net/p/pcbasic/discussion/bugs/thread/49a22a070f/#3764/2f87
I can confirm this and that GW-BASIC doesn't do this. The program just ends there.