[Gambas-user] Multidimensional dynamic array basics

Jussi Lahtinen jussi.lahtinen at ...626...
Wed Aug 19 14:17:37 CEST 2015


You can't do it dynamically with normal syntax:
Dim iMyArray As Integer[x, y]

Instead use declaration like this:
Dim iMyArray As Integer[][]

But then, you can't access it as the normal way (iMyArray[x, y]) either,
but instead:
iMyArray[x][y] = something

iMyArray[x].Add(something)
iMyArray[x][y].Add(something)

So, it's really array of arrays.


Jussi



On Wed, Aug 19, 2015 at 9:22 AM, Kevin Fishburne <
kevinfishburne at ...1887...> wrote:

> I need to know how to declare, initialize and add elements to a
> two-dimensional dynamic array. Using trial-and-error for every possible
> syntax hasn't been too helpful so far. I'd post my code but it's pretty
> useless and embarrassing and I think the basic question sums it up.
>
> --
> Kevin Fishburne
> Eight Virtues
> www: http://sales.eightvirtues.com
> e-mail: sales at ...1887...
> phone: (770) 853-6271
>
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list