[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ANN: LuaJIT 1.1.2 released
- From: Rick Burton <rmb25612@...>
- Date: Tue, 27 Jun 2006 16:28:05 +0000 (UTC)
Hi Mike!
This code runs on Lua 5.1.1 and Kepler Lua 5.0.2
http://www.lua.org/pil/5.2.html#Vararg
----------
function fwrite (fmt, ...)
return io.write(string.format(fmt, unpack(arg)))
end
fwrite("%s %d\n","Total is:", 5)
--------
But LuaJIT 1.1.2 fails
C:\LUA\BIN\LUAJIT.EXE: arg.lua:2: bad argument #2 to 'format' (string expected
, got no value)
stack traceback:
[C]: in function 'format'
arg.lua:2: in function 'fwrite'
arg.lua:5: in main chunk
[C]: ?
---------
Compiled on Win 98SE using latest Candidate GCC 3.4 MinGW and MSYS.
-- Rick