Download MetaTrader 5

How to exit a void function early?

To add comments, please log in or register
mark101
85
mark101  

Hi,


while a function can be exited with return(), how can I exit a void function after a certain condition is met and I don't wanna execute the remaining code in the function? Thanks!

whroeder1
15582
whroeder1  
Function returning a value
 Void Function
return( value );
return value; // or
return; // void
mark101
85
mark101  
WHRoeder:
Function returning a value
 Void Function

Thanks. I wonder where I can look that up because I didn't find it in the MQL4 Reference ?
honest_knave
Moderator
2327
honest_knave  
Alexnice:
Thanks. I wonder where I can look that up because I didn't find it in the MQL4 Reference ?

Return Operator

To add comments, please log in or register