[Gambas-user] File opening dialog and one more question

bbruen at ...2308... bbruen at ...2308...
Fri Jan 6 02:01:38 CET 2012


Just to add to caveat and Benoit's answers.

Static, when applied to variables, refers to the "storage class" (or  
more properly "storage mode") of the variable.  Whereas "public" and  
"private" refer to the scope or accessibility of the variable.  It is  
important not to confuse these aspects.

When applied to methods it has an entirely different meaning.  In  
effect it is a "compiler" directive that allows the method to be  
addressed directly rather than that address being resolved at runtime.  
  Thus (in OO theory) a static method is not resolved by "virtual  
dispatch" as it is not subject to polymorphism or overriding in  
descendant classes.  (I am limited at the moment to a %$#$%# MacBook  
so I cant tell how far this theory is adhered to by gambas.)

Finally, there is a third completely different usage of the keyword  
Static in gambas.  That is, "Create Static", which is applied to  
classes.  Its' meaning in that context is entirely different again,  
and best explained by the help page.

hth
Bruce





More information about the User mailing list