Page 1 of 1

Global variables

Posted: Sun Nov 14, 2004 12:14 am
by Megaborsti
hi,
just a short question:
Is it possible to make all variables global, or at least every variable declared outside a procedure (ie. like delphi does).

[I use LOTS OF variables in my code and usually structure it with procedures (I thought about gosubs, but I use a windows callback procedure and cannot call gosubs from within it :cry:). Thus I would prefer to make a few of them protected instead of thousands global :wink: ]

Posted: Sun Nov 14, 2004 2:02 am
by GeoTrail
You mean like this

Code: Select all

Global a.l, b.b, c, d
it's in the help file ;)

Posted: Sun Nov 14, 2004 2:38 am
by Beach
I think the question was - can I make all variables global by default, without the need to declare them global. That is the way I read it. I do not know the answer, I suspect the answer is no.

Posted: Sun Nov 14, 2004 2:41 am
by GeoTrail
No, to use them globally you will need to declare them.

Posted: Sun Nov 14, 2004 12:22 pm
by Megaborsti
ok :( thx