Code: Select all
while (condition1)
...
if (condition2)
break //break here
end
//break continues here
...
end
//and not here
If this is not possible, I may have an idea: add an optional argument for the break command, to jump through a given number of end statements. This is compatible with the previous behaviour and it's even better than the solutions of many other languages (it can jump out from embedded loops).
I mean this:
Code: Select all
while (condition1)
...
if (condition2)
break 2 //break here
end
...
end
//break continues here