Errors, bugs, questions - page 1784

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
Look here - Program run
For a summary of the programmes in MQL5, see the table below:
Program
Execution
Note
Script
In its own thread, as many scripts as there are execution threads for them
A looped script cannot interrupt the work of other programs
Expert
In its own thread, as many experts - as many execution threads for them
A looped expert cannot disrupt work of other programs
Indicator
One execution thread for all indicators on one symbol. As many indicator symbols - as many execution threads for them
Endless loop in one indicator will stop all other indicators on this symbol
Forum on trading, automated trading systems & strategy testing
Bugs, bugs, questions
Slawa, 2017.02.06 07:22
But here too, you can't bank on the fact that the Deinit command on M5 will be processed before the Init command on M15Alas, I am not familiar with this format.
The experiment showed that the number in the graphical buffer is represented by the same rules as double - i.e. it is not possible to pass such a long number through the graphical buffer - frustrating.
Alas, the graphical buffer can only hold a number of 10 digits.
By the way, why is there a 4 decimal places limit?
Compilation error (or rather no error message)
public:
int i;
};
class B : public A {};
class C : protected A {};
class D : protected B {};
void OnStart()
{
C c;
Print( c.i ); //Error: 'i' - protected member access error
D d;
Print( d.i ); //нормально???
}
Execution error: EX5 loading failed
typedef void (*f)( A*);
class A {
virtual void g( A *a ) {}
f ff;
};
void OnStart() { Print( __FUNCTION__ ); }
Error during execution
void f( B* );
class A { public:
virtual ~A() { f((B *)&this ); } //(*)
virtual void g( A* ) { Print( __FUNCTION__ ); }
};
class B : public A { public:
virtual void g( A* ) { Print( __FUNCTION__ ); }
};
void f( B *b ) { b.g( b ); }
void OnStart() //(1)
{
B *b = new B;
delete b;
}
Result: incorrect casting of pointers in (*)
And if
result: B::g
but what is the fundamental difference between OnStart (1) and (2)?
Besides, the result of a similar code in C++: A::g
A100:
What would a virtual destructor like the one in your example above be for? Can it be overridden in the descendant?
What would a virtual destructor like the one in your example above be for? Can it be overridden in the descendant?
In MQL it is always virtual, even if it is not explicitly stated
So you haven't answered the question - what for?
If all destructors in MQL are virtual, then the question of what a virtual destructor is for is reduced to the question of what a destructor is for? And this is too general a question.