io.read waits before any print() output?https://www.eclipse.org/forums/index.php/mv/msg/453033/1008738/#msg_1008738

print('Enter your Name:')
io.read('*line')

When I run it does not print out 'Enter your Name' until after I type something in the console and hit enter. This kind of defeats the point of having a prompt. This applies to all print() functions that I have in code before or after the io.read(). Nothing gets printed until all of the io.read() commands have received input, then everything comes out afterward.

I have run the same code in a different editor (Zerobrane) and it works as I would expect (i.e. prints the prompt then waits for input).

Any suggestions?

]]>Eclipse Guest2013-02-13T18:47:56-00:00Re: io.read waits before any print() output?https://www.eclipse.org/forums/index.php/mv/msg/453033/1009733/#msg_1009733
First, thanks to take time for feedback.

To work as you expect, the sdtout buffer have to be configured by adding the following line at the top of your file:
io.stdout:setvbuf('no')