更新时间:2023-02-21 09:22:47
如果您引用的是vararg函数,则arg
表 table.pack
来如果需要,请创建arg
:
If you are referring to vararg function, the arg
table was deprecated already in Lua 5.1. In Lua 5.2, you can use table.pack
to create arg
if you need it:
function debug(name, ...)
local arg = table.pack(...)
print(name)
for i=1,arg.n do
print(i, arg[i])
end
end