The Bywater BASIC Interpreter (bwBASIC) implements a large superset of the ANSI Standard for Minimal BASIC (X3.60-1978) and a significant subset of the ANSI Standard for Full BASIC (X3.113-1987) in C.
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
The following little program did a major error in handling read statements to assign to a string array in a loop. Instead of putting the data terms into the string array, it put the array index numbers into the array (1-7).
30 REM NEXT SEVERAL LINES FILLS PLACE NAME ARRAY
40 DATA ONES,TENS,HUNDREDS,THOUSANDS,TEN_THOUSANDS,HUNDRED_THOUSANDS,MILLIONS
50 DIM NUM$(10)
60 FOR I=1 TO 7:READ NUM$(I):NEXT