next up previous contents
Next: Intrinsic Logical Operations Up: Expressions and Assignment Previous: Intrinsic Numeric Operations

 

Relational Operators

The following relational operators deliver a LOGICAL result when combined with numeric operands,

tabular3640

For example,

    bool = i .GT. j
    boule = i > j
    IF (i .EQ. j) c = D
    IF (i == j)   c = D

When using real-valued expressions (which are approximate) .EQ. and .NE. have no real meaning.

    REAL :: Tol = 0.0001
    IF (ABS(a-b) .LT. Tol) same = .TRUE.

For more information, click here gif


next up previous contents
Next: Intrinsic Logical Operations Up: Expressions and Assignment Previous: Intrinsic Numeric Operations

©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997
Not for commercial use.