Concise Variables

Scott Rossi scott at tactilemedia.com
Sun Feb 6 12:07:13 EST 2005


Recently, Thomas Gutzmann wrote:

>> If I change the variables to globals, the values will be persistent,
>> but
>> I'll have to declare the global names everywhere in the script, which
>> is
>> going to be a major chore in a 1700+ line script that has around 70
>> handlers, not all of which require the globals.
> 
> You can put the global definition on top of the script; then it's valid
> for all handlers

How easy is this?!  The old MetaCard docs I read said declaring globals like
this treats variables like locals so I assumed the values would not be
persistent, but it turns out they are.

This qualifies as another huge forehead slap (and major time savings for
me).  Thanks Thomas.

Regards,

Scott Rossi
Creative Director
Tactile Media, Development & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the use-livecode mailing list