[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: x=os.read() ?
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: Sun, 27 Oct 2013 11:24:16 +0100
On 27/10/2013 10.48, meino.cramer@gmx.de wrote:
> Jeff Pohlmeyer <yetanothergeek@gmail.com> [13-10-27 10:32]:
>> On Sun, Oct 27, 2013 at 4:24 AM, <meino.cramer@gmx.de> wrote:
>>
>>> os.read of that form is mentioned in the book "Programmin in Lua, 2ed
>>> edition".
>>
>> Are you sure you don't mean io.read() ?
>>
>> - Jeff
>>
>
> ...since it does not work, I am not sure... ;)
>
> On the other side: Page 31 of "Programming in Lua, 2ed Edition" says:
>
> -- print the first non-empty input line
> repeat
> line = os.read()
> until line ~= ""
> print(line)
>
[...]
Jeff is right, in that example there is a typo, `os.read` should be
`io.read`. In PiL3 the example has been corrected.
-- Lorenzo
--
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments