On charts (particularly EURUSD) with monthly and weekly timeframes, the crosshair moves very slowly following the cursor - just move the cursor smoothly diagonally to play. It is OK in other timeframes. There was no such delay before
Alexey Navoykov: Everything seems to be correct, I think. The move constructor is probably called there, which in MQL is replaced by copy.
A conversion is like (A)a1
(A)a1 or A(a1) is not a cast, it is a declaration of a type like in the docs. Although now there is something wrong with brackets. A single format is needed for the language.
(A)a1 or A(a1)type conversion A a1 is not a conversion, but a type declaration like in the docs. Although now there is something wrong with brackets. A common format is needed for the language.
The difference is that (A)a1 in pluses means the object copy conversion. And in MQL it is the reference conversion. Because of this, one can get a compatibility problem.
Long ago I asked them to make a conversion like in pluses: (A&)a1, but now they probably won't change anything.
Alexey Navoykov: The difference here is that in pluses (A)a1 means bringing in a copy of an object. And in MQL it is the reference conversion. Because of this, one can encounter compatibility issues.
I've long asked them to make a sonic conversion like in the pros: (A&)a1, but they're probably unlikely to change anything now.
Not si not python) something in between. Oops, didn't know, figured the object type conversion. Economy).
Alexey Navoykov: Everything seems to be correct. It's just that the move constructor is probably called there, which in MQL is replaced by copying.
And the ghost is like (A)a1
I doubt it's right, because let's say:
class A {
public:
virtualvoid f() { Print( 1 ); }
};
class B : public A {
public:
virtualvoid g() { ((A)this).f(); }
};
class C : public B {
public:
virtualvoid f() { Print( 3 ); }
};
voidOnStart()
{
B *b = new C;
b.g();
}
class A {
public:
virtualvoid f() { Print( 1 ); }
};
class B : public A {
public:
virtualvoid g() { this.A::f(); } //1
};
class C : public B {
public:
virtualvoid f() { Print( 3 ); }
};
voidOnStart()
{
B *b = new C;
b.g();
}
On charts (particularly EURUSD) with monthly and weekly timeframes, the crosshair moves very slowly following the cursor - just move the cursor smoothly diagonally to play. It is OK in other timeframes. There was no such delay before
Execution error:
Result: 1-2-2-0-0-0
Expected result: 1-2-0-0
as in C++. Also, the syntax was expected to be consistent: a cast is a cast, not a constructor call
Everything seems to be correct, I think. The move constructor is probably called there, which in MQL is replaced by copy.
(A)a1 or A(a1) is not a cast, it is a declaration of a type like in the docs. Although now there is something wrong with brackets. A single format is needed for the language.
(A)a1 or A(a1)type conversion A a1 is not a conversion, but a type declaration like in the docs. Although now there is something wrong with brackets. A common format is needed for the language.
The difference here is that in pluses (A)a1 means bringing in a copy of an object. And in MQL it is the reference conversion. Because of this, one can encounter compatibility issues.
Not si not python) something in between. Oops, didn't know, figured the object type conversion. Economy).
Everything seems to be correct. It's just that the move constructor is probably called there, which in MQL is replaced by copying.
I doubt it's right, because let's say:
The result in MQL: 3
and in C++: 1.
In any case, have them check
I doubt that this is correct, because let's say:
The result in MQL: 3
and in C++: 1.
In any case, have them check
I doubt that this is correct, because let's say:
The result in MQL: 3
and in C++: 1.
In any case, let them check it.
I wouldn't be so definite when interpreting MQL code in C++.
Code for C++ (online: https://onlinegdb.com/Hy1FIj9Qv):
I wouldn't be so unambiguous when interpreting MQL code in C++.
The code is for C++ (online: https://onlinegdb.com/Hy1FIj9Qv):
And how do you propose to write the 3rd version of g_cast in MQL ?
And how do you propose to write the 3rd version of g_cast in MQL?
You can explicitly call the function from the base class: