Arithmetic expressions contain numeric data such as variables, record elements, array elements, constants, function references, and arithmetic expressions enclosed in parentheses. The expression evaluates to a numeric value. The numeric operators are as follows:Operator Ranking Description
** 1 exponentiation (evaluated right to left) * 2 multiplication / 2 division + 3 addition - 3 subtractionYou can use parentheses to force an order of evaluation.
Character expressions consist of character elements and character operators. Evaluation of a character expression yields a single value of character data type. A character element may be a constant, variable, record element, array element, substring, expression (optionally enclosed in parentheses), or a function reference.A character expression has the form:
character element[//character element]...
The concatenation operator (//) is the only character operator. Concatenation is from left to right.
Logical expressions may contain logical and integer data such as variables, record elements, array elements, constants, function references, expressions enclosed in parentheses, and relational expressions. The expression evaluates to a logical value using the following operators:
OPERATOR PRECEDENCE ** First (Highest) *,/ Second +,-,// Third Relational Operators Fourth .NOT. Fifth .AND. Sixth .OR. Seventh .XOR. Eighth (Lowest) .NEQV. Eighth .EQV. Eighth
Relational expressions consist of either two arithmetic or two character expressions separated by relational operators. The expression is reduced to a logical value (true or false).OPERATOR DESCRIPTION .LT. Less than .LE. Less than or equal to .EQ. Equal to .NE. Not equal to .GT. Greater than .GE. Greater than or equal to
Expressions of COMPLEX data type can use only .EQ. and .NE. operators.