1. repeat…until和break
for i = 1, 5 dorepeatif i == 3 thenbreakendprint(i)until true
end--[[1245
]]
2. 使用goto
for i = 1, 5 doif i == 3 thengoto continueendprint(i, " no continue")::continue::
end--[[1 no continue3 no continue4 no continue5 no continue
]]
3. 使用if…else…
for i = 1, 5 doif i ~= 3 thenprint(i)end
end--[[1245
]]