Monday September 20, 2021’s Smile of the Day: FORTRAN

On this Day:

In 1954, the 1st FORTRAN computer program was run.

Fortran or originally FORTRAN,  is a general-purpose, compiled imperative programming language that is especially suited to numeric computation and scientific computing.

Fortran was originally developed by IBM in the 1950s for scientific and engineering applications, and subsequently came to dominate scientific computing. It has been in use for over six decades in computationally intensive areas such as numerical weather prediction, finite element analysis, computational fluid dynamics, geophysics, computational physics, crystallography and computational chemistry. It is a popular language for high-performance computing and is used for programs that benchmark and rank the world’s fastest supercomputers.

Fortran has had numerous versions, each of which has added extensions whilst largely retaining compatibility with preceding versions. Successive versions have added support for structured programming and processing of character-based data (FORTRAN 77), array programming, modular programming and generic programming (Fortran 90), high performance Fortran (Fortran 95), object-oriented programming (Fortran 2003), concurrent programming (Fortran 2008), and native parallel computing capabilities (Coarray Fortran 2008/2018).

Fortran’s design was the basis for many other programming languages. Among the better-known is BASIC, which is based on FORTRAN II with a number of syntax cleanups, notably better logical structures, and other changes to work more easily in an interactive environment.

As of August 2021, Fortran was ranked 13th in the TIOBE index, a measure of the popularity of programming languages, climbing 29 positions from its ranking of 42nd in August 2020.

In late 1953, John W. Backus submitted a proposal to his superiors at IBM to develop a more practical alternative to assembly language for programming their IBM 704 mainframe computer.  Backus’ historic FORTRAN team consisted of programmers Richard Goldberg, Sheldon F. Best, Harlan Herrick, Peter Sheridan, Roy Nutt, Robert Nelson, Irving Ziller, Harold Stern, Lois Haibt, and David Sayre. Its concepts included easier entry of equations into a computer, an idea developed by J. Halcombe Laning and demonstrated in the Laning and Zierler system of 1952.

A draft specification for The IBM Mathematical Formula Translating System was completed by November 1954. The first manual for FORTRAN appeared in October 1956,  with the first FORTRAN compiler delivered in April 1957. This was the first optimizing compiler, because customers were reluctant to use a high-level programming language unless its compiler could generate code with performance approaching that of hand-coded assembly language.

While the community was skeptical that this new method could possibly outperform hand-coding, it reduced the number of programming statements necessary to operate a machine by a factor of 20, and quickly gained acceptance. John Backus said during a 1979 interview with Think, the IBM employee magazine, “Much of my work has come from being lazy. I didn’t like writing programs, and so, when I was working on the IBM 701, writing programs for computing missile trajectories, I started work on a programming system to make it easier to write programs.”

The language was widely adopted by scientists for writing numerically intensive programs, which encouraged compiler writers to produce compilers that could generate faster and more efficient code. The inclusion of a complex number data type in the language made Fortran especially suited to technical applications such as electrical engineering.

By 1960, versions of FORTRAN were available for the IBM 709, 650, 1620, and 7090 computers. Significantly, the increasing popularity of FORTRAN spurred competing computer manufacturers to provide FORTRAN compilers for their machines, so that by 1963 over 40 FORTRAN compilers existed. For these reasons, FORTRAN is considered to be the first widely used cross-platform programming language.

The development of Fortran paralleled the early evolution of compiler technology, and many advances in the theory and design of compilers were specifically motivated by the need to generate efficient code for Fortran programs.

IBM began development of FORTRAN IV starting in 1961, as a result of customer demands. FORTRAN IV removed the machine-dependent features of FORTRAN II (such as READ INPUT TAPE), while adding new features such as a LOGICAL data type, logical Boolean expressions and the logical IF statement as an alternative to the arithmetic IF statement. FORTRAN IV was eventually released in 1962, first for the IBM 7030 (“Stretch”) computer, followed by versions for the IBM 7090, IBM 7094, and later for the IBM 1401 in 1966.

By 1965, FORTRAN IV was supposed to be compliant with the standard being developed by the American Standards Association X3.4.3 FORTRAN Working Group.

Between 1966 and 1968, IBM offered several FORTRAN IV compilers for its System/360, each named by letters that indicated the minimum amount of memory the compiler needed to run.  The letters (F, G, H) matched the codes used with System/360 model numbers to indicate memory size, each letter increment being a factor of two larger:

1966 : FORTRAN IV F for DOS/360 (64K bytes)
1966 : FORTRAN IV G for OS/360 (128K bytes)
1968 : FORTRAN IV H for OS/360 (256K bytes)

At about this time FORTRAN IV had started to become an important educational tool and implementations such as the University of Waterloo’s WATFOR and WATFIV were created to simplify the complex compile and link processes of earlier compilers.

Although a 1968 journal article by the authors of BASIC already described FORTRAN as “old-fashioned”, Fortran has now been in use for several decades and there is a vast body of Fortran software in daily use throughout the scientific and engineering communities. 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.” 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”.

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, hydrological modeling, numerical linear algebra and numerical libraries (LAPACK, IMSL and NAG), optimization, satellite simulation, structural engineering, and weather prediction.[citation needed] 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.

Software for NASA probes Voyager 1 and Voyager 2 was originally written in FORTRAN 5, and later ported to FORTRAN 77. As of 25 September 2013, some of the software is still written in Fortran and some has been ported to C.

One of the earliest versions of FORTRAN, introduced in the ’60s, was popularly used in colleges and universities. Developed, supported, and distributed by the University of Waterloo, WATFOR was based largely on FORTRAN IV. A student using WATFOR could submit their batch FORTRAN job and, if there were no syntax errors, the program would move straight to execution. This simplification allowed students to concentrate on their program’s syntax and semantics, or execution logic flow, rather than dealing with submission Job Control Language (JCL), the compile/link-edit/execution successive process(es), or other complexities of the mainframe/minicomputer environment. A down side to this simplified environment was that WATFOR was not a good choice for programmers needing the expanded abilities of their host processor(s), e.g., WATFOR typically had very limited access to I/O devices. WATFOR was succeeded by WATFIV and its later versions. [Editor: FORTRAN IV with WATFOR and WATFIV is what I used for most of my programming in university…]

When assumed-length arrays were being added, there was a dispute as to the appropriate character to separate upper and lower bounds. In a comment examining these arguments, Dr. Walt Brainerd penned an article entitled “Astronomy vs. Gastroenterology” because some proponents had suggested using the star or asterisk (“*”), while others favored the colon (“:”).

Variable names beginning with the letters I–N have a default type of “integer” [Editor:  Integers are the set of numbers that includes all whole numbers (0, 1, 2, 3…).along with the negative versions of the natural numbers (-1, -2, -3…)]  while variables starting with any other letters defaulted to “real” [Editor: The Real Numbers contain the rational numbers (Numbers that we normally think of as fractions make up the set of rational numbers such as a/b where a and b are integers) and the irrational numbers (The set of numbers that cannot be represented as a ratio between integers are called irrationals, such as π (3.14159…) and √2 ( 1.414…), although programmers could override the defaults with an explicit declaration. 

This led to the joke: “In FORTRAN, GOD is REAL (unless declared INTEGER).” (per Wikipedia).

First, a Story:

Fortran: what 2 computers do before interface.

Second, a Song:

FORTRAN is an original musical song by (I believe) Kent Clark, Ed Hutchings, and Elliott Davis, and performed by the Caltech Stock Company. Unfortunately I could not find a video version but I hope you enjoy this!

(https://www.youtube.com/watch?v=yd6FLETYZ_c)

Thought for the Day:

“A computer without COBOL and FORTRAN is like a piece of chocolate cake without ketchup and mustard.” – (unknown)

Further to the Carpet Sweeper Smile, Gerry Wahl of North Vancouver, BC, Canada writes (in reference to the Erma Bombeck quote that bringing children into a house with a white carpet is risky..):

“eating spaghetti in a white shirt is equally risky…”

Have a great day!

Dave & Colleen

© 2021 David J. Bilinsky and Colleen E. Bilinsky

Leave a Reply