lua基础之lua表结构:
http://www.lua.org/pil/2.5.html
1.在lua中,nil不是0,也不是空字符串"",索引值从1开始。
a = {
}
a["x"] = 10
b = a --"b" refers to the same table as "a"
print(b["x"]) ---10
b["x"] = 20
print(a["x"]) ---20
a
lua基础之lua表结构:
http://www.lua.org/pil/2.5.html
1.在lua中,nil不是0,也不是空字符串"",索引值从1开始。
a = {
}
a["x"] = 10
b = a --"b" refers to the same table as "a"
print(b["x"]) ---10
b["x"] = 20
print(a["x"]) ---20
a