【发布时间】:2020-01-11 07:30:59
【问题描述】:
作为lua tables - allowed values and syntax的后续问题:
我需要一个将大数等同于字符串的表格。问题似乎是不允许使用带有标点符号的字符串:
local Names = {
[7022003001] = fulsom jct, OH
[7022003002] = kennedy center, NY
}
但引号都不是:
local Names = {
[7022003001] = "fulsom jct, OH"
[7022003002] = "kennedy center, NY"
}
我什至试过不加空格:
local Names = {
[7022003001] = fulsomjctOH
[7022003002] = kennedycenterNY
}
加载此模块时,wireshark 抱怨 "}" 应该在 line 处关闭 "{"。如何使用包含空格和标点符号的字符串实现表?
【问题讨论】:
-
为什么说引号是不允许的?
-
项目之间需要一个逗号,即
[7022003002]之前。