Lua - 从用户获取命令行输入? [英] Lua - get command line input from user?

查看:24
本文介绍了Lua - 从用户获取命令行输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 lua 程序中,我想在继续操作之前停止并要求用户确认.我不确定如何停止并等待用户输入,怎么做?

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?

推荐答案

看一看 io 库,它默认将标准输入作为默认输入文件:

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

这篇关于Lua - 从用户获取命令行输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆