Short for "Formula Translation," FORTRAN is one of the oldest languages around. Surprisingly, it is still the language of choice for mathematical applications and is used by mathematicians and physicists everywhere.

Fortran is still in use today for 2 important reasons:
  1. There are tens of millions of lines of code running today. Go to netlib and see how many numerical codes are there. Most are available in C, too, but that's just the result of running f2c on them!

    Don't forget that these codes are hard to write -- rewriting them while ignoring the "interesting" properties of floating point arithmetic will not yield good results.

  2. Since it's so primitive, it's easier to optimise.

    C and C++ are in many ways at the wrong level for optimisation, particularly of mathematical codes. Optimisers can handle fixed-size multi-dimensional arrays reasonably well today (see, e.g., SGI's C/Fortran compiler). But C has terrible semantics for accessing that.

    You can guarantee a reasonably low level of aliasing in most Fortran code (mainly by ignoring all the horrible things people used to do with COMMON blocks). But in C, any pointer potentially points inside any block of memory. Bye-bye register optimisation in your tightest array loops!

Don't count on F90 being the last Fortran...

This is the genealogy of the programming language Fortran:

Fortran was born in year 1954.
It became Fortran I in year 1956.
It became Fortran II in year 1957.
It became Fortran III in year 1958.
It became Fortran IV in year 1962.
Then it begat PL/I in year 1964.
It became Fortran 66 in year 1966.
It became Fortran 77 in year 1978.
It became Fortran 90 in year 1991.
It became Fortran 95 in year 1995, and has not changed much since that time.

This genealogy is brought to you by the Programming Languages Genealogy Project. Please send comments to thbz.

With a little luck, one day you will be able to log onto E2 and become an instant FORTRAN god/goddess. Not anytime soon, perhaps, but here's what's around so far:

Nodes with info on FORTRAN (both history and fan letters):

Fortran (you are here)
FORTRAN I
Fortran 66
Fortran 90
Fortran 0x
High Performance Fortran
MIA Fortran
Why FORTRAN is our Friend

How Not to Code:
kangaroo code
spaghetti code

Language/Command Reference Nodes:

COMMMON block
CONJG(x)
GOTO (Fortran-specific syntax not yet covered)
(more upcoming)
Compilers:
g77
f77
Miscellaneous:
Hello World has a FORTRAN version included.
This project motivated by a summer job that involves sorting through and modifying nuclear physics FORTRAN 77 code older than I am. /msg me or softlink anything that ought to be added.

My all-time favorite FORTRAN reference book is Fortran 77 for humans (West Publishing Company, 1980). Despite all mentions of punch cards, it taught me almost all that I know, including how to censor text containing the words "durn" and "heck."

Log in or register to write something here or to contact authors.