[Gambas-user] Arrays

Steven Lobbezoo steven at ...1652...
Fri Apr 20 21:57:38 CEST 2007


Well.......... :-(

There sure is a lack of documentation on arrays and collections and objects, 
or maybe i'm just not looking in the right places.

As per your suggestion, the declaration works fine, but :
I cannot read it with var = Objectname["test"]
I have to use the integer index ..?

So, I tried collections, entyrys like this :
key : ["one", "two"]
and data like "testdata"

That works, but ... again i have to write a routine to fill the collection.
I could not find a way to just define it someway, like the Array in my first 
example or the object.

Is there ?

Steven
ps.: Just for the records : Eval ?


Le jeudi 19 avril 2007 22:31, Steven Lobbezoo a écrit :
> Wow, it does .... :-) :-)
>
> I new there was some simple way.
>
> Thanks
>
> Le jeudi 19 avril 2007 22:23, Benoit Minisini a écrit :
> > On jeudi 19 avril 2007, Steven Lobbezoo wrote:
> > > Hi,
> > >
> > > I need to work with an array that i want to declare directly in my
> > > program. (outside from a sub or a function)
> > > i did :
> > > PUBLIC Docs AS Array[] = [["Terrain", "fb", "fiche_bien_terrain.odt"],
> > >                           ["Batiment", "fb",
> > > "fiche_bien_batiment.odt"]] which does not work, but illustrates the
> > > principe.
> >
> > If you replace Array[] by Object[], it should work.
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> 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