Beliavski wrote:-
>I can compare two versions of a Fortran source file, containing a single
>module with multiple procedures, using diff on Unix or fc on Windows. >I'd
like something that is more Fortran-aware and which can say for >example
that code foo_2.f90 has procedures x, y, and z not present in >foo_1.f90 and
that procedures a and b have been modified but that >procedures c and d are
the same in the two files.
And asked if a program existed to do this.
Well, I don't know, but I DID write and offer a program to re-write
fixed-form (F77 style) code in a standard way, eliminating Hollertith in
favor of literals, making every single or nested DO loop end on its unique
CONTINUE; renumbering statement labels sequentially from 1, and format
statements labels from 9000, and much, much more, including unused and
missing label checks and subroutine usage by name, indenting option for
nestinga, etc.
But to achieve what Beliavski wants, you then only need a compare of the
output files for each processed sample sample.
And there are two well-known compare programs:
COMPARE file 1 file2 /A (for ascii, /B for binary-hex)
FM (Caltechs CCO file ascii/hex dump amd edit).
I wrote and have often offered two somewhat better versions of FM (one for
command line, one for native Windows).
When I was in IBM, I wrote in 1961 a Fortran flow-chart program where code
blocks were shown as rectangular blocks, if statements were in old-fashioned
diamonds, with decision routing lines wandering around where needed. I have
often wished I still had THAT code listing; (others, yes, including playing
any simply-coded coded music on the IBM 1403 printer, but not that flowchart
one). Output was always IBM 1403 132-line fanfold of course.