FUNCTION surface(r)
  IMPLICIT NONE
  DOUBLE PRECISION, INTENT (in) :: r
  DOUBLE PRECISION :: surface

  DOUBLE PRECISION, PARAMETER :: pi = 3.14159265358979323846d0

  surface = pi * r * r
END FUNCTION surface



PROGRAM circle
  IMPLICIT NONE
  INTERFACE
     FUNCTION surface(r)
       IMPLICIT NONE
       DOUBLE PRECISION, INTENT (in) :: r
       DOUBLE PRECISION :: surface
     END FUNCTION surface
  END INTERFACE


  PRINT *, surface(2.3d0)
END PROGRAM circle
