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
That's your assumption.
Refer to https://www.mql5.com/en/docs/basis/preprosessor/include and you'll read following:
" The preprocessor replaces the line #include <file_name> with the content of the file ..."
"#include" is a simple "text replacement".
As I said, know your tool not your "wish tool".
Ideally yes, but the problem is that the decision was made early on that #include would be a copypasta directive and nothing else. That means if it were to be changed now it would break countless programs. You're just going to have to stop fighting because that's a battle that cannot be won. We should instead focus on getting the namespace implementation fixed to work as documented so you can wrap your imports in a namespace to avoid all this mess that's driving you nuts.
Ideally yes, but the problem is that the decision was made early on that #include would be a copypasta directive and nothing else. That means if it were to be changed now it would break countless programs. You're just going to have to stop fighting because that's a battle that cannot be won. We should instead focus on getting the namespace implementation fixed to work as documented so you can wrap your imports in a namespace to avoid all this mess that's driving you nuts.
I just found that it's not about text replacement. In MQL the order of declarations and using them is not important. You can define functions and variables and use them in any order you like. That’s why an included file has access to all declarations below itself.