[Gambas-user] Value is not static

Gianluigi bagonergi at gmail.com
Wed Jun 16 09:32:14 CEST 2021


Il giorno mer 16 giu 2021 alle ore 09:24 Gianluigi <bagonergi at gmail.com> ha
scritto:

>
>
> Il giorno mer 16 giu 2021 alle ore 08:27 Ken King <kicking177 at gmail.com>
> ha scritto:
>
>> If I have the following code
>>
>>  ' Gambas module file
>> Public Sub Main()
>>   Dim class1 As Class1
>>   ...
>> End
>>  - - - -
>> it runs and works as I expect but if  if I try to look at the class1
>> values I get
>> 'class1.Value1' is not static
>> What am I not understanding?
>>
>> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>
>
> Dim class1 As *New* Class1
>
>
I forgot: Or

' Gambas class file

*Create Static *

Public Value1 As Integer
Public Value2 As Integer

Public Function ProcessIt() As Boolean
  Value2 = Value1 * 2
  Return True
Catch
  Return False
End

Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210616/c5665578/attachment.htm>


More information about the User mailing list