The 5th parameter of the function CopyBuffer()

 

Hi,

1. Here is says that the 5th parameter of the function CopyBuffer() is:

    double    buffer[]

2. In MT5 is says (as you can see in the image attached) that the 5th parameter of the function CopyBuffer() is:

    double &double_array[]

3. So, does the website (from point 1) need to be updated with the information from point 2 ?


Thank you !

Files:
copybuffer.jpg  15 kb
 
R0bot:

Hi,

1. Here is says that the 5th parameter of the function CopyBuffer() is:

    double    buffer[]

2. In MT5 is says (as you can see in the image attached) that the 5th parameter of the function CopyBuffer() is:

    double &double_array[]

3. So, does the website (from point 1) need to be updated with the information from point 2 ?


Thank you !

It's the same.
 
R0bot: 3. So, does the website (from point 1) need to be updated with the information from point 2 ?

Yes. You can't pass an array by value.

 
Alain Verleyen #:
It's the same.

Hmm, I'm not so sure about "It's the same":


1. The variable name "buffer" is the same just with the variable name "buffer".

     The variable name "buffer" is not the same with the variable name "double_array".


2. double buffer[] is a local variable in the CopyBuffer() function.

    double &double_array[] is a reference variable.


So ?

 
R0bot #:

Hmm, I'm not so sure about "It's the same":


1. The variable name "buffer" is the same with the variable name "buffer".

     The variable name "buffer" is not the same with the variable name "double_array".

2. double buffer[] is a local variable in the CopyBuffer() function.

    double &double_array[] is a reference variable.


So ?

The docs are wrong...



 
R0bot #:

Hmm, I'm not so sure about "It's the same":


1. The variable name "buffer" is the same just with the variable name "buffer".

     The variable name "buffer" is not the same with the variable name "double_array".


2. double buffer[] is a local variable in the CopyBuffer() function.

    double &double_array[] is a reference variable.


So ?

That's right. But doesn't matter the signature, arrays are always passed by reference.

There are hundreds of such thing in the documentation. Not worth mentioning as even more important things are not fixed.

Reason: