lua-users home
lua-l archive

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


On Thu, Jun 2, 2011 at 2:02 PM, Jörg Walter <joerg-walter@gmx.de> wrote:
>        local val = nil>
>        local val = exampleGet()>
>        print(val)
> when enumerating on the 3. line, I get two variables 'val', one nil and one
> number. why is that?

There are two locals called 'val' in this chunk.  (A 'lint' program
should be able to flag this as a potential problem)

steve d.