      subroutine ecriseconome(ifich,x,iopt,cc)
      INCLUDE 'Parametres.f'
      character*(*) cc
      ix = min(max(-90000,nint(1000.*x)),900000)
      if (iopt.eq.0) then
        if (ix.ge.100000) then
          write(bufferout(iptbuf:iptbuf+5),'(i6)') ix
          iptbuf = iptbuf+6
        elseif(ix.ge.10000) then
          write(bufferout(iptbuf:iptbuf+4),'(i5)') ix
          iptbuf = iptbuf+5
        elseif(ix.ge.1000) then
          write(bufferout(iptbuf:iptbuf+3),'(i4)') ix
          iptbuf = iptbuf+4
        elseif(ix.ge.100) then
          write(bufferout(iptbuf:iptbuf+3),'(i3)') ix
          iptbuf = iptbuf+3
        elseif(ix.gt.-10) then
          write(bufferout(iptbuf:iptbuf+2),'(i2)') ix
          iptbuf = iptbuf+2
        elseif(ix.gt.-100) then
          write(bufferout(iptbuf:iptbuf+2),'(i3)') ix
          iptbuf = iptbuf+3
        elseif(ix.gt.-1000) then
          write(bufferout(iptbuf:iptbuf+3),'(i4)') ix
          iptbuf = iptbuf+4
        elseif(ix.gt.-10000) then
          write(bufferout(iptbuf:iptbuf+4),'(i5)') ix
          iptbuf = iptbuf+5
        else
          write(bufferout(iptbuf:iptbuf+5),'(i6)') ix
          iptbuf = iptbuf+6
        endif
      else
        if (ix.ge.100000) then
          write(bufferout(iptbuf:iptbuf+6),'(i7)') ix
          iptbuf = iptbuf+7
        elseif(ix.ge.10000) then
          write(bufferout(iptbuf:iptbuf+5),'(i6)') ix
          iptbuf = iptbuf+6
        elseif(ix.ge.1000) then
          write(bufferout(iptbuf:iptbuf+4),'(i5)') ix
          iptbuf = iptbuf+5
        elseif(ix.ge.100) then
          write(bufferout(iptbuf:iptbuf+3),'(i4)') ix
          iptbuf = iptbuf+4
        elseif(ix.gt.-10) then
          write(bufferout(iptbuf:iptbuf+2),'(i3)') ix
          iptbuf = iptbuf+3
        elseif(ix.gt.-100) then
          write(bufferout(iptbuf:iptbuf+3),'(i4)') ix
          iptbuf = iptbuf+4
        elseif(ix.gt.-1000) then
          write(bufferout(iptbuf:iptbuf+4),'(i5)') ix
          iptbuf = iptbuf+5
        elseif(ix.gt.-10000) then
          write(bufferout(iptbuf:iptbuf+5),'(i6)') ix
          iptbuf = iptbuf+6
        else
          write(bufferout(iptbuf:iptbuf+6),'(i7)') ix
          iptbuf = iptbuf+7
        endif
        if (iopt.gt.1) then
          bufferout(iptbuf:iptbuf+iopt-1) = cc(1:iopt)
          iptbuf = iptbuf+iopt-1
          write(ifich,'(a)') bufferout(1:iptbuf)
          do i=1,iptbuf
            bufferout(i:i) = ' '
          enddo
          iptbuf = 1
        endif
      endif
c       
      end
