Hi Eric.
Return should work for you just fine, without any ill effects.
Any loop counters or local variables should be kept on the stack, which
will be cleaned up by the return.
As you point out, "return" will indeed return control right out of the
method you are in, to the calling code.
Russ
On Apr 24, 2005, at 7:11 AM, Eirik Karlsen wrote:
I know one should Exit for early termination of a For-Next loop..but
it won't quite fit into my code.
Is it safe to use Return instead to get out of the loop and out of the
sub...or could that cause
nasty things like stack overflow, memory leak, or instability of any
sort?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|