      SUBROUTINE script (OAP,M,N,MD,ND)
      IMPLICIT REAL*8(A-H,O-Z)
      DIMENSION OAP(MD,ND)
      nnn=10
      NN=N/nnn
      print*,'ENTREE SCRIPT'
      IF(NN.EQ.0) GOTO 85
      DO KK=1,NN
         N1=nnn*(KK-1)+1
         N2=nnn*KK
         IF(N2.LT.N1) RETURN
         WRITE(6,1023)
         WRITE(6,1024) (I,I=N1,N2)
         WRITE(6,1022)
         DO JJ=1,M
            WRITE(6,1025) JJ,(OAP(JJ,II),II=N1,N2)
         enddo
      enddo
      WRITE(6,1022)
 85   continue
      N1=nnn*NN+1
      N2=N
      IF(N2.LT.N1) RETURN
      WRITE(6,1023)
      WRITE(6,1024) (I,I=N1,N2)
      WRITE(6,1022)
      DO JJ=1,M
         WRITE(6,1025) JJ,(OAP(JJ,II),II=N1,N2)
      enddo
      WRITE(6,1022)
1022  FORMAT(/)
1023  FORMAT(/)
1024  FORMAT(/,1X,10I8)
1025  FORMAT(I5,10F8.4)
      RETURN
      END
       SUBROUTINE scripi (mat,M,N,MD,ND,iform)
      IMPLICIT REAL*8(A-H,O-Z)
      character*20 f1025,f1024
      DIMENSION mat(MD,ND)
      nnn=80/iform
      if(iform.lt.10) then
         write(f1024,'(''(4X,'',i2,''i'',i1,'')'')') nnn,iform
         write(f1025,'(''(I4,'',i2,''i'',i1,'')'')') nnn,iform
      else
         write(f1024,'(''(4X,'',i2,''i'',i2,'')'')') nnn,iform
         write(f1025,'(''(I4,'',i2,''i'',i2,'')'')') nnn,iform
      endif
c      f1024='(3X,10I8)'
c      f1025='(i4,10I8)'
c      nnn=10
      NN=N/nnn
      IF(NN.EQ.0) GOTO 85
      DO KK=1,NN
         N1=nnn*(KK-1)+1
         N2=nnn*KK
         IF(N2.LT.N1) RETURN
         WRITE(6,f1024) (I,I=N1,N2)
         DO JJ=1,M
            WRITE(6,f1025) JJ,(mat(JJ,II),II=N1,N2)
         enddo
      enddo
 85   continue
      N1=nnn*NN+1
      N2=N
      IF(N2.LT.N1) RETURN
      WRITE(6,f1024) (I,I=N1,N2)
      DO JJ=1,M
         WRITE(6,f1025) JJ,(mat(JJ,II),II=N1,N2)
      enddo
c      WRITE(6,1022)
c1022  FORMAT(/)
c1023  FORMAT(/)
1024  FORMAT(4X,10I8)
1025  FORMAT(I5,10i8)
      RETURN
      END
