An array of arrays is a multi-dimensional array.
Dim a(100)
Dim a(100, 100)
Dim a(100, 100, 100)
Dim a(100, 100, 100, 100)
Whatever you want.
I started a programming tutorial a while back (but didn't get very far). However, it just so happened that I started writing about arrays and types:
http://home.cmit.net/rwolbeck/programmingtutorial/Here is some text on multi-dimensional arrays from the tutorial:
Think of your array as a chess board.
dim chess$(7,7)
will give you 0-7 across and 0-7 down (64 square in total). So you can reference a point and see what's there or set what's there.
chess$(5,5) = "Black Knight"
chess$(1,2) = "White Queen"
print chess$(3,3)
Then you can take it even further and stack several chess boards on top of one another.
dim chess$(7,7,2)
This has stacked 3 chess boards on top on each other. You can now reference any squre on any board.
This sets position 5,2 on chess board 1
chess$(5,2,1) = "White Bishop"
print chess$(5,2,1)
Sets position 2,1 on chess board 0...
chess$(2,1,0) = "Black Pawn"
You ready to take it even further...
Well, lets have our stacked chess boards spanning across different rooms...
dim chess$(7,7,2,9)
You getting the idea?
We now have 10 (0-9) rooms we are playing our 3 stacked chess games in. We can reference any square on any chess board in any room...
chess$(5,1,2,7) = "Black Rook"
So, in room 7, on board 2, at position 5,1 on that board there is now a black rook...
Expand it further... Lets add any building...
dim chess$(7,7,2,9,4)
we now have x,y on the board, board number, room number, and building number which we can instantly reference...
chess$(1,2,2,8,3) = "White Pawn"
So the piece at 1,2 on board 2 in room 8 in building 3 is a white pawn.