Problem with declaring local variables
Rob Cozens
rcozens at pon.net
Sat Jun 10 10:56:30 EDT 2006
Hi Erik,
>> there is absolutely nothing
>> to be gained by
>> declaring a handler local variable unless one
>> uses explicitVariables.
>
> you can set the order in which they appear in VW.
> you can see at a glance what to look for.
>
I'm not seeing that here:
on mouseUp
local xValue
local aValue
put 4 into aValue
put 6 into zValue -- undeclared
put zValue+aValue into wValue -- undeclared
put wValue div 2 into xValue
end mouseUp
Set debug mode and run handler. Variable Watcher lists:
aValue
wValue
xValue
zValue
Obviously, they are ordered alphabetically, and I see nothing to
indicate some were declared and some weren't.
Is there a debug option I'm missing?
Rob Cozens
CCW, Serendipity Software Company
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
More information about the use-livecode
mailing list