Search the web
Sign In
New User? Sign Up
blassic · Blassic, the Classic Basic.
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Reading "two=dimensional" data arrays   Message List  
Reply | Forward Message #170 of 233 |
Re: [blassic] Re: Reading "two=dimensional" data arrays

6240 DATA 0,15,0,0, 0,16,0,0¿? 5,17,12,0, 0,18,0,11

2008/4/1, Hertz <atticshek@...>:

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.
>




Wed Apr 2, 2008 8:29 am

asterix_pagano
Offline Offline
Send Email Send Email

Forward
Message #170 of 233 |
Expand Messages Author Sort by Date

In a program I'm writing, I used DIM EX(24,4), which worked fine. But 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...
Hertz
atticshek
Offline Send Email
Mar 31, 2008
2:27 pm

Hello. ... 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...
not_found_blassic
not_found_bl...
Offline Send Email
Mar 31, 2008
3:30 pm

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...
Hertz
atticshek
Offline Send Email
Apr 1, 2008
6:35 pm

6240 DATA 0,15,0,0, 0,16,0,0¿? 5,17,12,0, 0,18,0,11 ... 6240 DATA 0,15,0,0, 0,16, 0,0 ¿? 5,17 ,12,0, 0,18,0,11 2008/4/1, Hertz < atticshek@... >: Here...
Alberto Aleix
asterix_pagano
Offline Send Email
Apr 2, 2008
8:29 am

I cannot believe it was something that dumb. It works now. Thank you!...
Hertz
atticshek
Offline Send Email
Apr 3, 2008
2:28 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help