This is not working as the type is always the same.
I don't think it can be done in mql.
It can be done,this works fine - the problem is dynamic second and third dimensions are not allowed, just fixed
void func(double &array[])
{
Print("1D");
};
void func(double &array[][3])
{
Print("2D");
};
void func(double &array[][4][5])
{
Print("3D");
};
// use with 1Ddouble arr[];
double arr2[][3];
double arr3[][4][5];
//+------------------------------------------------------------------+//| Script program start function |//+------------------------------------------------------------------+voidOnStart()
{
//---
func(arr);
func(arr2);
func(arr3);
}
The rssult printed: 1D 2D 3D So, @parham.trader I don't see how you say the initial version you have works dynamically [][][] (and not [][4][5] - static) because to me that line is not compiled
Amir Yacoby: It can be done,this works fine - the problem is dynamic second and third dimensions are not allowed, just fixed The rssult printed: 1D 2D 3D So, @parham.trader I don't see how you say the initial version you have works dynamically [][][] (and not [][4][5] - static) because to me that line is not compiled
You are right but how this can be useful with fixed dimensions ? Anyway...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
This is not working as the type is always the same.
I don't think it can be done in mql.
1D
2D
3D
So, @parham.trader I don't see how you say the initial version you have works dynamically [][][] (and not [][4][5] - static)
because to me that line is not compiled
Use structures
Something like this - just an example to show how each and every "element" of such and array can have its own size :
It can be done,this works fine - the problem is dynamic second and third dimensions are not allowed, just fixed The rssult printed:
1D
2D
3D
So, @parham.trader I don't see how you say the initial version you have works dynamically [][][] (and not [][4][5] - static)
because to me that line is not compiled
So how does "FileWriteArray" work properly?