[Gambas-user] Not sure on declaring user-defined datatype arrays

Grahame White grahame at ...307...
Fri Apr 30 21:49:52 CEST 2004


> > To my mind this should create an array of Thingy that is two elements
> > big.
> >
> > However when I step through the code with the debugger with a watch on
> > : Global.Pile[0].Name and on Global.Pile[1].Name
> >
> > it gets to the line .Name = "Square" and instead of only setting
> > Global.Pile[0].Name to Square it ALSO sets Global.Pile[1].Name to
> > Square
> >
> > What am I doing wrong?
> >
> > Grahame
>
> Well i understand you want a pile of thingy's
> you create now only 1 new thingy and add this to the array
> the second loop in the for/next add simple the same thingy
> move the 'tmp_object AS NEW Thingy' inside the for next loop will
> make new objects to add instead of the only 1 you have now
>
> Ron

Yes, you understand what I'm trying to achieve :)

I tried moving the 'tmp_object AS NEW Thingy' line into the for...next loop 
as you suggested, however all I get now is a syntax error on that line 
when I run my program :/

>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
> _______________________________________________
> 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