level 1
for x=1,9 do
local i=""
for y=1,9 do
if y>=x then
n=x * y
elseif n<=9 then
n= "0"..n
end
i=i..x.."*"..y.."="..n.." "
end
end
print(i)
end
其中 local i=“” 和i=i..x 这些是什么意思
2015年10月22日 07点10分
1
level 11
i=i..x
将两个变量 通过连接符,组成一个字符串
2015年10月23日 17点10分
2
level 11
通宵达人,,,local 是局部声明变量的意思,lua里面的变量都可以再次声明(当然数据可能会丢失,视情况而定), ..是连接符的意思,连接前后两个字符串(如果不是字符串,它会尝试转换为字符串)
2015年10月23日 23点10分
3