3 ms·
What's the degree of backward compatibility with FORTRAN releases? I imagine most FORTRAN codebases as being huge and old, so it makes me wonder how many can ad
by bberrry 8y ago
What's the degree of backward compatibility with FORTRAN releases? I imagine most FORTRAN codebases as being huge and old, so it makes me wonder how many can adopt the latest versions.
- philshem 8y agoYou can start with an awesome-fortran list: https://github.com/rabbiabram/awesome-fortran https://github.com/rabbiabram/awesome-fortran
- jhrmnn 8y agoEach new standard usually removes a very small number of features, but Fortran 2018 is mostly a superset of Fortran 77. Most compilers retain absolute backward compatibility, so they can compile a superset of Fortran 66 to 2018, and often some custom language extensions on top.
- walshemj 8y agoOnly some of the real ancient pre FORTRAN IV stuff has been removed.
- apaprocki 8y agoThis will be of help as well: https://github.com/CodethinkLabs/fortrantools/blob/master/README.md https://github.com/CodethinkLabs/fortrantools/blob/master/RE... Most of the patches are upstreamed, but their gcc repo contains the patched versions on top of the latest gcc releases.
- wycy 8y agoIn my experience nearly all standard old code will still compile just fine, except code which relied on compiler-specific extensions and directives. Unfortunately, there does tend to be a lot of code out there using these proprietary directives. Things like metacommands [0] will need to be converted to something standard (or removed) to work with modern compilers. [0] http://www.ousob.com/ng/fortran/ng4e22.php http://www.ousob.com/ng/fortran/ng4e22.php
- pletnes 8y agoI’ve compiled fortran code from approx 1965. Works the same today. I don’t know of anything that is as compatible as standard Fortran code. That being said, quite a few vendor extensions are floating around, and often old codebases rely on a few of these.