lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 12/12/06, Russ Cox <> wrote:
> This behaviour means that all earlier local declarations of the
> variable become completely shadowed by later local declarations at the
> same scope. I am afraid it makes code less readable.
> local x="first declaration"
> local x="second declaration" -- the same scope

Then don't write code like that.  Problem solved.

I chose a minimalistic example for illustration purposes only. Please,
refer to Asko Kauppi's message earlier in this thread for a realistic
code example which causes  a run-time error (calling nil as a