vararg is empty when loading certain chunks?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: vararg is empty when loading certain chunks?
- From: Chris <coderight@...>
- Date: 2007年1月18日 18:53:01 -0500
If I try to load a chunk that is made of multiple files the arguments
appear to go missing. Is this normal?
Example:
src1.lua:
print("num args: "..#{..})
src2.lua:
print("test")
luac -o test.luac src1.lua src2.lua
Lua 5.1.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio
loadfile("test.luac")(1,2,3)
num args: 0 <---- Should be 3??
test
But it works with a single file:
luac -o test.luac src1.lua
Lua 5.1.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio
loadfile("test.luac")(1,2,3)
num args: 3
What happened to the arguments in the first case?
CR