VMS Help Hints, Operators in expressions *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Operands in an expression are connected by operators. If there is more than one operator in an expression, the operator having the highest precedence is evaluated first. If an expression contains operators that have the same order of precedence, the operations are performed from left to right. Use parentheses to override the normal order of precedence. Operator Precedence Description + 7 Indicates a positive number -- 7 Indicates a negative number * 6 Multiplies two numbers / 6 Divides two numbers + 5 Adds two numbers or concatenates two character strings -- 5 Subtracts two numbers or reduces a string .EQS. 4 Tests if two character strings are equal .GES. 4 Tests if first string is greater than or equal to second .GTS. 4 Tests if first string is greater than second .LES. 4 Tests if first string is less than or equal to second .LTS. 4 Tests if first string is less than second .NES. 4 Tests if two strings are not equal .EQ. 4 Tests if two numbers are equal .GE. 4 Tests if first number is greater than or equal to second .GT. 4 Tests if first number is greater than second .LE. 4 Tests if first number is less than or equal to second .LT. 4 Tests if first number is less than second .NE. 4 Tests if two numbers are not equal .NOT. 3 Logically negates a number .AND. 2 Combines two numbers with a logical AND .OR. 1 Combines two numbers with a logical OR
|