[Gambas-user] Collections bug? Referencing from variable.

Benoit Minisini gambas at ...1...
Wed Nov 3 10:34:35 CET 2004


On Monday 01 November 2004 21:01, webmaster at ...664... wrote:
> Hey all - Quite an annoying little problem. It seems I can't access an
> element in a collection from a index stored in a variable.
>
> This code sample probably isn't accurate, i'm just typing it into my mail
> client...
>
> Function Test (VarIndex as integer) as string
>     Return MyCollection[VarIndex]
> End Function
>
> You get the idea what I want to do?
>
> While im here, is there anything in gambas that behaves like ADO
> recordsets? Just something that gives the ability of a multidimensional
> array with searching? Thanks
>

Collection elements are indexed by a string, not an integer. The Gambas 
collections are not the same as VB collections - I didn't want to waste CPU 
and memory.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list