[Gambas-user] Multidimensionally Collection/Arrays

Werner wdahn at ...1000...
Mon Jul 28 13:46:55 CEST 2008


Stefan Miefert wrote:
> Hello,
>
> and how can i use this Array  as a public var?
>
>
>   
>>  DIM arsMyStrings AS String[]
>>     
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>   
Is that what you want?

' above the first routine
PUBLIC Names AS NEW Collection

public Sub myRoutine() 'wherever you want to put it
    Names.Add(["Anna", "Louise", "Theresa", "Geraldine"], "female")
    Names.Add(["Klaus", "Paul", "George"], "male")
    Names.Add(["Schultz", "Miller", "Perez", "Ballack", "Hempel"], 
"Surnames")
END

Instead of using implicit arrays, you could also generalize it as a 
collection of objects.

Regards
Werner





More information about the User mailing list