Директивы препроцессора используются компилятором для предварительной обработки исходного кода перед его компиляцией. Директива всегда начинается со знака Каждая директива описывается отдельной записью и действует до переноса строки. Нельзя в одной записи использовать несколько директив. Если запись директивы получается слишком большой, то её...
Well, that's not serious at all. I'll be dead before I learn English.
Unfortunately, all the best is invented there, so if you don't know English, so it's your problem. Personally, I'm learning. The same docs on google translate the pros, very much even contribute to learning, because such crap from this translator in Russian that there's simply nowhere to go. But the sharpshooters with the docks lucky, like the Russian team in the development team a little more than a dime))))
Well, that's not serious at all. I'll be dead before I learn English.
if fast and very fast, #if is a check for a condition known before compilation, while in MQL there is only #ifdef - a check for the corresponding define, i.e. the code
constint x = 2;
#if x>0#include "lib1.mqh"#elif #include "lib2.mqh"#endif
will not work
but that's not exact! )))) - I don't like macros, but sometimes it's hard without them ((((
if fast and very fast, #if is a check for a condition known before compilation, while in MQL there is only #ifdef - a check for the corresponding define, i.e. the code
will not work
but that's not exact! )))) - I don't like macros, but sometimes it's hard without them ((((
I don't know exactly the latest C++ standards, but "#if x>0" seems not to be implemented anywhere. It's usually about "#if defined DEBUG && defined LEVELS", at least.
There have been a lot of complaints about the editor in recent years. Saying "make a list" is wrong. No one sees the point in seriously sitting down and making such a list because they don't believe in the response.
To improve the editor, all you have to do is start implementing standard features from popular IDEs.
In a nutshell, what's missing for me:
Code Folding.
Full list of functions by Alt-M, even if the functions are wrapped in #ifdef/#endif.
Calling an external styler. I use clang. The built-in one doesn't suit me at all, it's just sets of fixed settings.
Controls external changes to open files.
More powerful debugging options. For example, changing variable values, breakpoints on variable changes (including by condition). I don't hope to "step back" when debugging, it's too much.
It's all been implemented back in the furry years.
I don't know exactly the latest C++ standards, but "#if x>0" doesn't seem to be implemented anywhere. It's usually about "#if defined DEBUG && defined LEVELS", at least.
#define a 3
#if a<5
...
#endif
This will work. The whole point here is the translation phase. When the preprocessor is running, it knows nothing about constexpr variables, because this is already compile time.
Isn't that what it is?
Isn't that what it is?
My man, I wrote about #if - it's not there. Learn the basics.
Well, explain the difference. Maybe I'll learn something. Otherwise I'll die ignorant...
So explain the difference. Maybe I'll learn something. Or I'll die ignorant...
https://en.cppreference.com/w/cpp/preprocessor
Well, that's not serious at all. I'll be dead before I learn English.
Well, that's not serious at all. I'll be dead before I learn English.
Well, that's not serious at all. I'll be dead before I learn English.
if fast and very fast, #if is a check for a condition known before compilation, while in MQL there is only #ifdef - a check for the corresponding define, i.e. the code
will not work
but that's not exact! )))) - I don't like macros, but sometimes it's hard without them ((((
if fast and very fast, #if is a check for a condition known before compilation, while in MQL there is only #ifdef - a check for the corresponding define, i.e. the code
will not work
but that's not exact! )))) - I don't like macros, but sometimes it's hard without them ((((
I don't know exactly the latest C++ standards, but "#if x>0" seems not to be implemented anywhere. It's usually about "#if defined DEBUG && defined LEVELS", at least.
There have been a lot of complaints about the editor in recent years. Saying "make a list" is wrong. No one sees the point in seriously sitting down and making such a list because they don't believe in the response.
To improve the editor, all you have to do is start implementing standard features from popular IDEs.
In a nutshell, what's missing for me:
Code Folding.
Full list of functions by Alt-M, even if the functions are wrapped in #ifdef/#endif.
Calling an external styler. I use clang. The built-in one doesn't suit me at all, it's just sets of fixed settings.
Controls external changes to open files.
More powerful debugging options. For example, changing variable values, breakpoints on variable changes (including by condition). I don't hope to "step back" when debugging, it's too much.
It's all been implemented back in the furry years.
I don't know exactly the latest C++ standards, but "#if x>0" doesn't seem to be implemented anywhere. It's usually about "#if defined DEBUG && defined LEVELS", at least.