WendllM,
Thanks for that!
The reason I wanted to do this was I'm playing with EventHooks within MaxGUI, to try and get LMB/RMB data from gadgets. I couldn't pass parameters via the calling mechanism, so having it global (within the scope of foo) was the way to go.
Personally, I perfer to pass everything as parameters. Saves on unexpected side-effects.
Pascal's scope rules rock, but BlitzMax's are quite serviceable.
They are quite serviceable, and quite logical, too. I went back and read the help file for Global; I can see that the info I wanted was already there. I just didn't fully understand it.
And think of all the semicolons you're saving! ;)
Semicolons don't worry me; it the bloody assignment operator := that I hate!
Thanks for that!
The reason I wanted to do this was I'm playing with EventHooks within MaxGUI, to try and get LMB/RMB data from gadgets. I couldn't pass parameters via the calling mechanism, so having it global (within the scope of foo) was the way to go.
Personally, I perfer to pass everything as parameters. Saves on unexpected side-effects.
Pascal's scope rules rock, but BlitzMax's are quite serviceable.
They are quite serviceable, and quite logical, too. I went back and read the help file for Global; I can see that the info I wanted was already there. I just didn't fully understand it.
And think of all the semicolons you're saving! ;)
Semicolons don't worry me; it the bloody assignment operator := that I hate!