
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
Which methods? What signatures?
Any methods.
Any methods.
What's that got to do with it?
Yes, we work like with one-dimensional. We don't need to describe the data structure - we read everything in a row.
What's that got to do with it?
You can't define a function (e.g., delete an element) with the same name (e.g., ArrayRemove) defined the same way for arrays of different sizes (unless you're an MQL compiler developer)
In addition, you will not be able to define such a function with the same name, overloading several variants of calls
You'll have to write it like this
ArrayRemove(var&[],int)
ArrayRemove2(var&[][],int)
ArrayRemove3(var&[][],int)
ArrayRemove4(var&[][][][],int)
So handling a multidimensional array as a one-dimensional array makes no sense either, unless you want to redefine all array functions anew in each of the classes that use them
You cannot define a function (e.g. removing an element) with the same name (e.g. ArrayRemove) defined in the same way for arrays of different sizes (unless you are an MQL compiler developer)
In addition, you will not be able to define such a function with the same name, overloading several variants of calls
You'll have to write it like this
ArrayRemove(var&[],int)
ArrayRemove2(var&[][],int)
ArrayRemove3(var&[][],int)
ArrayRemove4(var&[][][][],int)
So handling a multidimensional array as a one-dimensional array makes no sense, unless you want to redefine all array functions anew in each class that uses them
Yes, but that's not such a bad thing.
You cannot define a function (e.g. removing an element) with the same name (e.g. ArrayRemove) defined in the same way for arrays of different sizes (unless you are an MQL compiler developer)
In addition, you will not be able to define such a function with the same name, overloading several variants of calls
You'll have to write it like this
ArrayRemove(var&[],int)
ArrayRemove2(var&[][],int)
ArrayRemove3(var&[][],int)
ArrayRemove4(var&[][][][],int)
So handling a multidimensional array as a one-dimensional array makes no sense, unless you want to redefine all functions of working with arrays again in each of the classes that use them
Ilya, you're going from programming technique to problem statement.
Crawl backwards, do things backwards.
My granddaughter is already asleep, otherwise she would have drawn your attention to the fact that the array elements in MT memory are continuously arranged.
the array elements in MT memory are arranged continuously.
And what do you think this has to do with the task at hand (class of tasks - unified work with arrays of different dimensions via functions)?
For example, you want to make a function to remove an element from an array regardless of its dimensionality. Or you want to make a class that works with arrays of different dimensions. Do you think you can do that in mql?