- Lua Quick Start Guide
- Gabor Szauer
- 93字
- 2021-08-05 10:30:38
Console input
Doing interesting things with code usually requires some kind of input from a user. Input from the console can be obtained with the io.read() function. Unlike the functions used previously, nothing goes inside the parentheses of this one. The function will read one line of input from the user when the user presses Enter. The function returns this line of text as a string, which can be stored in a variable. The following example demonstrates this:
print ("Please enter your name:")
name = io.read()
print ("Hello " .. name)
推薦閱讀
- Mastering QGIS
- TypeScript實戰指南
- SQL Server 2016數據庫應用與開發
- VMware虛擬化技術
- HTML5 APP開發從入門到精通(微課精編版)
- Clean Code in C#
- Visual Studio Code 權威指南
- Building Clouds with Windows Azure Pack
- Blender 3D Cookbook
- Backbone.js Patterns and Best Practices
- Visual C#(學習筆記)
- C#網絡編程高級篇之網頁游戲輔助程序設計
- Java Script從入門到精通(第5版)
- 像程序員一樣使用MySQL
- VB語言程序設計教程(第2版)