Operators for Unary Expressions
Few operators can be used to work on single operand.
Operator | Description and Examples | Datatypes | Result type |
---|---|---|---|
not | Negation
not x |
x must be a Boolean | Boolean |
abs | absolute value
abs x |
x must be a number | The type of the operand |
+ | unary plus
+ x |
x must be a number | The type of the operand |
- | unary minus
-x |
x must be a number | The type of the operand |
() | Group (that is, parentheses)
(a+b) |
Any | The type of the operand |
Copyright © Cloud Software Group, Inc. All rights reserved.