1. Home
  2. Operator

Operator

is a symbol or symbols denoting an operation in an expression or formula:

Simple

+ (addition), - (subtraction), * (multiplication or product), /  (division or nesting), . (interaction), = (assignment), < (less than), >  (greater than)

Compound

** (exponentiation), *+ (matrix multiplication), -* (crossed deletion), -/ (nested deletion), // (pseudo-term linkage), .EQ. or == (equality), .NE. or /= or (non-equality), .LE. or <= (less than or equal to), .GE. or >= (greater than or equal to), .LT. (less than), .GT. (greater than), .EQS. (string equality), .NES. (string non-equality), .IN. (set inclusion), .NI. (set non-inclusion), .IS. (identifier equivalence), .ISNT. (identifier non-equivalence), .AND. (logical and), .OR. (logical or), .EOR. (logical either or), .NOT. (logical not).

Only + - * / . -/ -* and // may occur in formulae, while . -* -/ and // cannot occur (as operators) in expressions.

Precedence

The list below shows the order in which the operators are evaluated when they are used in expressions, if brackets are not used to make the order explicit:

(1)                                                 .NOT. Monadic -

(2)                                                 .IS. .ISNT. .IN. .NI. *+

(3)                                                 **

(4)                                                 * /

(5)                                                 + Dyadic -

(6)                                                  == = /= .LT. .GT. .EQ. .LE. .GE. .NE. .NES.

(7)                                                 .AND. .OR. .EOR.

(8)                                                 =

(Monadic minus means the use of the minus sign in a negative number: for example, -1.) Within each class, operations are done from left to right within a expression, unless brackets are used to indicate some other order.

Updated on February 25, 2019

Was this article helpful?