On Mon, 23 Jun 2014, Rezedent12 . wrote:
> Is it possible to dynamic multi-dimensional arrays?
> 
> Static multi-dimensional array may declare Ps As New Integer [10,100]
> 
> Dynamic dimensional possibly Ps As New Integer []
> 
> How to declare a dynamic multidimensional array? I tried Ps As New Integer
> [,] but it is not syntactically correct. I decided to temporarily apply Ps
> As New Integer [] []. Create a dynamic array of dynamic arrays. But this is
> not what I need [x] [y], I need to [x, y]. Is it possible?
> 
> 

The preferred way[*] of having dynamic multidimensional arrays is actually
the Integer[][]...[] syntax, one pair of "[]" for each dimension.

If you for some reason cannot possibly bear the [x][y] syntax, you may also
create a distinct class which implements the _get() and _put() special
methods and wrap the arguments for a call to a typical Gambas md-array.

There's actually to be some thought involved in the latter procedure if you
want to handle arbitrary dimensions and I don't know off the top of my head
if it's at all possible. But if you need it, maybe we can do something...

[*] It's preferred for various reasons. If you want to hear some, just ask.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to