Using Return() from within a for/while loop?

 

Some languages don't work well when a function's value is returned from within a loop (in our case 'for' or 'while' loop). I have done some test scripts and I haven't found a problem with that in MQL4, but I'm not sure... Can I return a value from within a loop safely?

 
Use "break".
 
I know I can use break. The question is can I just return a value WITHOUT exiting the loop. Is that guaranteed to work?
 

A return operator terminates the current function execution and returns the control to the calling program.

I go with that, and it works for me.

 
ok, thanks.