[Gambas-user] STATIC doesn't work?
Rob
sourceforge-raindog2 at ...94...
Wed Mar 17 18:22:36 CET 2004
> I repeat this questions as not everyone may have followed my
> thread with Rob. So here is my point:
And I repeat my answer, just in case ;)
On Wednesday 17 March 2004 12:00, Eilert wrote:
> STATIC x AS INTEGER
> doesn't run, it says "syntax error". I tried
> STATIC PRIVATE x AS INTEGER
Static and public/private variables are defined at the class
level. You need to put those outside your function, at the
beginning of the class module.
"DIM" is just a way to define a local variable used only within
the context of the function in which it's defined: if it's a
static function it will be a static private variable, if not,
it'll be a dynamic private variable. (Note that it's not REALLY
a private variable, it's a local variable which is still more
private than PRIVATE, but I just put it that way so you could
see what they were analogous to.)
Rob
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and
CEO of GenToo technologies. Learn everything from fundamentals
to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op
=click _______________________________________________
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