      LOGICAL FUNCTION DLOC(X,Y)
C     -------------------
C     X AND Y ARE ARRAYS. IT IS ASSUMED THAT X(1) AND Y(1) CONTAIN DATA.
C
C     DLOC(X,Y) = .TRUE.   IF X AND Y BEGIN IN THE SAME LOCATION
C     DLOC(X,Y) = .FALSE.  IF X AND Y BEGIN IN DIFFERENT LOCATIONS
C
C     IT IS RECOMMENDED THAT THIS CODING NOT BE OPTIMIZED BY ELIMINATING
C     THE SUBROUTINE DYCHG. IF IT IS OPTIMIZED THEN DLOC MAY NOT COMPILE
C     PROPERLY.
C     -------------------
      DOUBLE PRECISION X(1),Y(1),XOLD,YOLD
      XOLD = X(1)
      YOLD = Y(1)
      CALL DYCHG(X,Y,YOLD)
      IF (X(1) .EQ. XOLD) GO TO 10
C
C     X AND Y BEGIN IN THE SAME LOCATION
C
      Y(1) = YOLD
      DLOC = .TRUE.
      RETURN
C
C     X AND Y BEGIN IN DIFFERENT LOCATIONS
C
   10 Y(1) = YOLD
      DLOC = .FALSE.
      RETURN
      END
