[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: io.read() not excecuting
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 13 Feb 2016 14:53:00 -0200
> > a = io.read("*n") -- reads a number ( this works fine )
> I don't know why exactly it doesn't work. Maybe "new line" character
> is consumed not by io.read("*n"), but by io.read(), so the latter
> considers the line to be empty.
Exactly.
One fix is to replace
a = io.read("*n")
with
a = io.read("*n","*l")