48
75
1991
金牌会员
function makeCounter() local count = 0 -- 私有变量 return function() count = count + 1 return count end end local c1 = makeCounter() local c2 = makeCounter() print(c1(), c1(), c2()) --> 1 2 1
举报
0
58
1350
本版积分规则 发表回复 回帖后跳转到最后一页