Errors, bugs, questions - page 2735

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
Recompiling the library connected to the Expert Advisor, which is selected in the tester, does not result in it being picked up at the next startup. I have to select another Expert Advisor in the tester, then switch to the previous one. Only then tester picks up new library. Completely unobvious bug.
It's the same in the stable version...
C++ online: https://onlinegdb.com/SJN1shM58
but otherwise:
fine. What difference does it make?
It's a compilation error:
but this way:
this is how you should write your first example - with a forward description, by the way a forward description for structures and classes works too
2020.05.10 17:23:27.704 tst1 (ETHUSD,M1) i = 25
ok. What is the difference?
I think the compiler parses the compiler from top to bottom and OnStart() will be analyzed last
In this case, there is no need to think - the rules should be general: if a function can be applied before the declaration, then it can, if not, then it cannot. Accordingly, both cases must either compile or not
In this case, there is no need to think - the rules should be general: if a function can be applied before the declaration, then it can, if not, then it cannot. Consequently, both cases must either compile or not.
alas, this is called a language feature, you can write it this way
Alas, these are called language peculiarities, you can write it that way.
All peculiarities are reflected in the Documentation. I haven't seen this one there. Hence the conclusion: that it is not a feature, but a flaw
In this case, there is no need to think - the rules should be general: if a function can be applied before the declaration, then it can, if not, then it cannot. Accordingly, both cases must either compile or not.
This is the normal behavior of C of such languages.
Without a forward function declaration, they cannot be used. A call from OnStart actually compiles delayed compared to a direct call at the global level.
In C++, the exact same error will be generated.