Lua Notes

lua examples

lua 代码

lua 中 数据类型

lua table

lua 的表实现了”关联数组”, 索引可以是任何数据类型, 表没有固定大小.

创建表:

a = {} -- 通过构造表达式创建表, 并将引用存储到a

如果一个table没有变量引用它时,就会被gc删除.

如果table中的某个元素没有初始化, 它的内容就是nil. 可以将元素设置为nil 则将这个元素删除

Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.