[Gambas-user] define data-variable as record

Fabien Bodard gambas.fr at ...626...
Tue Apr 28 08:28:25 CEST 2009


not really in gambas
in gambas a class can contain only public variable. In this case it's
like a type declaration.

generally I name this class with a "T"

After for a class with procedure and function i use accessor for data querying.


PRIVATE $iMyVar as Integer
PROPERTY MyVar as Integer

SUB MyVar_Read() as Integer
  Return $iMyVar
END

FUNCTION MyVar_Write(Value as Integer)
  $iMyVar = Value
END

Regards,

Fabien  Bodard

2009/4/25 Jeff <jeff at ...2103...>:
> Same as the other answers - define a class. It's a good habit to get
> into to write accessor methods (set and get) or use properties rather
> than public variables.
>
> On Sat, 2009-04-25 at 01:55 -0700, juelin wrote:
>> hello,
>> it is possible to define a record into gambas?
>> thats mean a variable with different datatypes
>> for example:
>> type recorda as record
>>    a as intger
>>    b as string
>>    c[99] as float
>> endtype
>> dim variablename as recorda
>>
>> kind regards
>> Jürgen
>>
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensign option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> 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