« Return to Thread: Defining locals or constants

Re: Defining locals or constants

by Ken Ray :: Rate this Message:

Reply to Author | View in Thread


> 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@...
Web Site: http://www.sonsothunder.com/


_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

 « Return to Thread: Defining locals or constants