lua-users home
lua-l archive

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


Try it yourself before you post us some dummy broken code. It doesn't
work.

On Tue, 2008-11-11 at 20:04 +0800, Jun Wu wrote:
> On Tue, Nov 11, 2008 at 7:26 PM, Duncan Cross <duncan.cross@gmail.com>
> wrote:
>         Atry's already aware of it and was asking if any better
>         alternative methods exist.
>  
> Sorry again. I missed reading them. I will read carefully next time.
> 
> I found function() can do the trick, without unpack() or {}.
> You may try this code:
> 
> function a(...)
>   function b(...)
>     return ...
>   end
>   return b(...), "a"
> end
> 
> Lua 5.0 uses a table named arg to store variables passed to a
> function, maybe arg[#arg+1] = "a" would work at that time. I have no
> Lua 5.0 and can't test the code.