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

Kevin Fishburne kevinfishburne at ...1887...
Mon Aug 8 22:00:56 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. I've tried everything 
I can think of and nothing works. The initial declaration needs to be 
public and its dimensions are specified in a later procedure. The 1D 
Integer arrays are only one element in size and will be the target of a 
function which returns an integer value and requires that the recipient 
be an array. The 1D arrays can even remain undimensioned to accept the 
function result.

My only clue has been this in the documentation:

' An array of string arrays!
DIM aResult AS NEW String[][12]

So I tried:

' Module header.
Public tTileGrid As Integer[][]

' Some procedure.
tTileGrid = New Integer[TileGrid.Size, TileGrid.Size][1]

' Function returns an Integer into receiving array.
tTileGrid[counter1, counter2][0] = Gl.GenTextures(1)

What's the correct syntax for this? I can't believe I haven't discovered 
it through sheer trial and error by this point.

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sales at ...1887...
phone: (770) 853-6271





More information about the User mailing list