Numeric negation operator (-)
Value
The value to negate.
Returns
The negated value.
Negates the number, which is equivalent to multiplying it by -1.
Examples
Negates the value of the field named NumberField1. If NumberField1.ValueNumberField1,Value is 4, then -4 is returned.
Negates the value of the field named NumberField1. If NumberField1.ValueNumberField1,Value is 4, then -4 is returned.
Returns { -4, 2 }{ -4; 2 }, as each individual array element is effectively multiplied by -1.
Value
The value to negate.
Returns
The negated value.
Negates the logical value, treating it as a number. (TRUE is interpreted as 1 and FALSE is interpreted as 0.) Negating a number is equivalent to multiplying it by -1.
To convert a logical value, or an array of logical values, to a number or a number array without transforming the values, use the -- operator or the TONUMBER function instead.
Examples
Returns -1, as TRUE is interpreted as 1 and 1 multiplied by -1 is -1.
Returns 0, as FALSE is interpreted as 0 and 0 multiplied by -1 is 0.
Returns { -1, 0, -1, -1 }, as each individual array element is negated — TRUE is replaced by -1 and FALSE is replaced by 0.