
!! Barlow and Barnett, Computing for Scientists 1998
!! page 108                  C++ and Fortran 90
!
! altered by Jim Crumley  2/1/2007 to add INTENT statements
! simple prgram showing example of subroutine

PROGRAM outsub

  REAL :: x = 3.14159 , y = 2.71828    ! , z   text error
  CALL out(x)
  CALL out(y)
  CALL out(x**2 + y - 0.3)
  STOP ' normal exit from outsub'
END PROGRAM outsub

SUBROUTINE out(u)
  REAL, INTENT(IN) :: u
  PRINT * , ' The value is ' , u
  RETURN
END SUBROUTINE out


