Defining locals or constants
Colin Holgate
coiin at rcn.com
Thu May 15 10:43:40 EDT 2008
At 3:35 PM +0100 5/15/08, Ben Rubinstein wrote:
>>I can use a "preOpenStack" message to trigger a script.... but
>>this is not always appropriate and clumsy - is there a simpler way?
Is there really any practical difference between these two:
local LocalVar = sqrt(10)
on openstack
do thingsthatneedthatvariable
end
and:
local LocalVar
on preOpenStack
LocalVar = sqrt(10)
end
on openstack
do thingsthatneedthatvariable
end
If you could define and set variables like you can in many other
languages, those lines would have to run on preOpenStack anyway,
otherwise you can run into issues, where a handler is called before
the variable is set.
More information about the use-livecode
mailing list