
      SUBROUTINE scriptol (OAP,M,N,MD,ND,c,iii,tipo,occup)
      IMPLICIT REAL*8(A-H,O-Z)
      character*8 c(md)
      character(*) tipo(n)
      DIMENSION OAP(MD,ND),iii(n),occup(n)
      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,*) ' '
      WRITE(6,1024) (iii(i),I=N1,N2)
      write(6,1026) (occup(i),I=N1,N2)
      write(6,1027) (tipo(i)(1:6),I=N1,N2)
      write(6,1027) (tipo(i)(7:12),I=N1,N2)
      WRITE(6,*) ' '
      DO JJ=1,M
      if(any(dabs(oap(jj,n1:n2)).gt.1.d-6))
     *WRITE(6,1025) jj,c(jj),(OAP(JJ,II),II=N1,N2)
      enddo
      enddo
      WRITE(6,*) ' '
85    N1=nnn*NN+1
      N2=N
      IF(N2.LT.N1) RETURN
      WRITE(6,*) ' '
      WRITE(6,1024) (iii(i),I=N1,N2)
      write(6,1026) (occup(i),I=N1,N2)
      write(6,1027) (tipo(i)(1:6),I=N1,N2)
      write(6,1027) (tipo(i)(7:12),I=N1,N2)
      WRITE(6,*) ' '
      DO JJ=1,M
      if(any(dabs(oap(jj,n1:n2)).gt.1.d-6))
     *WRITE(6,1025) jj,c(jj),(OAP(JJ,II),II=N1,N2)
      enddo
      WRITE(6,*) ' '
1024  FORMAT(14X,10(3X,I5))
1026  FORMAT(14X,10(f8.4))
1027  FORMAT(14X,10(2X,a6))
1025  FORMAT(1x,i3,1x,a8,1x,10F8.4)
      RETURN
      END
