C+ C NAME: C ArrR4AddConstant C PURPOSE: C Add constant to real*4 array C CALLING SEQUENCE: subroutine ArrR4AddConstant(N,A,R,C) C INPUTS: C N integer abs(N) = # elements C N < 0 skips bad values C A(*) real input array of abs(N) elements C R real scalar constant to be added to A C OUTPUTS: C C(*) real output array A+R C CALLS: C BadR4 C PROCEDURE: C Special case: if source=destination and const=0, then no action is taken C SEE ALSO: C Array_Info C- integer N real A(*) real R real C(*) bad = BadR4() iA = loc(A) iC = loc(C) if (iA .eq. IC .and. R .eq. 0.) return call ArrayLoc2(iA,iC,abs(N),4,I1,I2,I3) do I=I1,I2,I3 if (N .lt. 0 .and. A(I) .eq. bad) then C(I) = bad else C(I) = A(I)+R end if end do return end