lua-users home
lua-l archive

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


>Actually, it turns out there was a more interesting problem. I was running on Mac OS, where the line endings are simply carriage returns. That doesn't seem to bother Lua itself, but I guess the line counting algorithm is looking for UNIX-style line endings. So in my case the line number was usually something like 1.

That depended on how stdio is implemented.

Anyway, Lua 5.1 will support carriage returns as end-of-line as well.
You can try the work version, Lua 5.1 (work0):
	http://www.lua.org/work/lua-5.1-work0.tar.gz

--lhf