Errors, bugs, questions - page 996

 
TheXpert:
No, it doesn't.
In MQL4 this construction does not cause an error and everything works
 
A100:
In MQL4 this construction does not cause errors and everything works
Well, it should not work in Service Desk by logic, which is exactly what the compiler says.
 
TheXpert:
logically should not work, which is what the compiler explicitly says.
Why shouldn't it work? A function is declared in 1.mqh, its implementation in 1.mq5 is used in 2.mq5
 
A100:
Why shouldn't it? In 1.mqh the function is declared, in 1.mq5 its implementation, in 2.mq5 it is used

One function is definition, the other import.

Why do you have to do such a mess in the first place? Include a header with an import from itself?

 
TheXpert:

Why do such a mess at all? Include a header with imports of its own?

How else to include it in 1.mqh
int B() { return ( A( 0 ) ); }
So that it can be used in both 1.mq5 and 2.mq5
 
What is the function that shows the memory occupied by the EA? It happens that the EA or script interrupts its work because of the lack of memory.
 
A100:

I think it's a bug, judging by the error - ME5 compiler can't distinguish function description from its implementation (even though ME4 could distinguish) and thinks they are two different functions with the same name.

This is ambiguous. It looks awfully crooked, we could do without it by introducing another header.
 
One thing's for sure, and the lousy one's for a bath. What's wrong with the foursome forum again?
 
Thank you.
 
int OnInit()
  {
   Print ("Инициализация индикатора");
In what case can OnInit not be executed in an indicator?
Reason: