Help, what am I doing wrong???

Mark Wieder mwieder at ahsoftware.net
Sun Jul 31 20:08:49 EDT 2005


Jon-

Sunday, July 31, 2005, 12:15:53 PM, you wrote:

J> Mark:

J> The point I was TRYING to make <grin> was that FOR loop variables 1) had
J> to be declared locally; and 2) could not be modified inside a loop.  I
J> was trying to make a general case for this kind of a definition of an
J> "error". 

Ah. Gotcha. Yes - that's at least somewhat mind-boggling.

A semi-related point that seems to bother nobody but me is that you
don't have to declare loop variables (i.e., Variable Checking [aka
explicitVars] doesn't catch them), but if you don't explicitly declare
them as local then they become global by default, in which case you
get namespace conflicts. Declaring "local x" when you've already got a
"repeat for x=1 to 10" line somewhere in your script will cause a
compiler error at the "local x" line.

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list