local and do <commands> - what NOT to do
hh at livecode.org
Thu Feb 18 07:45:20 EST 2016
Mark Wadd. wrote:
> > [-hh] wrote:
> > local a1=1, a2=false
> > -- local a=1, a=false #<-- currently not allowed
> > For such default-constructs variable names and using "do"
> > are really helpful.
> Although you can do the above as:
> local a -- only needed if in strict compilation mode
> put 1 into a
> put false into a
I meant local *script* variables, outside of handlers,
I seldom use local declarations within handlers.
The possibility of setting default values is an important
tool for me.
For example in a button script that uses a certain variable
in mouseEnter, mouseDown, menuPick and ...
Where to set the default for an array entry if one wishes
to use also "send <message>" to the button? In each and
(These local variable declarations in the top lines of my
scripts act for me also like the header of a HTML-page.
Nearly always one knows roughly alone from that what's
More information about the use-livecode