lua continue

for i = 1,10 do
  repeat
    if i == 5 then
		break
	end
    print(i)
  until true
end
print("----------------------------------")
function foo(i, max)
  if i == 5 then
    return foo(6, max) -- continue to i=6
  end
  print(i)
  if i == max then
    return
  else
    return foo(i+1, max)
  end
end

foo(1, 10)

  

原文地址:https://www.cnblogs.com/byfei/p/2933685.html