- 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.
推薦閱讀
- JBoss Weld CDI for Java Platform
- 零基礎(chǔ)學(xué)C++程序設(shè)計(jì)
- Java Web開發(fā)之道
- 樂高機(jī)器人設(shè)計(jì)技巧:EV3結(jié)構(gòu)設(shè)計(jì)與編程指導(dǎo)
- Learning SQLite for iOS
- 算法精粹:經(jīng)典計(jì)算機(jī)科學(xué)問題的Python實(shí)現(xiàn)
- Expert Android Programming
- Oracle Exadata專家手冊
- C語言程序設(shè)計(jì)教程
- C語言程序設(shè)計(jì)
- Java面向?qū)ο蟪绦蛟O(shè)計(jì)
- Python Data Science Cookbook
- Spring MVC+MyBatis開發(fā)從入門到項(xiàng)目實(shí)踐(超值版)
- Scratch·愛編程的藝術(shù)家
- INSTANT Premium Drupal Themes