[Gambas-user] global variable
Grahame White
grahame at ...457...
Thu Jun 3 13:51:59 CEST 2004
On Thursday 03 June 2004 12:28, Tim Hanschen wrote:
> Hi,
>
> I need a global variable which is "shared" between some forms... how can
> I do it. I tried to pass a variable via _new, but it is too
> complicated...
>
> Is there a possibility to define a variable that can be accessed in all
> forms?
>
> regards,
> - Tim -
FFoo.class
PUBLIC SUB Button1_Click()
PRINT CBaz.bar
END SUB
CBaz.class
PUBLIC bar as Integer
PUBLIC SUB _init()
bar = 10
END SUB
Basically if you create a public variable in one file you can reference
that variable by explicitly stating which file the variable is in
Grahame
More information about the User
mailing list