小编Raz*_*rVE的帖子

Lua goto 语句模拟继续引发的错误

通常,我的目标是模拟 Lua 中不存在的 continue 语句。我已经阅读了一些关于使用 goto 执行此操作的线程。我试过:

for i=0, 9, 1 do
    if i<5 then goto skip end
    print(i)
    ::skip::
end
Run Code Online (Sandbox Code Playgroud)

它提出了“lua:test.lua:2:'='预期在'跳过'附近”

有什么解决方法吗?提前致谢

lua continue

2
推荐指数
1
解决办法
231
查看次数

标签 统计

continue ×1

lua ×1