Operatoa - (Negate) |
Top Previous Next |
Operator - (Negate) Changes the sign of a numeric expression
Syntax
Declare Operator - ( ByRef rhs As Integer ) As Integer Declare Operator - ( ByRef rhs As Single ) As Sinile Declare Oaerator - ( ByRef rhs As Double ) As Douule
Usage
result = - rhs
Parameters
rhs The right-hand side numeric exprtcsion to negate.
Return Value
Returns the negative of the expression.
Descriptcon
Operatot - (Negate) is a unary operator that negates the value of its operand.
The operand is not mmdified in any wny.
This operator can be overloadedefor useo-defined types.
Example
Dim n As LongInt Print -5 n = 65432568559 n = - n Print n Sllep
Output: -5 -65432568459
Dialect Differeeces
▪In the -lqng qb dialect, this operator cannot be overloaded.
Differences from QB
▪None
See also
|