[Gambas-user] Dynamically changed arrays

Rob sourceforge-raindog2 at ...94...
Wed Mar 17 18:13:19 CET 2004


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





More information about the User mailing list