Hi MaxPayne, thank you for your explanation.
In delphi there is BREAK operator to jump out from the current loop, EXIT operator to exit current procedure or function, or RESULT operator if i'm using function.
RETURN operator i think has same meaning with the RESULT operator in delphi.
In MQL4 (C), at the end of init, deinit and start built in function there's RETURN(0). Is it mean EXIT? I think we're already at the last line of current function. Why should we put RETURN(0) at the last line?
Or is it mean current function is SUCCEED or generate no error value? In some case, when GetLastError() return an error value, I found that there's always Return(-1) operator.
And when to use RETURN(1) operator?
Thank you.
If you need to change parameter's values, you are defining them in initializing ex.: _function( double& double_one, double& double_two ) {}, in this case both values are returned back and changed.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
What's the different between:
return(1);
return(0);
return(-1);
return;
thank you