Перегрузка операций позволяет использовать операционную нотацию (запись в виде простых выражений) к сложным объектам - структурам и классам. Запись выражений с использованием перегруженных операций упрощает восприятие исходного кода, так как более сложная реализация сокрыта. Для примера рассмотрим широко применяемые в математике комплексные...
Thank you, such implementation has occurred to me, but it is not quite the same due to absence of Value1 itself. That is, the example I created is of course extremely simplified, but it is implied that this is not the main value of the class, that there can be a number of such values and that for each such a construct can be described.
Or for such an implementation, is it possible to describe only a separate class or structure in which to implement the overloading, and in this class to describe variables of the created type? But, if other variables of the class are involved in the assignment operation, then again, it does not add up.
This section provides a tutorial example on how to use 'Property Let/Set/Get' procedure to define public properties. Properties defined through public variables are simple to use. But you can not use them to update internal variables or other properties when their values are changes. A better way to define public properties is to use...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
is it possible to print EMPTY_VALUE as "EMPTY_VALUE" instead of 1797......?
more info... code
"EMPTY_VALUE" cannot be 1797......
more... code
What exactly do you need for the print?
Thank you,
there can only beEMPTY_VALUE in one place))
Thank you,
there can only beEMPTY_VALUE in one place))
I'm not an expert like you, but...
I would like to be able to use a recording instead of
it would be possible to use an entry
I suspect that, if possible, it would be with overloading. But I lack the knowledge and imagination.
If this is possible, please advise how to implement it.
I would like to be able to use a recording instead of
it would be possible to use an entry
I suspect that, if possible, it would be with an overload. But I lack knowledge and imagination.
If it is possible, please advise how to implement it.
https://www.mql5.com/ru/docs/basis/function/operationoverload
https://www.mql5.com/ru/docs/basis/function/operationoverload
Thank you, such implementation has occurred to me, but it is not quite the same due to absence of Value1 itself. That is, the example I created is of course extremely simplified, but it is implied that this is not the main value of the class, that there can be a number of such values and that for each such a construct can be described.
Or for such an implementation, is it possible to describe only a separate class or structure in which to implement the overloading, and in this class to describe variables of the created type? But, if other variables of the class are involved in the assignment operation, then again, it does not add up.
Actually, I wanted to implement something similar to Let/Set/Get methods in vbs.
is it possible to print EMPTY_VALUE as "EMPTY_VALUE" instead of 1797......?
simply overload DoubleToString, if it returns the string "EMPTY_VALUE" otherwise call ::DoubleToString