The compiler knows which Nexts belong to which Fors, and in the case of returning in the middle of the loop, it just pops everything (variables, function call, etc) off the heap/stack, and everything's hunky-dory.
You might use the Exit command if you weren't in a function and/or didn't want to return straight away.
The only reason returning in the middle of a loop might be "bad" is that it's generally frowned upon by "professional" programmers, i.e. so called Code Grammarians (so called by me).
You might use the Exit command if you weren't in a function and/or didn't want to return straight away.
The only reason returning in the middle of a loop might be "bad" is that it's generally frowned upon by "professional" programmers, i.e. so called Code Grammarians (so called by me).