Arrays of arrays of arrays?

BlitzMax Forums/BlitzMax Programming/Arrays of arrays of arrays?

ImaginaryHuman(Posted 2007) [#1]
I am confused with trying to make arrays of arrays of arrays. I do not want a 3 dimensional array ie [x,y,z] because I want the last element to be resizable. I also do not want to use a list. The first two dimensions in the array will have a mostly static size. I want to store a custom type in the third dimension of the arrays.

e.g.

Dimension a: 0 1
Dimenson b: 0 1 2 3 0 1 2 3
Dimension c: 0123 0123 0123 0123 0123 0123 0123 0123

I want to start off with a completely empty array and then later define its size.

I seem to be able to do
MyArray=MyType[][][]

but then I have no idea how I can adjust its size. For example if I want it to be [2][32][4], and I especially have no idea how I can resize the last dimension such as [2][32][..19]

I tried using slices but I cannot get it to work. I cannot think how to use `New` to set it up. Do I have to set it up one dimension at a time or something?

How do I do this? I want to have a double buffered system so that I can flip between the two states by simply changing the first index from 0 to 1. Then within that there must be 32 arrays, and for each of those arrays there must be a variable number of elements, and each element must point to instances of a custom type.

Is it even possible to store objects or custom types in an array of arrays? Is what I'm trying to do even possible with an array of arrays, yet alone adding a third dimension?


degac(Posted 2007) [#2]
This could be useful
http://www.blitzbasic.com/Community/posts.php?topic=46944#522206


ImaginaryHuman(Posted 2007) [#3]
It turns out the only reason I was getting errors is because I had an underscore typed in the wrong place in the name of the array, causing it to think I was defining a new array or something. Doh.

I had no problem doing MyArray=MyArrays[..2][..32][..Variable]


H&K(Posted 2007) [#4]
for each of those arrays there must be a variable number of elements, and each element must point to instances of a custom type.
Just from this, and as a design question, wouldnt you be better with an array of array of list?