Operators in expressions

Operators are used in expressions to indicate an action to be performed on the operands in the expression or the relationship between the operands.

There are four kinds of operators, one for each of the four types of expressions:

Each operator must be between the operands of the expression in which it is used; for example, (&A + 4). Operators can be specified as a predefined value (for example, *EQ) or as a symbol (for example, =).

The following character combinations are the predefined values and symbols that represent the four kinds of operators; they should not be used in unquoted strings for any other purpose.

Table 1. Predefined values and symbols representing the four kinds of operators
Predefined Value Predefined Symbol Meaning Type
+ Addition Arithmetic operator
- Subtraction Arithmetic operator
* Multiplication Arithmetic operator
/ Division Arithmetic operator
*CAT || 1 Concatenation Character string operator
*BCAT |> 1 Blank insertion with concatenation Character string operator
*TCAT |< 1 Blank truncation with concatenation Character string operator
*AND & AND Logical operator
*OR | 1 OR Logical operator
*NOT ¬ 2 NOT Logical operator
*EQ = Equal Relational operator
*GT > Greater than Relational operator
*LT < Less than Relational operator
*GE >= Greater than or equal Relational operator
*LE <= Less than or equal Relational operator
*NE ¬= 2 Not equal Relational operator
*NG ¬> 2 Not greater than Relational operator
*NL ¬< 2 Not less than Relational operator
Note:
  1. In some national character sets and in the multinational character set, the character | (hexadecimal 4F) is replaced by the character ! (exclamation point). Either ! or *OR can be used as the OR operator and either || or *CAT, !> or *BCAT, and !< or *TCAT can be used for concatenation in those character sets.
  2. In some national character sets and in the multinational character set, the character ¬ (hexadecimal 5F) is replaced by the character *. Either * or *NOT can be used as the NOT operator in those character sets.
Related concepts
Special character use
Symbolic operators
Related tasks
Add conditional breakpoints
Related reference
Relational expressions