目录
实测结果展示
先上图,看打印结果:
情况分类
数组开始索引与数组长度
如果数组开始索引从 0 开始,那么数组长度会减一
days = {[0]="Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}
print(string.format("Len days = %d", #days))
程序运行后,输
目录
先上图,看打印结果:
如果数组开始索引从 0 开始,那么数组长度会减一
days = {[0]="Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"}
print(string.format("Len days = %d", #days))
程序运行后,输