[Gambas-user] Class array
Daniel Campos
dcamposf at ...626...
Sat Nov 26 21:01:52 CET 2005
>
> Running Gambas 1.9.21 on ubuntu 5.10
>
> class1.class
>
> public name as string
> public phone as string
>
> main.gb
>
> dim myclass as new class1[]
>
> public sub main()
>
> 'Should'nt it be possible to
> myclass[1].name="dummy"
> myclass[2].phone="0123456"
>
Hi:
Use the generic object array to perform the task, and tell the
interpreter the array dimension(s) prior to use it, or add new
elements at runtime:
Dim MyClass AS NEW OBJECT[]
...
Dim hClass as new Class1
MyClass.Add(hClass)
...
MyClass[0].name="dummy"
Regards,
D. Campos
> end sub
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today - it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&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