[comp.lang.fortran] Renumbering labels and formats in FORTRAN

rsingh@portia.stanford.edu (Rajesh Kumar Singh) (11/04/90)

Hello,
I need to "sanitize" my fortran source code: by sanitizing, I mean renumbering
all the labels (and any references to them)  in a constant, monotonic
fashion  and
move all the format statements at the end of any module.   I remember using
one such program   with MTS fortran.  I am sure there are programs around
to do this on Mac/Sun/IBM PC.  Help!

Thanks.
--rajesh k singh  rsingh@portia

---------------------------------------------------------------------  
Rajesh Kumar Singh                 E-mail: rsingh@portia.stanford.edu
      | Dept of Civil Engineering      or  rsingh@cive.stanford.edu 
  W   | Blume Earthquake Center
  O   | Stanford University            H   | Quillen 9F
  R   | Stanford, CA 94305-4020        O   | Escondido Village 
  K   | Phone: +1 415-723-1502         M   | Stanford, CA 94305-7496
      | Fax:   +1 415-725-8662         E   | Phone: +1 415-497-7773 

mccalpin@perelandra.cms.udel.edu (John D. McCalpin) (11/04/90)

> On 4 Nov 90 06:38:05 GMT, rsingh@portia.stanford.edu (Rajesh Kumar
Singh) said:

> I need to "sanitize" my fortran source code: by sanitizing, I mean 
> renumbering
> all the labels (and any references to them)  in a constant, monotonic
> fashion  and
> move all the format statements at the end of any module.   I remember using
> one such program   with MTS fortran.  I am sure there are programs around
> to do this on Mac/Sun/IBM PC.  Help!

I guess this needs to go into a Frequently Asked Questions posting
(along with the info about the f2c converter).

TOOLPACK is a large package of tools for the transformation of FORTRAN
programs.   It includes precision conversion, flow-control
restructuring, some style re-writing, pretty-printing, and more.

It is available from a number of sources, including anonymous ftp from
louie.udel.edu (in the pub directory).  You will need at least 10-15
MB of disk space to compile it and about 7 MB to store the executables
on most systems.

It is known to compile and execute correctly on Sun-3, Sun-4, and
Silicon Graphics 4D systems, though the makefiles are brain-damaged
and in need of re-writing....
--
John D. McCalpin			mccalpin@perelandra.cms.udel.edu
Assistant Professor			mccalpin@vax1.udel.edu
College of Marine Studies, U. Del.	J.MCCALPIN/OMNET