如何清除 Lua 程序中的控制台 [英] How do I clear the console in a Lua Program
本文介绍了如何清除 Lua 程序中的控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用控制台制作我的第一个 Lua 程序,我需要找出如何删除控制台中的所有文本而不只是附加大量的 .
I'm making my first Lua program with the console, and I need to find out how to remove all the text in the console without just appending a ton of 's.
推荐答案
你可以使用os.execute()
.
在 Windows 上:
On Windows:
os.execute("cls")
在 Unix 上:
os.execute("clear")
这篇关于如何清除 Lua 程序中的控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文