[Gambas-user] STATIC doesn't work?

Benoit Minisini gambas at ...1...
Fri Mar 26 21:16:32 CET 2004


On Thursday 18 March 2004 10:14, Eilert wrote:
> Hi Benoit,
>
> >>STATIC x AS INTEGER
> >
> > At the moment, in Gambas, you can't define static local variables. You
> > must use a class or module private variable instead. Actually, static
> > local
>
> Rethinking the item and browsing through the original VB code, I find a
> contradiction: is it sensible to have a variable declared as STATIC for
> a module? When declared with DIM the variable will live and hold its
> value for the whole time the program is running (i. e. the module/class
> is loaded) anyway. Or is this "VB thinking"? :-)
>
> Rolf
>

I don't understand what your problem is :-)

STATIC used inside a function is just like declaring a global STATIC variable, 
in Gambas or in VB, being in a module or in a class.

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list