      LOGICAL FUNCTION I1ORDER(X,NX,XRANGE)
C
C      FUNCTIONAL DESCRIPTION:
C
C              CHECK ORDER OF X ARRAY
C
C      DUMMY ARGUMENTS:
C
C              X(NX) X ARRAY TO CHECK FOR STRICT ASCENDING ORDER
C	    XRANGE(2) (OUTPUT) EXTREMA OF X ARRAY IF ORDERED
C
C      IMPLICIT INPUTS:
C
C              X(NX)
C
C      IMPLICIT OUTPUTS:
C
C              XRANGE
C		I1ORDER = .TRUE. IF X IS IN ASCENDING ORDER
C
C
C      SIDE EFFECTS:
C
C
C
C
      REAL X(NX),XRANGE(2)
C
      I1ORDER=.FALSE.
C
      IF(NX.LE.1) RETURN
C
      IXP=1
      DO 10 IX=2,NX
        IF(X(IXP).GE.X(IX)) RETURN
        IXP=IX
 10   CONTINUE
C
C  OK
C
      I1ORDER=.TRUE.
C
      XRANGE(1)=X(1)
      XRANGE(2)=X(NX)
C
      RETURN
      END
