Argument passimg in MQL4

 
I know C/C++ and find the syntax of MQL4 to be compatible with C, However there are annoying differences such as not being able to do a pre decrement operator (--pos), etc.

How do you pass arguments to functions that modify the arguments. In C you can use pointers and in C++ you can additionally use a ref type. Is there any equivalent in MQL4?
 
karan:
I know C/C++ and find the syntax of MQL4 to be compatible with C, However there are annoying differences such as not being able to do a pre decrement operator (--pos), etc.

How do you pass arguments to functions that modify the arguments. In C you can use pointers and in C++ you can additionally use a ref type. Is there any equivalent in MQL4?
use the '&' symbol in your parameter descriptions at the function level. Example

void MyFunction( int& count )
{
count = count + 1;
return;
}

What ever argument you pass this function it will get incrimented by one.
 

use the '&' symbol in your parameter descriptions at the function level. Example

void MyFunction( int& count )
{
count = count + 1;
return;
}

What ever argument you pass this function it will get incrimented by one.
Thanks. Looks like they use the C++ ref syntax.
Reason: