[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: multiple local definitions in the same scope
- From: "Aaron Brown" <arundelo@...>
- Date: Fri, 20 Apr 2007 15:56:56 -0400
Thomas Lauer wrote:
"Mark Edgar" <email@example.com> wrote:
A block is not a scope -- there is no scope expect where
there is a (local) variable to have one. The only way
for multiple definitions to have the same scope is that
they are declared in the same statement (or parameter
Perhaps I misunderstand you but I think that's not the
The two definitions of dmz have different scopes, with the
second one shadowing the first in the area of overlap.
Incidentally, if I remember correctly the priority of
same-named variables in a local statement or parameter list:
local a, a, a = "left", "middle", "right"; print(a)
is undefined by the reference manual, although it is
predictable in practice.
Having two parameters with the same name is almost 100% an
True, though perhaps not in automatically generated code.
Need a break? Find your escape route with Live Search Maps.