view DEPENDENCIES/mingw32/Python27/Lib/site-packages/numpy/f2py/tests/src/assumed_shape/foo_free.f90 @ 108:080ce3dcdd8c

Merge
author Chris Cannam
date Mon, 07 Sep 2015 14:43:59 +0100
parents 2a2c65a20a8b
children
line wrap: on
line source

subroutine sum(x, res)
  implicit none
  real, intent(in) :: x(:)
  real, intent(out) :: res

  integer :: i

  !print *, "sum: size(x) = ", size(x)

  res = 0.0

  do i = 1, size(x)
    res = res + x(i)
  enddo

end subroutine sum

function fsum(x) result (res)
  implicit none
  real, intent(in) :: x(:)
  real :: res

  integer :: i

  !print *, "fsum: size(x) = ", size(x)

  res = 0.0

  do i = 1, size(x)
    res = res + x(i)
  enddo

end function fsum