You don't have to use return anywhere in a void function. Once the code is complete, it will 'return' by itself.
If you want the void function to end prematurely, then return is useful.
if(condition) { return; }
If you try to use return(0) on a void function, you should get an error or a warning (depending on whether #property strict is used)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello friends,
I want to share with you my thoughts:
I can see different way of using the RETURN operator:
I understand bool/double/int/string functions that returns a value.
BUT why void function uses RETURN or RETURN(0)?
What it the diffidence?
Thanks.