← Back to context

Comment by quanto

2 months ago

How would Fortran be used other than numerics/scientific computing?

This was in an embedded systems context, I came on later but it was what most of the core system was written in. It's been used in a lot of avionics systems over the years.

Modern Fortran has ISO C bindings in its standard library. You can call any C library from Fortran and wrap it in a Fortran module if you want to make it easier to use.

Despite its history it is a pretty modern language if you enable all warnings, set implicit none and ignore the old style of coding (a la FORTRAN 77 of older).

not a direct answer to your question, but the use in the domain you mentioned itself, is huge.

from the Wikipedia article about Fortran, under the Science and Engineering section:

https://en.m.wikipedia.org/wiki/Fortran

Although a 1968 journal article by the authors of BASIC already described FORTRAN as "old-fashioned",[58] programs have been written in Fortran for many decades and there is a vast body of Fortran software in daily use throughout the scientific and engineering communities.[59] Jay Pasachoff wrote in 1984 that "physics and astronomy students simply have to learn FORTRAN. So much exists in FORTRAN that it seems unlikely that scientists will change to Pascal, Modula-2, or whatever."[60] In 1993, Cecil E. Leith called FORTRAN the "mother tongue of scientific computing", adding that its replacement by any other possible language "may remain a forlorn hope".[61]

It is the primary language for some of the most intensive super-computing tasks, such as in astronomy, climate modeling, computational chemistry, computational economics, computational fluid dynamics, computational physics, data analysis,[62] hydrological modeling, numerical linear algebra and numerical libraries (LAPACK, IMSL and NAG), optimization, satellite simulation, structural engineering, and weather prediction.[63] Many of the floating-point benchmarks to gauge the performance of new computer processors, such as the floating-point components of the SPEC benchmarks (e.g., CFP2006, CFP2017) are written in Fortran. Math algorithms are well documented in Numerical Recipes.

  • > described FORTRAN as "old-fashioned"

    That didn't age well.

    My professor working on control system analysis for electrical power grids later thought that if he were to write it today, it would likely be done in matlab.

My first Fortran program was a tool I wrote to read 8" SS/SD CP/M floppies on a minicomputer. That was very easy to do, as the dialect had a couple of useful string extensions and the operating system had efficient ways of reading a floppy.