c----------------------------------------------------------------------
      subroutine itsf(n, rtf)
c----------------------------------------------------------------------
c
c     Will generate the format necessary to read an integer number into
c     a string.
c     
c     input : N, an integer
c        
c     output : RTF, a character*8 string that contains the format.
c     
      character str1*2
      character rtf*8
c
      nd = int(log10(abs(real(n)))) + 1
      if (n .lt. 0.) nd = nd + 1
      write(str1, fmt='(I2)') nd
      if (nd .ge. 10) then
         rtf = ('(I' // str1(1:2)) // ')'
      else
         rtf = ('(I' // str1(2:2)) // ')'
      end if
      return 
      end
