[Gambas-user] gb3: 2D array of 1D Integer arrays

Benoît Minisini gambas at ...1...
Mon Aug 8 22:10:48 CEST 2011


> I asked this before and didn't get a response. Maybe I gave too much
> background information and made the problem appear more complex than it is.
> 
> I need to create a 2D array of 1D Integer arrays. 

You should write it that way:

"a 2D array of 1D array of integers".

Then you write it in Gambas from right to left:

	Integer[x][y, z]

In Gambas a 2D array, a 1D array, a XD array are all arrays. So the datatype 
is 'Integer[][]'.

	Dim MyStrangeArray As Integer[][]

	MyStrangeArray = new Integer[][SizeX, SizeY]

	MyStrangeArray[X, Y] = New Integer[SizeZ]

Is it clearer ?

-- 
Benoît Minisini




More information about the User mailing list