Fortran Wiki

A simple example of using internal procedures, which have explicit interfaces. See this thread on comp.lang.fortran for details.

! internalproc.f90 -- internal procedure example
program internalproc
  implicit none
  real :: y
  real :: x = 100.0

  y = functiontest(x)


  function functiontest(argument)
    real :: functiontest
    real, intent(in) :: argument

    functiontest = argument * 2.0
  end function functiontest

end program internalproc

category: code