PROGRAM Process_Circles_1
!---------------------------------------------------------
! Program to calculate and display areas of circles.
! Imports from module Circle:
!          real variable Radius
! Input:   Radius of circle
! Output:  Area of circle
!---------------------------------------------------------

   USE Circle, ONLY : Radius
   REAL :: Area

   DO
      PRINT *, "Enter radius of circle (negative to stop):"
      READ *, Radius
      IF (Radius < 0) EXIT
      PRINT *, "Area = ", Area(Radius)
      PRINT *
   END DO

END PROGRAM Process_Circles_1

!---------------------------------------------------------
! Function to calculate area of a circle.
! Imports from Circle:  Pi and Radius
! Accepts:  Radius of circle
! Returns:  area of circle
!---------------------------------------------------------

REAL FUNCTION Area(R)

   USE Circle, ONLY : Pi
   REAL :: R

   Area = Pi * R**2

END FUNCTION Area
