C+ C NAME: C ArrayLoc2 C PURPOSE: C CALLING SEQUENCE: subroutine ArrayLoc2(iSource,iDestin,N,L,I1,I2,I3) C INPUTS: C iSource integer address of source array (loc(A)) C iDestin integer address of source array (loc(C)) C N integer array size C L integer length of array element in bytes C (L=1: byte, L=2: int2, L=4: int4,real4) C OUTPUTS: C I1, I2, I3 integer DO loop parameters determining C direction in which array is processed C (DO I=I1,I2,I3) C SEE ALSO: C Array_Info C PROCEDURE: C If the origin of the source array is past the origin of the destination, or C if the source and destination arrays don't overlap at all, then the C destination can be filled from 1..N. C If the source and destination overlap with the origin of the source prior to C the origin of the destination, then the destination must be filled from N..1 C MODIFICATION HISTORY: C AUG-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu); added documentation C- integer iSource integer iDestin integer N integer L integer I1 integer I2 integer I3 if (iSource .ge. iDestin) then C & iSource+N*L .le. iDestin) then I1 = 1 I2 = N I3 = 1 else I1 = N I2 = 1 I3 = -1 end if return end