Logical expressions of any size can be assigned to logical variables of any size. Assigning numerics to logicals is allowed. This practice is nonstandard, however, and is not portable. A relational operator compares two arithmetic expressions, or two character expressions, and evaluates to a single logical value. The period delimiters are necessary.
All relational operators have equal precedence.
Character and arithmetic operators have higher precedence than relational operators. For a relational expression, first each of the two operands is evaluated, and then the two values are compared. If one operand is shorter than the other, the shorter one is padded on the right with blanks to the length of the longer. Each operand is either itself another constant expression, a constant, a symbolic name of a constant, or one of the intrinsic functions called with constant arguments. Constant expressions are permitted in variable format expressions.