[Gambas-user] Something i do not understand

Fabien Bodard gambas.fr at ...626...
Mon Dec 8 18:47:34 CET 2014


well in fact i've found my error myself :-)


i need a too dimentional array of float[]... so myvar as Float[][dim1,dim2]

2014-12-08 17:49 GMT+01:00 Tobias Boege <taboege at ...626...>:
> 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
>
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard




More information about the User mailing list