Lua: goto

 

实现continue功能:

输出odd number:

b = 0
while b < 10 do
    if b % 2 == 0 then
        goto continue
    end
    print(b)
    :: continue ::
    b = b + 1
end

 

posted @ 2022-05-28 23:18  ascertain  阅读(96)  评论(0编辑  收藏  举报