lua-users home
lua-l archive

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


Hi,

Luiz Henrique de Figueiredo wrote:
> 
> In a previous message, I wrote that the local variables in *all* enclosing
> functions can be used as upvalues. This is, of course, false! Only the
> locals in the immediately enclosing function can be used as upvalues.
> The reason is that locals that are located higher up may not exist when the
> function is created. I'm sorry for the noise.

It was my fault.  The example was wrong.  Roberto gave the right one.

Ciao, ET.