Defining locals or constants
Ken Ray
kray at sonsothunder.com
Thu May 15 12:56:21 EDT 2008
> constant WorldRadius = WorldConstant/pi
>
> local LocalVar = WorldRadius * 2
>>
>
>
> That is initialise a local variable or constant to the result of a
> calculation. I can use a "preOpenStack" message to trigger a script.... but
> this is not always appropriate and clumsy - is there a simpler way?
Well, you could do this kind of workaround I learned from Teresa Snyder:
constant WorldConstant = 25000
constant WorldRadius ="[[WorldConstant/pi]]"
on answerTenTimesWorldRadius
put 10 * merge(WorldRadius) into tResult
answer tResult
end answerTenTimesWorldRadius
Don't know if this makes it any easier or harder, but just providing an
option...
Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
More information about the use-livecode
mailing list