io.read waits before any print() output? [message #1008738] |
Wed, 13 February 2013 13:47  |
Eclipse Guest Messages: 93 Registered: February 2013 Location: Vienna |
Member |
|
|
I am trying to run my script in the editor which has code something like this:
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?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03132 seconds