The logical IF statement conditionally executes a single Fortran statement based on the current value of a logical expression within the logical IF statement. It takes the following form:
IF (e) st
The logical IF statement first evaluates the logical expression e and then acts as follows:
The following examples show valid logical IF statements:
IF (J.GT.4 .OR. J.LT.1) GO TO 250 IF (REF(J,K) .NE. HOLD) REF(J,K) = REF(J,K) * (-1.5D0) IF (ENDRUN) CALL EXIT