[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: local scope once again
- From: "Leo Razoumov" <slonik.az@...>
- Date: Tue, 12 Dec 2006 19:04:26 -0500
On 12/12/06, Russ Cox <firstname.lastname@example.org> 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