      subroutine scril
      parameter(nligne=100)
c      character*500 scr500(10)
      character*80 scr500(nligne)
      common/sri/ scr500
c      print *, 'entree scril'
      rewind 75
      read(75,'(a80)',err=2,end=2) scr500
  2   continue
c     close (75,status='DELETE')
      rewind 75
      call scri(scr500)
      return
      end
      subroutine scri(scr)
      parameter(nligne=100)
      character*1 scr(80*nligne),scr1(80*nligne)
      common/sri/scr1
      ifil=6
      k=1
      scr1(1)=scr(1)
      do i=2,8000
c        write(6,*)'SCR',i,'    ',scr(i)
         if(scr(i).eq.'$') goto 1
         if(scr(i).eq.' ') then
            if(scr(i-1).eq.' ') goto 2
c           write(6,*)'scr(i-1)',scr(i-1)
         endif
         k=k+1
c        write(6,*)'k',k
         scr1(k)=scr(i)
c        write(6,*)'scr(i),scr1(k)',scr(i)
 2       continue
      enddo
c     pas de '$' trouve
      write(6,*)'ecriture formattee sans ''$'' a la fin'
      return
 1    continue
c      write(6,*)k
      write(6,'(80a1)')(scr1(l),l=1,k)
      return
      end

