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

Tobias Boege taboege at gmail.com
Fri Jun 15 20:39:23 CEST 2018


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


More information about the User mailing list