You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the main goal of the fortran-lang site is to inform people about modern Fortran, there are many people with legacy Fortran codes who would like to transition away from the language, or at least provide interfaces in Python or another language, so that the code can be used by people without knowledge of Fortran. I think the site should also provide information for them. Here is an outline of that I think should be covered, addressed to such people.
Are you sure you need to modify the code? Modern Fortran is mostly backward compatible with older versions. The free gfortran compiler has an std=legacy option to compile old codes. (Analogous options for other compilers should be mentioned.)
If a Fortran compiler is not available on your platform or cannot be installed on it, the f2c tool translates Fortran 77 into compilable C code.
Modern Fortran has features that will avoid bugs present in older Fortran codes. Put implicit none in all program units to force all variables to be declared. Even if your goal is to move away from Fortran, it is better to start with a Fortran code with all variables declared and errors detected.
There are consultants (the site would list a few) whose knowledge of legacy and modern Fortran and familiarity with modernization tools may enable to them to modernize a legacy Fortran more quickly and correctly than people "in-house" would.
Many Fortran codes have been given Python interfaces that enable people to use them without dealing with the Fortran code directly. There is the widely-used f2py tool, and more generally you can use ctypes.
Fortran code can be called from C and C++ using the interoperability features of Fortran 2003.
There are projects such as Fortran2Cpp, loki, and Rose to transpile Fortran to other languages.
The text was updated successfully, but these errors were encountered:
Although the main goal of the fortran-lang site is to inform people about modern Fortran, there are many people with legacy Fortran codes who would like to transition away from the language, or at least provide interfaces in Python or another language, so that the code can be used by people without knowledge of Fortran. I think the site should also provide information for them. Here is an outline of that I think should be covered, addressed to such people.
implicit none
in all program units to force all variables to be declared. Even if your goal is to move away from Fortran, it is better to start with a Fortran code with all variables declared and errors detected.ctypes
.The text was updated successfully, but these errors were encountered: