[Gambas-user] how can i emulate GLOBAL VARIABLES in gambas project/programs?

PICCORO McKAY Lenz mckaygerhard at gmail.com
Fri Jun 15 20:52:48 CEST 2018


umm i cannot avoid the "global." prefix! right?

well thanks in any case!

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com

2018-06-15 14:39 GMT-04:00 Tobias Boege <taboege at gmail.com>:

> On Fri, 15 Jun 2018, PICCORO McKAY Lenz wrote:
> > this are necesary at leats for web application programs!
> >
> > how can i emulate GLOBAL VARIABLES in gambas project/programs?
> >
>
> The usual way is to make a module and declare all your variables
> inside it using Public:
>
>   ' Global.module:
>   Public X As Integer
>
> Now you can access Global.X anywhere in your program and all
> places will access the same location in memory.
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180615/a49614b6/attachment-0001.html>


More information about the User mailing list