Lua中for循环如何中断或跳出?

更新于
2026-09-19 01:04:16
28阅读来源:SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计330个文字,预计阅读时间需要2分钟。

Lua中for循环如何中断或跳出?

我有以下代码段:javascriptfor(k,v in pairs(temptable)) do if string.match(k, 'doe') then if v[name]==var2 then txterr=Invalid name for .. k .. duplicate=true end endend当`duplicate`设置为`true`时,我想一起退出。

阅读全文

本文共计330个文字,预计阅读时间需要2分钟。

Lua中for循环如何中断或跳出?

我有以下代码段:javascriptfor(k,v in pairs(temptable)) do if string.match(k, 'doe') then if v[name]==var2 then txterr=Invalid name for .. k .. duplicate=true end endend当`duplicate`设置为`true`时,我想一起退出。

阅读全文