array within an array

Blitz3D Forums/Blitz3D Programming/array within an array

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I don't know if this will answer your question: you can have multidimensional arrays.
eg:
dim x(3,4)
will give you 3*4 turrets, you can then access it like this:

x(tank,1)=100

note: you can also use Zero as index, so dim x(3,4) will actually give you 4*5 array indexes (0 to 3 * 0 to 4).

To acces the fields of a chessboard you would do something like:

dim chess(7,7)

for y=0 to 7
for x=0 to 7
chess(x,y)=rand(whatever)
next
next

For types it's better some types experts will answer this.