! Program Example from "Essential Fortran 90 & 95" by Loren P. Meissner
! Copyright 1996. Copying for sale requires permission from the author.
! Otherwise, distribution is permitted if these three lines are included.

  module J11M
    implicit none
    public :: Calc
  contains
    subroutine Calc( Z, Answer )
      real, intent(in), dimension(:) :: Z
      real, intent(out) :: Answer
  ! start subroutine Calc
      Answer = sum( Z ** 2 )  ! Typical function
      return
    end subroutine Calc
  end module J11M
