next up previous contents index
Next: Rules Up: Character Handling and Logic Previous: Guidelines

Logical Expressions

    Logical expressions can be used in logical assignment statements, but are most commonly encountered in IF statements where there is a compound condition, for example:
       IF(AGE .GE. 60 .OR. (STATUS .EQ. 'WIDOW' .AND. 
     $   NCHILD .GT. 0) THEN
This combines the values of three relational expressions, two of them comparing arithmetic values, the other character values. The logical operators such as .AND. and .OR. also need decimal points at either end to distinguish them from symbolic names. The .OR. operator performs an inclusive or, the exclusive or operator is called .NEQV..


Helen Rowlands