global problems
Richard Gaskin
ambassador at fourthworld.com
Tue Aug 2 03:30:40 EDT 2005
Ken Norris wrote:
> At the risk of repeating myself, again, you just need to be aware of how
> it works, that's all. Whatever Rev thing is running retains the globals
> declared within it until it is closed.
This convention was established in 1987 by the inventors of the root
dialect, HyperTalk. Given its longevity and consistent implementation
among all xTalk dialects, it isn't likely to change.
If it's causing problems in a specific situation you'll likely get to a
solutution faster and with less effort by looking at other ways of
solving that problem than to expect Transcript to change this basic
behavior of global variables.
As Chipp noted, one solution that's free is adopting naming conventions
to minimize risk of overlapping names. Most of the books I've read on
C, Pascal, and other languages encourage the use of a lower-case "g" to
denote globals. They might have something there.
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode
mailing list