[Gambas-user] static ? in variables

PICCORO McKAY Lenz mckaygerhard at ...626...
Fri Jun 16 17:40:36 CEST 2017


2017-06-16 11:26 GMT-04:00 Tobias Boege <taboege at ...626...>:

> A static variable is stored in the *class* and shared by all objects.
> If you modify a static variable from one object, it will change for all
> objects. This is orthogonal to visibility. You can combine Static with
> Public or Private. Neither implies the other.
>
thanks i must confirm that due some concepts in gambas are very different
respect java or php... and confused too much ...


>
> You should be familiar with this concept if you know Java and PHP.
> It's about the same there, although I don't think Gambas has static
> local variables, which is another place where the word "static" is
> used in those languages.
>
> In case you are confused because "Static" appears in two places (the
> CREATE STATIC flag for classes and the STATIC keyword for variable/
> property/method declaration), those two things aren't necessarily
> related. For example, CREATE PRIVATE has no relation to private variable
> declaration (where you also use PRIVATE) and no relation to the CREATE
> flag you specify with the OPEN instruction for files. It's just that
> those two words "CREATE" and "PRIVATE" already exist in Gambas and they
> together kind of convey the meaning of "CREATE PRIVATE", namely that
> you can't create objects of the class using NEW.
>
thanks for clarify..  that information unless you think its very necesary..
due some differences..

i cited the wiki introduction that said Gambas its NO SAME as visual
basic.. but its too similar. but not equal..

now i have a correct information.


>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> 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