Microsoft KB Archive/32690

FORTRAN-80 “IF” Statements Must Use Logical

PSS ID Number: Q32690 Article last modified on 07-18-1988

3.36 3.37 3.42 3.43 3.44 CP/M-80

Summary: In Microsoft FORTRAN-80, the following is incorrect: A = ### IF A = ### THEN However, the following is correct: A = (some number) B = (some other number) IF (A .EQ. B) THEN A and B must be defined as type logical, or must be assigned a numeric value. This cannot be used for multi-character data because the operator .EQ. does a floating subtract and the bit pattern that results may be different from what is expected.