c integ.for - return the running integral of an array c using the trapezoidal method c subroutine integ ( nvals, x, y, rInteg ) implicit real(a-h,o-z) dimension x(*), y(*) dimension rInteg( nvals ) ccc type *, 'j x(j) x(j-1) y(j) y(j-1) rInteg(j)' c rInteg(1) = 0.0 do j = 2, nvals rInteg(j) = rInteg(j-1) + (y(j)+y(j-1))/2.*(x(j)-x(j-1)) ccc if (j .lt. 105) type *, j, x(j),x(j-1),y(j),y(j-1),rInteg(j) enddo return c end