Weirdness with global variable declaration

Dar Scott dsc at swcp.com
Mon Jan 19 12:01:43 EST 2004


On Monday, January 19, 2004, at 12:54 AM, Doug Lerner wrote:

>>> If those commands are *outside* of a handler, exactly when do they
>>> actually
>>> get executed?
>>
>> Those are called commands, but I think of them as declarations, that
>> is, information to the compiler.
>>
>
> When do they get executed though?
>
> What if there are two different value assignments in two different 
> scripts?

They don't get executed as I view them.  They just tell the compiler 
how to handle them when they come up.  They apply from that point 
onward.

global a  -- all mention of "a" after here means global

on yyy
    put 42 into a -- put 42 into global a
end yyy

Dar Scott



More information about the use-livecode mailing list