Unary

The following is a list of all the unary operators and their usages:

Unary Operators
Symbol Example Explanation
- -a unary minus
+ +a unary plus (no-operation)
~ ~a * one's complement
! !a * logical negation
! a! * factorial
$ $3 * call arg/column during `using` manipulation
| |A| cardinality of array A

(*) Starred explanations indicate that the operator requires an integer argument.

Operator precedence is the same as in Fortran and C. As in those languages, parentheses may be used to change the order of operation. Thus -2**2 = -4, but (-2)**2 = 4.

The factorial operator returns an integer when N! is sufficiently small (N 4#4= 20 for 64-bit integers). It returns a floating point approximation for larger values of N.

This operator returns the number of elements 3#3A3#3 when applied to array A. It returns the number of data lines 3#3$DATA3#3 when applied to datablock $DATA.