FORTRAN 77 Language Reference

Examples

Example 1: ELSE:


       CHARACTER S 
       ... 
       IF ( S .GE. '0' .AND. S .LE. '9' ) THEN 
              CALL PUSH 
       ELSE 
              CALL TOLOWER 
       END IF 
       ... 

Example 2: An invalid ELSE IF where an END IF is expected:


       IF ( K .GT. 5 ) THEN 
              N = 1 
       ELSE 
              N = 0 
       ELSE IF ( K .EQ. 5 ) THEN 	           Incorrect 
       ...