Errors, bugs, questions - page 2865

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
It's not possible to create a new product for the marketplace, it says error 500.
The product has been created and checked, it says it's been published, but when you click on the link you get an answer of 500.
Works top-down as a text replacement. I.e. "TMP" will be replaced by "VALUE".
This is not a compiler - it's a preprocessor)
turns into
, and the VALUE is not defined.
How is undef supposed to work?
How is undef supposed to work?
Up to this point, there is "text replacement" going on.
It's not a compiler - it's a preprocessor)
turns into
and the VALUE is undefined.
I understand correctly, the VALUE*2 value type is const and is tied to the substitution itself, i.e. the VALUE is also a constant. The compiler creates two constants.
If so, it must be creating a new substitution.
#define VALUE VALUE1
And it's not correct if VALUE above the code was defined as a constant.
Up to this point there is "text replacement" going on.
Doesn't match, changes TMP toVALUE in line "#define VALUE (TMP*2)" which is after.
Doesn't add up, changes TMP toVALUE in line "#define VALUE (TMP*2)" which is after.
And so the substitutions go on and on until they all end.
There is code:
The first substitution changes the VALUE to 10 throughout the code up to #undef VALUE, leaving this:
The next substitution changes the TMP to 10. It turns out
Where am I going wrong?
There is code:
The first substitution changes the VALUE to 10 throughout the code up to #undef VALUE, leaving this:
The next substitution changes the TMP to 10. It turns out
What am I doing wrong?
It's not 10 which is substituted for TMP, it's the VALUE, but if the VALUE is defined (which is a pain in the ass), it's 10.
Watch this step by step:
The preprocessor faithfully inserts Print
and then, again with no trickery, substitutes what? Right:
and then it erases all the preprocessor's directives and only after that the compiler gets this:
TMP is not 10, but VALUE is substituted for TMP, and then if VALUE is defined (which is a problem), it is 10
Watch this step by step:
The preprocessor faithfully inserts Print
and then, again with no trickery, substitutes what? Right:
and then it erases all the preprocessor's directives and only after that the compiler gets this:
This is not called "top-down".
It's not called top-down.
Sorry, I got confused while trying to explain myself)))
One more time:
At the time of the second VALUE definition, the VALUE macro is not defined, so VALUE is defined as
(VALUE*2)
, because TMP was and still is defined by VALUE.
But TMP, after the second VALUE definition, is expanded to
(TMP*2)
(Something like this))
The preprocessor just fills in what it has and it doesn't matter how and where it is defined. This is why you have to be careful with it. Example:
, and now let's add an evil thing to the function, namely a side effect
And this is just an inscription, but what if the deposit depends on this function?