[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: f.close() vs f:close()
- From: Sean Conner <sean@...>
- Date: Thu, 2 Feb 2017 11:47:58 -0500
It was thus said that the Great Viacheslav Usov once stated:
> On Thu, Feb 2, 2017 at 4:30 PM, Diogo Mildenberger <diogo.milde@gmail.com>
> wrote:
>
>
> > Assuming that you are using Lua 5.3, take a look at
> > https://www.lua.org/manual/5.3/manual.html#6.8 (I/O Functions):
> >
> > ...
> > io.close ([file])
> > Equivalent to file:close(). Without a file, closes the default output
> > file.
> >
>
> Ah, thanks. So technically this works as documented. But then the standard
> output cannot be closed. Something is not right here.
io.output("/tmp/foo.txt")
io.write("This is a test\n")
print(io.close())
-spc