[Gambas-user] static ? in variables
Tobias Boege
taboege at ...626...
Thu Jun 15 14:41:31 CEST 2017
On Thu, 15 Jun 2017, PICCORO McKAY Lenz wrote:
> "This keyword is used for declaring static variables, static methods and
> singleton classes."
>
> About singleton clases, that mean guarantee a unique instance of..
>
No, the word "singleton" here just means you get an automatic instance of
your class, i.e. you can use the class name as if it were an object. You
do *not* get a unique instance. You have to use the CREATE PRIVATE keyword
for non-instantiable classes.
> but if
> the class are not static and have one variable static, what that's means?
>
Nothing extraordinary happens. You have a dynamic class with a static
variable and you can use the class like an object (as well as create new
objects of that class).
Regards,
Tobi
--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk
More information about the User
mailing list