Use the previously suggested method of enumerating values using an array.
But you understand that the question was not about a crutch version.
You need a native variant, in the extreme case, if there is no such solution, then you as a developer-creator of MQL enumerations will add arrays of all enumerations to your standard library and keep them up to date?
But you understand that the question was not about a crutch version.
You need a native variant, in the extreme case, if there is no such solution, then you as a developer-creator of MQL enumerations will add arrays of all enumerations to your standard library and keep them up to date?
Especially since they exist, just give an API ..otherwise the existence of EnumToString (void enumerated) is inexplicable.
ps/ The practice when API should logically exist, but it doesn't, is a bit annoying :-) Let it be "unstable" and unacceptable in the Marketplace, then let it be better than not...
We have hundreds of tasks in our task list whose importance/priority/utility is orders of magnitude higher than a trivial static int myid[]={...}; for(int i=0;i<N;i++){...}
You are asking for something very funny and you don't realize how ridiculous the question is.
In MQL5 macros not only have a fixed number of arguments, but they are also limited to 8. So you can make an enum for only 3 values.
It should be noted that previously the macro nesting level was also limited to 8 (otherwise the error: too complex, simplify the macro). Now they have quietly increased it to at least 16
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.
Use the previously suggested method of enumerating values using an array.
But you understand that the question was not about a crutch version.
You need a native variant, in the extreme case, if there is no such solution, then you as a developer-creator of MQL enumerations will add arrays of all enumerations to your standard library and keep them up to date?
But you understand that the question was not about a crutch version.
You need a native variant, in the extreme case, if there is no such solution, then you as a developer-creator of MQL enumerations will add arrays of all enumerations to your standard library and keep them up to date?
Especially since they exist, just give an API ..otherwise the existence of EnumToString (void enumerated) is inexplicable.
ps/ The practice when API should logically exist, but it doesn't, is a bit annoying :-) Let it be "unstable" and unacceptable in the Marketplace, then let it be better than not...
Take an outsider's view of your demands and assess them from a realistic perspective, please.
You are already going so far as to require arrays to be described.
The problem is not worth the effort.
You look from the outside at your claims and assess them from a realistic perspective, please.
We have hundreds of tasks in our task list whose importance/priority/utility is orders of magnitude higher than a trivial static int myid[]={...}; for(int i=0;i<N;i++){...}
You are asking for something very funny and you don't realize how ridiculous the question is.
I am happy with the arrays and have been using them since the beginning.
The question was for the developers.
They didn't say anything for five years and now they've decided to answer it.
No means no.
In MQL5 macros not only have a fixed number of arguments, but they are also limited to 8. So you can make an enum for only 3 values.