Global variables, Message Handlers, Functions

Richard Gaskin ambassador at
Sun Aug 25 15:45:01 EDT 2002

Björnke von Gierke wrote:

> A global variable is accessible from every handler which calls it. thus
> you have to call it... It IS rather strange, but i guess that it makes
> runrev faster (kind of explicit declaration)

The global keyword is adopted from HyperCard 1.0, and has been a part of all
xTalk implementation since.  How else would the engine know whether to treat
a variable as local or global without such a keyword?

Rev is fast because most of the interpretation is done when a script is
closed, compiled to plaform-independent byte code similar to Java (but tends
to outperform Java for reasons of granularity not worth getting into here).

 Richard Gaskin 
 Fourth World Media Corporation
 Custom Software and Web Development for All Major Platforms
 Developer of WebMerge 2.0: Publish any Database on Any Site
 Ambassador at
 Tel: 323-225-3717                       AIM: FourthWorldInc

More information about the Use-livecode mailing list