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, =).
(&VAR *EQ 7)
Where the division operator follows a variable name, the division operator must be preceded by a blank. For example, (&VAR / 5) or (&VAR /5) is valid; (&VAR/5) is not valid.
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.
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:
|