next up previous contents
Next: Introduction to Procedures Up: Program Units Previous: Main Program Syntax

 

Program Example

    PROGRAM Main
     IMPLICIT NONE
     REAL :: x
      READ*, x
      PRINT*, FLOOR(x) ! Intrinsic
      PRINT*, Negative(x)
    CONTAINS
     REAL FUNCTION Negative(a)
      REAL, INTENT(IN) :: a
       Negative = -a
     END FUNCTION Negative
    END PROGRAM Main

For more information, click here gif


next up previous contents
Next: Introduction to Procedures Up: Program Units Previous: Main Program Syntax

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