lua goto

goto Label

:: Label ::

用goto实现continue的功能
for i=1, 3 do
    if i <= 2 then
        print(i, "yes continue")
        goto continue
    end
    print(i, " no continue")
    ::continue::
    print([[i'm end]])
end

注:lua中没有continue语句
posted @ 2020-07-12 16:59  流星曳尾  阅读(923)  评论(0编辑  收藏  举报