[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Suggestion: file:write() and other methods should return file
- From: steve donovan <steve.j.donovan@...>
- Date: Sat, 2 Jul 2011 15:34:52 +0200
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.