C+
C NAME:
C	ArrI4AddConstant2
C PURPOSE:
C	Add two constants to two same-size integer*4 array
C CALLING SEQUENCE:
	subroutine ArrI4AddConstant2(N,A1,A2,R,C1,C2)
C CALLS:
C	BadI4
C SEE ALSO:
C	Array_Info
C-
	    integer	N
	    integer	A1(*)
	    integer	A2(*)
	    integer	R
	    integer	C1(*)
	    integer	C2(*)

	integer		BadI4

	ibad = BadI4()

	iA = loc(A1)
	iC = loc(C1)
	if (iA .ne. IC .or. R .ne. 0.) then
	    call ArrayLoc2(iA,iC,abs(N),4,I1,I2,I3)
	    do I=I1,I2,I3
	        if (N .lt. 0 .and. A1(I) .eq. ibad) then
		    C1(I) = ibad
		else
		    C1(I) = A1(I)+R
		end if
	    end do
	end if

	iA = loc(A2)
	iC = loc(C2)
	if (iA .ne. IC .or. R .ne. 0.) then
	    call ArrayLoc2(iA,iC,abs(N),4,I1,I2,I3)
	    do I=I1,I2,I3
	        if (N .lt. 0 .and. A2(I) .eq. ibad) then
		    C2(I) = ibad
		else
		    C2(I) = A2(I)+R
		end if
	    end do
	end if

	return
	end
