| People who know me might know that I think f77 is a problem itself, however this page is dedicated to f77reorder the f77 filter which solves some compatibility problems of the f2c fortran-2-c translator and other f77-extended-standard compilers. |
|
IMPORTANT
NOTICE: If you have any kind of problems with the f77reorder script, don't hesitate a second to tell me about it. Otherwise the problem will certainly NOT get fixed. |
The following extensions to f77 are not allowed within f2c. f77reorder modifies the code passed to f2c in order to avoid compilation errors.
PROGRAM test
integer i
data i/2/
integer k
is therefore transformed to
PROGRAM test
integer i
integer k
data i/2/
PROGRAM test
parameter(n=3)
integer a,b,c(n),d /2*0,3*1/, e, f/1/
is transformed by f77reorder to
PROGRAM test
parameter(n=3)
integer a,b,c(n),d,e,f
data b,c(n),d
> /2*0,3*1/
data f
> /1/
common /block/ a, b, c
& d, e, f
to
common /block/ a, b, c
> , ! inserted by f77reorder
& d, e, f
logical btest
as they are not part of the compiler but only external functions.
integer clike
...
if ( clike ) then ...
are not allowed in standard f77. Instead f2c requests
integer f77like
...
if ( f77line .ne. 0 ) then ...
Due to my lack of f77 knowlegde it might also happen that f77reorder regards some variable declaration as an error which in fact is an allowed one. Please send me the complete source files in such a case to fix the problem. We were however not able to find any inconsistencies in 40000 lines of f77 code tested... f77reorder error messages are:
integer notenough(5) /4*0/
integer tomany(5) /6*0/
parameter(ncount=5)
integer i(ncoun) /ncoun*0/
A collegue of mine states that you do not need debuggers if you write good code (I will *not* include his code to test his statement here ;-)
There are two options of including debug information for f77 code with f77reorder:b MAIN__on the gdb prompt.