$STORAGE: 4
$DO66
      SUBROUTINE MINMAX(NARRAY,N,MAX,MIN,IMAX,IMIN)
C                       FINDS THE MINIMUM AND MAXIMUM VALUES, AND
C     SUBSCRIPTS THEREOF, IN A ONE-DIMENSIONAL ARRAY.
C
      DIMENSION NARRAY(N)
      MAX = -100000000
      MIN =  100000000
      DO 10 I=1,N
      NREF = NARRAY(I)
      IF(NREF.GT.MAX) IMAX = I
      IF(NREF.GT.MAX) MAX = NREF
      IF(NREF.LT.MIN) IMIN = I
      IF(NREF.LT.MIN) MIN = NREF
10    CONTINUE
      RETURN
      END

