在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
在lua中“#”表示返回表长度或字符串长度 例子一: a = "Hello " b = "World" print("Concatenation of string a with b is ", a..b ) print("Length of b is ",#b ) print("Length of b is ",#"Test" ) 结果: Concatenation of string a with b is Hello World Length of b is 5 Length of b is 4
例子二,对多维表的计算: th> tags={{1,2,3},{3,4,4}}
例子三, th> tags={1,2,3} [0.0001s] th> tags[#tags+1]=4 [0.0001s] th> tags { 1 : 1 2 : 2 3 : 3 4 : 4 }
|
请发表评论