Global variables

Just starting out? Need help? Post your questions and find answers here.
Megaborsti
User
User
Posts: 35
Joined: Sat Aug 16, 2003 4:52 pm
Location: Germany

Global variables

Post 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: ]
I become better!!! :)
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

You mean like this

Code: Select all

Global a.l, b.b, c, d
it's in the help file ;)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Beach
Enthusiast
Enthusiast
Posts: 677
Joined: Mon Feb 02, 2004 3:16 am
Location: Beyond the sun...

Post 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.
-Beach
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

No, to use them globally you will need to declare them.
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Megaborsti
User
User
Posts: 35
Joined: Sat Aug 16, 2003 4:52 pm
Location: Germany

Post by Megaborsti »

ok :( thx
I become better!!! :)
Post Reply