Just a quickie. Is it safe to break out of a subroutine when in the middle of a for loop? Or will stacks and things get messed up?
Example of what i'm talking about:
Code:subroutine:
FOR n=0 TO 100
IF n=50 then RETURN
NEXT n
RETURN
Printable View
Just a quickie. Is it safe to break out of a subroutine when in the middle of a for loop? Or will stacks and things get messed up?
Example of what i'm talking about:
Code:subroutine:
FOR n=0 TO 100
IF n=50 then RETURN
NEXT n
RETURN
That is OK.
For-Next loops do not use stack space.
Cool. Thanks Melanie.
Would a While/Wend be more appropriate?