Both relational operators and logical operators compare two values and produce a result that is called a condition. With relational operators, a related action is taken only if the condition is true. No action is taken if the condition is false. For information on the order in which relational operators are evaluated, see the Order of Precedence.

The following example describes the function of the relational operator.


You are reading the newspaper one morning and find that it is going to be a beautiful day. You say to yourself, "If it gets warmer than 80F, I will go to the beach. If not, then I will stay home."

You have just used a relational operator to determine your actions for the day. Your condition is the temperature. If the temperature is greater than 80F (the condition is true), then you will go to the beach. If the temperature is 80F or less (the condition is false), then you will stay home.

PPCL supports the following relational operators:

  • Equal to (.EQ.)
  • Greater than or equal to (.GE.)
  • Greater than (.GT.)
  • Less than or equal to (.LE.)
  • Less than (.LT.)
  • Not equal to (.NE.)