- Operator
Language Items List
Definition:
Used to subtract two numbers or to change the sign of a number.
Syntax (1):
result = expr1 - expr2
Syntax (2):
- expr
Syntax Description
expr1, expr2 Any numeric expression.
expr Any numeric expression.
Details:
The - operator can be used as an arithmetic operator to find the difference
between two numbers, or as a unary negation operator to change the sign of a
numeric value. It changes positive numbers to negative and vice-versa. Syntax 1
shows the arithmetic operator, and Syntax 2 shows the unary negation operator.
In Syntax 1, the result data type is usually the same data type as the most precise number. The order
of precision that Phoenix follows, starting with the least precise, is
Integer, Long, Single, Currency, Double.
See Also:
Arithmetic Operators
Comparison Operators
Operator Precedence