You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The return statement can only be written as the last statement of a block. If it is necessary to return in the middle of a block, then an explicit inner block can be used, as in the idiom do return end, because now return is the last statement in its (inner) block.
--
Actually, when return isn't at the end of the block, the stop is still made at this point.
The text was updated successfully, but these errors were encountered:
3.3.4 – Control Structures (official documentation)
https://www.lua.org/manual/5.4/manual.html#3.3.4
The return statement can only be written as the last statement of a block. If it is necessary to return in the middle of a block, then an explicit inner block can be used, as in the idiom do return end, because now return is the last statement in its (inner) block.
--
Actually, when
return
isn't at the end of the block, the stop is still made at this point.The text was updated successfully, but these errors were encountered: