On Thu, 25 Dec 2014, Bob Tennent wrote:

Thanks Jean-Pierre. Wouldn't I need ouvrefile.inc and
longueur.inc to compile it?

Ouvrefile is to work around a G77 bug. With another Fortran a simple "open" will work.

Jean-Pierre Coulon
* work-around for a G77 fortran bug: "CLOSE" sometime crashes in G77 after
* some WRITE when there has been a simple OPEN...'unknown' when the file
* already existed:

*> enfile: truncation failed in endfile
*> apparent state: unit 10 named machin.dat
*> last format: list io
*> lately writing sequential formatted external IO

      subroutine ouvrefichier(unite, nomfichier)
      integer unite
      character *(*) nomfichier
      open (unit=unite, file=nomfichier, status='unknown')
      close (unit=unite, status='delete')
      open (unit=unite, file=nomfichier, status='new')
      return
      end
*   LONGUEUR : Calcule la longueur d'une chaine de caracteres en ignorant
*   les espaces et les TAB par la droite

      integer function longueur(chaine)
      character*(*) chaine

      longueur = len(chaine)
      if (longueur.eq.0) print *,'longueur nulle'
      do while ((longueur.gt.0).and.
     +  ((chaine(longueur:longueur).eq.char(9)).or.
     1   (chaine(longueur:longueur).eq.' ')))
        longueur = longueur-1
      enddo
      return
      end
-------------------------------
[email protected] mailing list
If you want to unsubscribe or look at the archives, go to 
http://tug.org/mailman/listinfo/tex-music

Reply via email to