What does 'shadows' mean?
livfoss at mac.com
Mon Oct 10 18:10:28 EDT 2011
Thanks to all who replied.
My problem was solved by restarting the IDE, and I think Colin's explanation was a very clear one - it is a bug IMO but perhaps not a very serious one.
On Mon, 10 Oct 2011 09:37:48 -0400, Colin Holgate <coiin at verizon.net> wrote:
> Here you go, an entire article on the topic:
Alex, I have also noticed that loop variables (I normally use i,j,k etc) are implicitly declared, which does indeed seem an anomaly, even if a useful one. Probably deserves a note in the dictionary entry for 'repeat'.
Alex Tweedly wrote:
> I recently discovered that even when 'explicit variables' is turned on,
> you don't always need to declare a variable !! I thought this was a
> bug, and reported it, but the official reply was that this is intended
> behaviour. Seems wrong to me, but apparently that's the way it is.
> If a variable is used as a repeat loop control variable (e.g. repeat for
> each key K in ...., etc.) then it is *implicitly* declared for you, and
> won't cause an error even if explicit variables is on. And then, if you
> subsequently do declare a variable with that name, then you get the
> "shadows another variable" error.
More information about the Use-livecode