
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
OK, I'm off. :) I'm also outside the terminal.
Checked elementary - trying to use ArrayResize(...)
It's elementary to try to use ArrayResize(...)
Well here are the mistakes. Citizens of Metaquotes, please pay attention !!!
The essence of the error: when an initialization list (int g[] = {0}; ) is used for an array, thesizeof(g) function gives the size of struct MqlArrayObject (created for a dynamic array).The essence of the error: when an initialization list (int g[] = {0}; ) is used for an array, thesizeof(g) function prints the size of struct MqlArrayObject (created for a dynamic array).
And ArrayIsDinamic() says that the array is static?
j - static
k - dynamic
g - static
....
g - static
Well here are the mistakes. Citizens of the Metacities, please pay attention !!!
The essence of the error: when an initialization list (int g[] = {0}; ) is used for an array, functionsizeof(g) gives out the size of struct MqlArrayObject (created for dynamic array).Thanks for the message, error corrected.
Ilyas!!! Wait a minute!!!
How exactly was it fixed? Did the arrays that were parsed in the declaration become dynamic (resizable)?
Or completely static?
Or is it completely static?
It's a static code, of course.
Oh, now I see.
Renat, I have a suggestion for a long time, just on the subject. Please make a named typing for arrays, at least for static ones (all other types already have it).
That is, you may declare for example: typedef Int8 = int[8];.
The price of the question is the possibility to pass one-dimensional (2, 3-dimensional) arrays, which are subarrays in arrays of larger size, into functions.
I.e. if you declare : Int8 arr[...] further, you can pass arr[i] into function func(Int8 &a) {...}.
Currently, I have to perform a lot of extra actions in mql5 and write a lot of ugly code due to impossibility to pass subarrays into functions.
I don't write in servicedesk, because the topic seems debatable to me.