for i = 1, 10 do -- Loop 1.
for ii = 1, 5 do -- Loop 2.
break 1 -- This will break from Loop 2.
break 2 -- This will break from Loop 1.
end
end
https://pluto-lang.org/docs/New%20Features/Break%20Statement "Pluto aspires to be a version of Lua with a larger feature-set, that is all. Pluto is not a Lua-killer, an attempted successor, or any of that. Many people (rightly so) love Lua precisely because of the design philosophy. And fundamentally, Pluto is a major deviation from Lua's design philosophy. Some may prefer this, some may not."
local stop = false
for i = 1, 10 do -- outer loop
if stop then break end
for j = 1, 5 do -- inner loop
break -- to break from inner loop
stop = true; break -- to break from outer loop
end
end
So this new feature fits with the general theme of pluto being a very-sugared lua.
90s_dev•6h ago
Imustaskforhelp•2h ago