Questions from Beginners MQL4 MT4 MetaTrader 4 - page 201
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
Do you want it for mt4 or mt5? I deleted the code I posted. I did not immediately notice that mt4 was discussed here
MQL4
MQL4
I advise you - there are a lot of good things to findhttps://www.mql5.com/ru/forum/131859/page6#comment_3359705
A more specific and perhaps interesting question:
I use the same construct in different functions
However, some functions are void type and others return a value, so I return zero from them:
Can I make a magic macro that substitutes the right one for me in each case?
A more specific and perhaps interesting question:
I use the same construct in different functions
However, some functions are void type and others return a value, so I return zero from them:
Can I make such a magic macro, which in each case would substitute for me the necessary variant?
Using return in a macro is a cocked gun pointed at its own leg, and when combined with if - it turns into a cannon))) But if you really want to:
I haven't tested it, but it should work. Also turned the gun back into a pistol)))
Thank you!
So I pass in the last parameter either a value for return, or a blank, which will turn into
return ;
and a space means nothing. Of course, how did I forget that it can be used without my favourite brackets.
By the way, could you tell why this construct is inside a loop, which can be executed only once? Is it a gun, turned back into a gun? Are there possible situations like infinite recursion or something like that?
Thank you!
So I pass in the last parameter either a value for return, or a blank, which will turn into
and a space means nothing. Of course, how did I forget that it can also be used without my favourite brackets.
By the same token, can you tell me why this construct is stuffed inside a loop that can only be executed once? Is it a gun turned back into a gun? Possible situations like infinite recursion or something like that?
if (condition) CHECK_READ(h,r,0); else CHECK_READ(h,r,1);
=
That seems to be the case, if I understand the substitution principle correctly.
Extra semicolons after curly brackets. And it's not clear what else refers to now.
It's a pity there's apparently no easy way to automate macro expansion to see what happens. Unless you can make your own script.
Thank you! There is a reason there is no semicolon after while in the macro.