ifmihai:
You are right. Help was fixed, thank you.I read here: https://www.mql5.com/en/docs/basis/variables/formal
and here: https://www.mql5.com/en/docs/basis/function/functionoverload
I don't know if I'm right. But if this is the case, then documentation has to be changed, right?
Rosh:
You are right. Help was fixed, thank you.
Glad to be helpful
You are right. Help was fixed, thank you.
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
I read here: https://www.mql5.com/en/docs/basis/variables/formal
and here: https://www.mql5.com/en/docs/basis/function/functionoverload
and this code is supposed to be valid:
But compiler throws: 'array' - arrays are passed by reference only.
If I remember well, at some point there was a decision to pass arrays only as reference to be able to send fixed length arrays as formal parameters.
I don't know if I'm right. But if this is the case, then documentation has to be changed, right?
It's not thaaat important anyway, but it gets confusing when you copy paste the example and then you get errors.
---
(this version with const int array[] was attractive, because of naming problems (formal array name coinciding with a global variable name, and then errors))