- Edited
OK, so I'm converting this program and I get this error after playing it for a while. Now I'm pretty sure that this is caused by some of the FOR...NEXT loops not cleaning up properly, but I need to know how to do it in BASIC Engine.
There are several FOR...NEXT loops that use a GOTO to exit it prematurely. The original BASIC may have been more tolerant of this, but BASIC Engine does not detect and clean up the short circuit.
My question is, how can I cleanly exit the FOR...NEXT loop early?
For example:
10 FOR I=1 TO 10
20 FOR J=1 TO 20
30 <do something>
40 IF <conditional> THEN 60
50 NEXT J
60 <do something else>
70 NEXT I