lua-users home
lua-l archive

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


chong tsong wrote:
Can we give the function any parameters when invoking it?
Yes we can. But you must use vararg expression (I assume you are using Lua 5.1).

local chunk = assert(loadstring [[ print(...) ]] )
chunk("1", "2", "3")  -- print "nil" rather than "123"