Hello,
I need to convert a set of routines from FORTRAN77 to Modern Fortran.
These routines should be used inside a new version of a bigger simulation code, that exposes some global variables that are in part used and modified by these routines.
I see that there are some tools that may assist the conversion, such as:
- Modernizing Old Fortran in Fortran Wiki
- F77 to F90 (or later) automatic conversion
- Degenerate Conic | Fixed to Free Form Fortran Conversion
- GitHub - dorchard/camfort: Light-weight verification and transformation tools for Fortran
- GitHub - MRedies/f2f_mirror: A mirror of Colby Lemon FORTRAN 2 Fortran perl script. Sadly his bitbucket disappeared. If you have a newer version, please create a pull request.
- F77_TO_F90: Convert FORTRAN77 to FORTRAN90
- GitHub - Koushikphy/FORTRAN77_to_Fortran90: Convert old fixed source FORTRAN 77 code to free form Fortran 90 code
However, my main concern is not the translation, but the detection of variables.
More specifically, since these routines have been programmed in implicit, it would be very useful to have a list of the symbols exposed by some selected modules (that I will need to use) and a list of the variables defined implicitly by these routines.
Having these lists of variables will from one side let me detect potential name clashes and for the other side provide the elements to write appropriate variable declarations (and move to implicit none).
Do you have any suggestion for this specific use case?
Thank you for your help.