[Gambas-user] How do in Gambas

Doriano Blengino doriano.blengino at ...1909...
Wed Dec 24 13:27:40 CET 2008


ClassD 2008 ha scritto:
> How do in Gambas
>
> 'VB
> type User
>   name as string
>   date as string
>   id as long
> end type
>
>   
You have to make a class file where you declare name, date, id as 
public. If you want you can also add methods to do operations on these 
variables. For example

class user:
' gambas class file
public name as string
public date as string
...

In the main program you can then instantiate as many "User" you want in 
the normal way (new User), put them in arrays or collections and so on.
If you need just an instance, you can make the class static.

Regards,

-- 
Doriano Blengino

"Listen twice before you speak.
This is why we have two ears, but only one mouth."





More information about the User mailing list