MetaTrader 5 Platform Build 3950: Deposits/withdrawals in the terminal and updated trading report - page 3

You are missing trading opportunities:
- Free trading apps
- Free Forex VPS for 24 hours
- 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
Forum on trading, automated trading systems and testing trading strategies
Preprocessor regression in build 3950
yoriz, 2023.09.18 21:07
There appears to be a regression in build 3950 (14 Sep 2023) in the behavior of the preprocessor. The code below compiles without errors on the old build 3802 (9 Jun 2023):
#define NAME(prefix, linenr) prefix##linenr
#define MAKE_VAR \
int NAME(example, __LINE__) = 123
void OnStart() {
MAKE_VAR; // int example6 = 123;
MAKE_VAR; // int example7 = 123;
}
However, when compiling this same code in build 3950, I get an error message:
'example__LINE__' - variable already defined
see declaration of variable '"void OnStart()"::example__LINE__'
Unfortunately, I use preprocessor concatenation ## a lot in my code so all my experts and indicators are now broken and don't compile anymore...
I filed a bug report here: https://www.mql5.com/en/forum/628/page112#comment_49409863 (because Service Desk chat-bot did not understand me and was not filing a bug)
Dont feel so pesimistic, its still beta, and probably just an unfixed bug.
How can you say that?! They force everybody to upgrade. That is not a "beta"! That is breaking all MT5's world-wide.
MetaQuotes needs to hire a professional software QA specialist. Who knows how to properly set up CI/CD pipelines, regression tests with sufficient coverage, a *voluntary* beta-test program that is not immediately pushed to all users, etc. etc.
I understand MetaQuotes does not want to maintain many different versions, so they want all users on the same version. However, they could consider having an option to downgrade to the previous version if there are bugs found by the community. If no bugs found during a month, then make the version mandatory and disable downgrade.
Alternatively, consider having a single "Long Term Support (LTS)" version that remains untouched for a year or so. After a year, use a more recent version that has been field tested for a few months as the next LTS version, etc.
fxsaber #:
Temporary solution.
Unfortunately not working for my case where I concatenate __LINE__:
#define NAME(prefix, linenr) prefix##linenr
#define MAKE_VAR \
int NAME(example, __LINE__) = 123
Any ideas how I can generate different variable names calling the same macro? Doesn't need to be line number so can be something else, but X+1 or X++ does not work in preprocessor of course...
P.S. __COUNTER__ is also not working. Same problem with ## operator.Unfortunately not working for my case where I concatenate __LINE__:
#define NAME(prefix, linenr) prefix##linenr
#define MAKE_VAR \
int NAME(example, __LINE__) = 123
Any ideas how I can generate different variable names calling the same macro? Doesn't need to be line number so can be something else, but X+1 or X++ does not work in preprocessor of course...
P.S. __COUNTER__ is also not working. Same problem with ## operator.How can you say that?! They force everybody to upgrade. That is not a "beta"! That is breaking all MT5's world-wide.
MetaQuotes needs to hire a professional software QA specialist. Who knows how to properly set up CI/CD pipelines, regression tests with sufficient coverage, a *voluntary* beta-test program that is not immediately pushed to all users, etc. etc.
I understand MetaQuotes does not want to maintain many different versions, so they want all users on the same version. However, they could consider having an option to downgrade to the previous version if there are bugs found by the community. If no bugs found during a month, then make the version mandatory and disable downgrade.
Alternatively, consider having a single "Long Term Support (LTS)" version that remains untouched for a year or so. After a year, use a more recent version that has been field tested for a few months as the next LTS version, etc.
Before this latest update I could define function-like macros as follows, without issue ...
With this new build, this throws an error ...
To resolve it, I have to define it differently, by giving it a parameter, for example as follows ...
This seems to contradict the way a function-like macro can be defined with an empty parameter list in C/C++. For example, the following can be found in many renditions of the standard C library stdio.h ...
Any ideas how I can generate different variable names calling the same macro?
Unfortunately, this is not possible now.
Before this latest update I could define function-like macros as follows, without issue ...
OMG...
I received now the latest non-Beta build 3980.
The STRATEGY TESTER panel is crazy
But when we detach the panel, the START button suddenly appears.
It's really annoying that all releases bring bugs together.
(I work in a software development company)