lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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)

(chapter is about the "repeat" statement)

. I think I have to modify my question...:

    "What is the best way to read interactive input from a
    lua script, which was started from the commandline and
    is a pure console application (no gui)?"


Thank you very much in advance for any help!
Best regards,
mcc