bwbasic
bwbasic copied to clipboard
next without for
I wrote a little program with nested set of loops, and the program crashed with a next without for error reported at the NEXT of the outer loop. The program runs fine on a couple of other interpreters, Blassic and PC Basic. Here's the code: 100 IF ((D=0) OR (D=-2)) THEN D=D+1:REM avoid divide by 0 110 FOR N=-100 TO 100 120 X=3N + 6N/D - 5 130 IF ABS(N-X)<1E-12 THEN PRINT D,N,X 140 REM chr$(27) is escape key 150 A$=INKEY$:IF A$=CHR$(27) THEN 180 160 NEXT N 170 NEXT D