Guys, there are strange things in MT4 with array sizing that never happened before.
If I use this, no problem:
But if I use this, I got a compiler message ("the size of local variables is too large (more than 512kb)")
I can't remember such limitations in the past.
Also, earlier I could define a function like this:
But now, it doesn't work, SIZE1 is ignored.
Can you confirm my observations?
The second question, it doesn't make sense to define a size for first dimension of array in function definition.
Why?! It is a static array. I always did it and worked well.
Because array is defined in the body, not in the function definition.
I think it is a false statement. Where do you see such rule?
As I said, this worked well until now. But now it stopped working.
Regarding the first problem: is there any array-size limitation?
I think it is a false statement. Where do you see such rule?
As I said, this worked well until now. But now it stopped working.
...
Regarding the first problem: is there any array-size limitation?
Arrays are passed to functions by reference.
Yes, I forgot to write the &:
int SomeFunction(int &array[SIZE1][SIZE2]){...}
Array sizing: this code below gives 0.
double array[][5000]; ArrayResize(array,5000); Print(ArraySize(array));
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Guys, there are strange things in MT4 with array sizing that never happened before.
If I use this, no problem:
But if I use this, I got a compiler message ("the size of local variables is too large (more than 512kb)")
I can't remember such limitations in the past.
Also, earlier I could define a function like this:
But now, it doesn't work, SIZE1 is ignored.
Can you confirm my observations?