Alex Rivera | Logout

Lua - get command line input from user?

Asked 2009-11-29T10:14:49.970
20

In my lua program, i want to stop and ask user for confirmation before proceeding with an operation. I'm not sure how to stop and wait for user input, how can it be done?

Edit
Report

1 Answer

15

Take a look at the io library, which by default has standard-input as the default input file:

http://www.lua.org/pil/21.1.html

answered 2009-11-29T10:19:27.963

Your Answer