A significant argument for the introduction of * (which has not been voiced before) may be the following:
class A { public:
virtualbooloperator==( A& ) { Print(__FUNCSIG__); returntrue; }
virtualbooloperator==( A* ) { Print(__FUNCSIG__); returntrue; }
};
void today( A *a, A *b )
{
a == b; //сравниваются указатели на равенство
a.operator==( b ); //вызывается a.operator( A* )//нет синтаксиса вызова a.operator( A& )
}
so one cannot call a.operator( A& ) even explicitly, which is significant
In this case, introduction of * together with making the operation of pointer comparison into a separate function (perhaps a system function) will resolve all the existing ambiguities
void future( A *a, A *b )
{
a == b; //вызывается a.operator( A* )
a == *b; //вызывается a.operator( A& )
::IsEqualPointer( a, b ); //сравниваются указатели на равенство
}
If it was optimal, it will become ideal!
We have added operators *(Dereference/Inderection) and &(Address-of), we are not going to make any additional changes in the language
A *a,*b;
a== b; // сравнение "указателей"
*a== b; // вызов оператора ==(A *)
a==*b; // вызов оператора ==(A &)// для операции != аналогично
// операция & - эквивалент(короткая запись) вызову GetPointer
I'd like to know about the prospect of introducing property (as a class member). I asked this question recently, but there were no comments from the developers. Is it planned, or should I do a poll on the forum as to whether this feature is needed?
Alexey Navoykov: I'd like to know about the prospect of introducing property (as a class member). I asked this question recently, but there were no comments from the developers. Is this planned, or should I do a poll on the forum as to whether this feature is needed?
Here's another inconvenience. When we try to implement something like this
a.b().c().d();
then after the first pair of parentheses, the auto-substitution list with class member names stops popping up, and all further text has to be typed completely manually/blindly.
Alexey Navoykov: Here's another inconvenience. When trying to implement something like this:
then after the first pair of parentheses, the auto-substitution list with class member names stops popping up, and all further text has to be typed completely manually/blindly.
It would be nice to add to debugger a hint about type of used variable, like in all advanced IDEs
boolFileIsExist( const stringfile_name,//file name intcommon_flag=0// search area );
The file being checked can be a subdirectory. In this case FileIsExist() will return false, and error 5018 will be written to the _LastError variable - "This is not a file, but a directory". (see example for FileFindFirst function).
The question is: is arbitrage possible in forex?
so one cannot call a.operator( A& ) even explicitly, which is significant
In this case, introduction of * together with making the operation of pointer comparison into a separate function (perhaps a system function) will resolve all the existing ambiguities If it was optimal, it will become ideal!We have added operators *(Dereference/Inderection) and &(Address-of), we are not going to make any additional changes in the language
Added operators *(Dereference/Inderection) and &(Address-of)
Added operators *(Dereference/Inderection) and &(Address-of), no additional changes in the language will be made/planned
is this only in MQL5 or has it been added to MQL4 as well?
I'd like to know about the prospect of introducing property (as a class member). I asked this question recently, but there were no comments from the developers. Is this planned, or should I do a poll on the forum as to whether this feature is needed?
then after the first pair of parentheses, the auto-substitution list with class member names stops popping up, and all further text has to be typed completely manually/blindly.
Here's another inconvenience. When trying to implement something like this:
then after the first pair of parentheses, the auto-substitution list with class member names stops popping up, and all further text has to be typed completely manually/blindly.
boolFileIsExist(
const stringfile_name,//file name
intcommon_flag=0// search area
);
The file being checked can be a subdirectory. In this case FileIsExist() will return false, and error 5018 will be written to the _LastError variable - "This is not a file, but a directory". (see example for FileFindFirst function).
5018 does not work in subfolders/subdirectories
For example if
and the example https://www.mql5.com/ru/docs/files/filefindfirst would have
the result would be
and it should be 1: Directory = Dir2\.