I have several Perl scripts which I
find useful when working with Fortran programs. Most are more fully
documented in the SPEM manual (available from me) and all have
descriptive comments in their header.
The first group modifies your source code:
-
redo
put a continue or enddo on each do loop
-
findent
fortran indent - needs continue or enddo on do loops
-
relabel
Sverre Froyen's program to put fortran labels in order
-
unenddo
turn do-enddo loops into do-continue loops (for nasty old compilers)
-
endcom
add a '!' before comments which start in column 73
-
freeform
convert f77 to f90 free
-
ifspace
add space around 'if' statements, can also convert to f90 operators
Note - these usually work on the kind of Fortran I write, but they have
been known to do the wrong thing. DO NOT DELETE YOUR ORIGINAL CODE
BEFORE CHECKING THE NEW CODE.
I also have tools for building Fortran makefiles using the X11
imake program and a Perl5 makedepend script.
-
fimake.tar.gz
configuration files for all the Fortran compilers I have
ever tried and a sample Fortran Imakefile. It contains a README
file which tries to explain how they work and how to use them.
-
sfmakedepend
search source files for C preprocessor includes, Fortran includes, and
F90 module dependencies. Requires Perl 5. The old versions of this
program are available via ftp from the
ftp://ahab.rutgers.edu/pub/perl/perl4 directory.
These Perl slides were originally from Tom Christiansen. I have
converted them to the LaTeX seminar style and added a few Perl 5
slides.
These slides are from a short talk I gave about regular
expressions, based on the Perl man pages.
-
regex.2up.ps
two slides per page, postscript file
-
regex.ps
one slide per page, postscript file
-
regex.tex
LaTeX2e source for Perl slides, uses seminar package
