lua-users home
lua-l archive

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


On Sat, Jul 2, 2011 at 12:53 PM, HyperHacker <hyperhacker@gmail.com> wrote:
> I just noticed that file:write() returns true on success (though the
> manual doesn't mention any return value).

Ah, but in 5.2 it does return the file object, allowing chaining:

Lua 5.2.0 (beta)  Copyright (C) 1994-2011 Lua.org, PUC-Rio
> = io.write 'hello\n'
hello
file (000007FEFD972AB0)

steve d.