Number of possible values in an enum

 

1. How can one get the number of possible values in an enum?

2. How can one iterate through all possible values of an enum?

Thanks

 
RoboSpider:

1. How can one get the number of possible values in an enum?

2. How can one iterate through all possible values of an enum?

Thanks

I investgated same requirement few weeks ago, and I found it's impossible in pure MQL4/5 currently.
 
Xiangdong Guo:
I investgated same requirement few weeks ago, and I found it's impossible in pure MQL4/5 currently.
Thanks Xiangdong.
 
Xiangdong Guo:
I investgated same requirement few weeks ago, and I found it's impossible in pure MQL4/5 currently.

Example...

enum mis_TIPO_AVISOS {now, eMail, SMS, allW};
.../...
int maxEnum= (int)allW + 1;
for(mis_TIPO_AVISOS k= now; k<= allW; k++) makeFunction();

oo

Reason: