在Lua 5.2中,最好的解决方法是使用goto: -- prints odd numbers in [|1,10|] for i=1,10 do if i % 2 == 0 then goto continue end print(i) ::continue:: end.
確定! 回上一頁