Here are two pieces of code. The first produces no error; the second
produces an error.
What in the world is the relevant difference between the two pieces of
code? (Turning the colons into newlines did not solve the problem.)
I am using blassic version 0.10.0.
The following code WORKS:
DIM EX(4,5)
FOR I=1 TO 4
FOR J=1 TO 5
READ EX(I,J)
NEXT J
NEXT I
INPUT "GROUP";G
INPUT "NUMBER";N
PRINT EX(G,N)
DATA 1,2,3,4,5, 6,7,8,9,10
DATA 11,12,13,14,15, 16,17,18,19,20
The following code DOES NOT WORK:
5100 DIM EX(24,4)
5170 FOR I=1 TO 24: FOR J=1 TO 4: READ EX(I,J): NEXT J: NEXT I
6220 DATA 0,0,2,0, 0,0,3,1, 0,0,4,2, 0,0,5,3
6230 DATA 0,0,6,4, 0,0,0,5, 0,0,8,0, 0,14,0,7
6240 DATA 0,15,0,0, 0,16,0,0 5,17,12,0, 0,18,0,11
6250 DATA 7,0,0,0, 8,0,15,0, 9,21,16,14, 10,22,17,15
6260 DATA 11,23,18,16, 12,24,0,17, 0,0,20,0, 0,0,21,0
6270 DATA 15,0,0,20, 0,0,0,0, 17,0,24,0, 18,0,0,23
--- In blassic@yahoogroups.com, "not_found_blassic"
<julian.notfound@...> wrote:
>
> Hello.
>
> > then when I called it with
> >
> > FOR I=1 TO 24
> > FOR J=1 TO 4
> > READ EX(I,J)
> > NEXT J
> > NEXT I
> >
> > I got Syntax horror in the line READ EX(I,J). I do NOT have this
>
> Maybe the error is in the DATA statement. In that case, the line
> number reported is the one that contains the READ instruction.
>
> If not, please post a short a program that shows the problem and the
> version of Blassic you are using.
>
> Regards.
>