Variable Scoping

Ken Ray kray at
Mon Oct 9 18:12:04 EDT 2006

On 10/9/06 4:09 PM, "David Bovill" <david at> wrote:

>> This I can use to mimic a kind of "global" variable system without
>> having to scour the 450,000+ lines of code for variable names and
>> then declare all of them as global at the head of every script that
>> uses them.
> You can put a global declaration outside of a handler - that is at the top
> of any script. So it does not need to be in every handler:

But I'm sure that's what Bob's trying to avoid - even at its best you'd have
to find all the places where the variable's being used and add the global
declaration at the top of that object's script.

If environment variables work for him, then it works for him... I've had
unique situations which seemed illogical to everyone else but me, and
especially when converting from one dev environment to another...

Are there any downsides to using custom environment variables?

Ken Ray
Sons of Thunder Software
Web site:
Email: kray at

More information about the Use-livecode mailing list