- Lua Quick Start Guide
- Gabor Szauer
- 108字
- 2021-08-05 10:30:35
Creating variables
To create a variable, you need to do two things:
- Declare the variable
- Assign a value (data) to the variable
As an example, let's make a variable, foo, and assign it the value bar. The code to do this would be:
foo = "bar"
That single line of code declares a variable and assigns a string value to the variable. If you break it into several parts, the actual line of code consists of the following pieces:

Why are there quote marks around bar? What is a string value? These questions will be answered in the coming two sections, Basic types and S tring types.
推薦閱讀
- ThinkPHP 5實戰
- Hands-On Machine Learning with scikit:learn and Scientific Python Toolkits
- SQL Server 2016從入門到精通(視頻教學超值版)
- Java面向對象軟件開發
- Leap Motion Development Essentials
- Learning ArcGIS Pro
- Learning Data Mining with R
- R Data Analysis Cookbook(Second Edition)
- Linux Shell核心編程指南
- Hadoop大數據分析技術
- 邊玩邊學Scratch3.0少兒趣味編程
- R語言數據挖掘:實用項目解析
- Kohana 3.0 Beginner's Guide
- 軟件再工程:優化現有軟件系統的方法與最佳實踐
- GO語言編程從入門到實踐