C   25/06/78 705271813  MEMBER NAME  IPRDIV   (S)           FORTRAN
      FUNCTION IPRDIV(PR,N)
C     A. SATO 29-05-78
C     CONVERTED TO FORTRAN FROM ASSEMBLER VERSION.
C
      DIMENSION PR(N)
C
      XR=RN(DAM)
      IPRDIV=0
1     IPRDIV=IPRDIV+1
      IF(N-IPRDIV) 2,2,3
3     XR=XR-PR(IPRDIV)
      IF(XR) 2,2,1
2     RETURN
      END
