lua-users home
lua-l archive

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

On Fri, Nov 6, 2009 at 3:06 PM, steve donovan <> wrote:
> On Fri, Nov 6, 2009 at 2:59 PM, zweifel <> wrote:
>> I checked the arg variable and it is nil. I am reading things about
>> debug.getinfo now, but I found nothing about anonymous calls...

This illustrates the situation with pure Lua, applies to C API as well.

Lua 5.1.2  Copyright (C) 1994-2007, PUC-Rio
> ls = loadstring 'print(...)'
> = ls
function: 0x807d490    --> compiled chunk (won't have a name)
> pcall(ls,10)      --> call with arg, prints it out
> pcall(ls,'one','two')
one     two