« Return to Thread: Defining locals or constants

Re: Defining locals or constants

by Colin Holgate :: Rate this Message:

Reply to Author | View in Thread

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.
_______________________________________________
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