[Gambas-user] read/data commands
Tobias Boege
taboege at ...626...
Thu Jun 27 11:34:33 CEST 2013
On Wed, 26 Jun 2013, Keith Clark wrote:
> Does Gambas support read/data commands like the following for loading a
> simple array with fixed values?
>
> for t=0 to 4
> for x = 0 to 4
> read v(t,x)
> next x
> next t
>
> data 1,2,3,4,5,1,2,3,4,5,1,2,3,4,5......
>
> Maybe I'm just not finding it?
>
I don't know what you want to do, actually, and your snippet does not
resemble Gambas at all... Maybe you want to access elements of a 2D array
where t is the row and x is the column? So if v is an Integer[][], then you
need to do:
For t = 0 To 4
For x = 0 To 4
Print v[t][x]
Next
Next
Regards,
Tobi
More information about the User
mailing list