[Gambas-user] Strange error with arrays
Rob
sourceforge-raindog2 at ...94...
Tue Feb 22 18:55:04 CET 2005
On Tuesday 22 February 2005 12:11, Eilert wrote:
> Will be somewhat tricky, just think of multi-dimensional
> arrays with some value being 0: myarr(0,6) which I had here
> (changed it to [x * y] instead of [x, y] and made sure that 0
> is always turned to 1...)
Actually, I do that by creating an array of Object and assigning
a new Array object of the desired type to each of the Object
array's elements, so that I can refer to them like this:
myArray[x][y]
It requires a little more code to initialize them (a for loop)
but seems to work fine. I guess this is a technique I brought
over from perl, which doesn't have multi-dimensional arrays as
such.
Rob
More information about the User
mailing list