[Gambas-user] STATIC doesn't work?

Benoit Minisini gambas at ...1...
Wed Mar 17 18:57:48 CET 2004


On Wednesday 17 March 2004 18:07, Eilert wrote:
> Hi,
>
> I repeat this questions as not everyone may have followed my thread with
> Rob. So here is my point:
>
> DIM i AS INTEGER
>
> is ok, no problem, but
>
> STATIC x AS INTEGER
>
> doesn't run, it says "syntax error". I tried
>

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 
variables are exactly the same thing that private class variables, except 
that two static local variables can have the same name provided they are 
located in two different functions. It is just syntactic sugar :-)

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




More information about the User mailing list