[Gambas-user] Something i do not understand

Tobias Boege taboege at ...626...
Mon Dec 8 17:49:43 CET 2014


On Mon, 08 Dec 2014, Tobias Boege wrote:
> On Mon, 08 Dec 2014, Fabien Bodard wrote:
> >   Dim grad As Float[][][]
> > 
> > grad = New Float[][width, height]
> > grad[x][y] = [0.2, 0.2]
> > 
> > give me a 'bad number of dimention error' .. why ????
> > 
> 
> The syntax
> 
>   Float[][width, height]
> 
> does not exist in Gambas. Multi-dimensional arrays are only implemented
> for native datatypes (Float, etc.), not for classes like Float[].

Oops, scratch that. I made a mistake.

Still the error comes from the incompatible layout of your two arrays, i.e.
the one (Float[][][]) is 1-d and the other (Float[][A, B]) is 2-d.

Regards,
Tobi

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




More information about the User mailing list