[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: x=os.read() ?
- From: meino.cramer@...
- Date: Sun, 27 Oct 2013 11:34:00 +0100
Lorenzo Donati <lorenzodonatibz@tiscali.it> [13-10-27 11:28]:
> 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
>
<grin> That's nice! </grin>
This is the very very very seldom moments, when the mistake is not in
/my/ code... :)))
(NOT PUNT INTENDED!)
Best regards,
mcc