defining and using globals in an application
J. Landman Gay
jacque at hyperactivesw.com
Thu Jul 7 01:48:52 EDT 2011
Mark Stuart wrote:
>
> Again, my point exactly.
> You HAVE to declare the global again, and again where needed.
The difference may be that in other languages you are generally working
in a self-contained environment. Your globals will never interfere with
anyone else's variable names.
In LiveCode each stack is more of an independent entity sharing space
with other entities. Suppose your stack declares a global and my stack
happens to use the same variable name in a handler. With the current
system, if my own script never declares your global there's no problem.
My variable names remain local to my handler or my script. With
explicitVariables turned off, and using your system where I don't have
to declare the global, my handlers would end up using your values. If
explicitVariables was turned on, my script wouldn't compile.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list