[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Suggestion: file:write() and other methods should return file
- From: HyperHacker <hyperhacker@...>
- Date: Sat, 2 Jul 2011 08:26:29 -0600
On Sat, Jul 2, 2011 at 07:34, steve donovan <steve.j.donovan@gmail.com> wrote:
> 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.
>
>
Aha, so my time machine worked! :D
--
Sent from my toaster.