Happy 60th birthday, Fortran

Fortran may be trending down on Google, but its foundational role in scientific applications ensure that it won't be retiring anytime soon.
Register or Login to like
Happy birthday

Image by Oscar Cortez. Modified by Opensource.com. CC BY-SA 2.0.

The Fortran compiler, introduced in April 1957, was the first optimizing compiler, and it paved the way for many technical computing applications over the years. What Cobol did for business computing, Fortran did for scientific computing.

Fortran may be approaching retirement age, but that doesn't mean it's about to stop working. This year marks the 60th anniversary of the first Fortran (then styled "FORTRAN," for "FORmula TRANslation") release.

Even if you can't write a single line of it, you use Fortran every day: Operational weather forecast models are still largely written in Fortran, for example. Its focus on mathematical performance makes Fortran a common language in many high-performance computing applications, including computational fluid dynamics and computational chemistry. Although Fortran may not have the same popular appeal as newer languages, those languages owe much to the pioneering work of the Fortran development team.

Although Fortran may not have the same popular appeal as newer languages, those languages owe much to the pioneering work of the Fortran development team.
In the movie "Hidden Figures," one of the characters teaches herself Fortran because she sees that human computers (including herself) will be replaced by electronic computers. And although much from the early '60s has been left to history, Fortran persists. Two years ago, NASA began actively seeking a Fortran programmer to work on the Voyager missions as the last original programmer prepared to retire. Use of Fortran in weather and climate modeling, geophysics, and many other scientific applications means that Fortran knowledge will remain a valued skill for years to come.

Despite this, Fortran is trending down in searches, and it is no longer taught at some universities (I missed my chance to take my university's Fortran course by one semester). One atmospheric scientist, preparing to apply for graduate school in the late 2000s, decided she should learn a programming language. When she called local schools and universities to ask whether they offered any courses in Fortran, the response was laughter. So she taught herself, by studying existing code and doing a lot of Google searches. Today, she maintains old Fortran code and writes new code daily.

Fortran as Google search term 2004 to 2017

The trend of "Fortran" as a Google search term from 2004 to 2017.

Such stories are becoming more prevalent as Fortran's popularity declines. The great longevity of Fortran provides a wealth of learning material as well as inter-generational bonding. In my first system administration job, a common task was helping graduate students compile Fortran code they inherited from their advisor (who in turn inherited it from their advisor, and so on...).

A colleague of mine, who coincidentally began existing in 1954 (the year of the first draft of The IBM Mathematical Formula Translating System specification), wrote an article sharing his experience creating a rendering of Da Vinci's "Mona Lisa" with Fortran. Another friend told me one of his favorite programs as an undergraduate was a Fortran program that created a calendar featuring ASCII-art renderings of the characters from the "Peanuts" comic strip.

Calendar page generated by Fortran

A November 2017 calendar page generated by a Fortran program

What makes Fortran so enduring? Establishing an initial foothold helps, of course. When a language is used in a critical business application, that gives it a lot of staying power because wholly rewriting code is expensive and risky.

When a language is used in a critical business application, that gives it a lot of staying power because wholly rewriting code is expensive and risky.
But there's more to it than that. As the name implies, Fortran is designed to translate mathematical formulas into computer code. That explains its strong presence in fields that deal with a lot of mathematical formulas (particularly partial differential equations and the like).

And like any technology that has survived the years, Fortran has evolved. Changes in the language take advantage of new paradigms without making rapid changes. Since the first industry standard version of Fortran (FORTRAN 66, approved in 1966), only a few major versions have occurred: FORTRAN 77 (approved in 1978), Fortran 90 (released in 1991 (ISO) and 1992 (ANSI)) and its update, Fortran 95, and Fortran 2003 (released in 2004) and its update, Fortran 2008. A new revision called Fortran 2015 is expected in mid-2018.

Clearly, there's no plan for Fortran to retire anytime soon. Active projects are underway to make it easier to run Fortran on GPUs. Will Fortran celebrate its centennial? Nobody knows. But we do know that the Voyager 1 and Voyager 2 spacecraft will carry Fortran code out beyond the reaches of our solar system.

User profile image.
Ben Cotton is a meteorologist by training, but weather makes a great hobby. Ben works as the Fedora Program Manager at Red Hat. He co-founded a local open source meetup group, and is a member of the Open Source Initiative and a supporter of Software Freedom Conservancy. Find him on Twitter (@FunnelFiasco) or at FunnelFiasco.com.

30 Comments

I think there is a genealogy of programming languages that someone might look at. For example, I saw BASIC as an extension of FORTRAN, adding the ability to easily handle and manipulate text. Somehow, moving from that to Perl seemed easy to understand. Then, of course, there's A, B, C, C++, and D...

Long before I ever took a course in Data Structures, I used linked lists and pointers in FORTRAN on IBM/360 using a CP/CMS type operating system. It involved extensions of Berkeley SPICE, chip designers' key simulator, running on a timeshare system. Used a FORTRAN interface with BAL360 to do dynamic memory management and call performance critical subroutines re-written in BAL360. I still blows my mind that any data could be accessed in any form EQUIVALENCing RE*8, RE*4, INT*4, etc. And FORTRAN was only then a teenager.

And we still stand on the shoulders of giants. Happy Birthday!

In the early 1970's I was working for a crop insurance company in the Free State in South Africa. They were running a cloud seeding project in Bethlehem, South Africa. I was given Fortran code from a Varian computer and ported it over to run on an NCR Century 100 computer. This was used to predict hail formation patterns. I taught myself Fortran for this project.

Very nice article, I thought Fortran was not actively developed anymore!

The Maxima computer algebra program still has the "fortran" command that converts equations into working Fortran code. I found it very useful when I was a graduate student.

1989. Was a Systems Trainee at I.I.T.Madras. Lots of engineering drawings were being sent to the Plotter to get hard-copies. It was an expensive affair. No visualizations were available. The various color inks, pens, plotter paper, jobs queuing up, and of course the time taken to plot the drawing, ranging from 1 minute to even 15 minutes, were all a big overhead. Any mistakes, and the whole process had to be redone.

Wrote a FORTRAN-77 program that had subroutines, named exactly like the ones used in the plotter routines. It took the same variables and values as input, but output the picture on high-speed line printers, instead of, on the plotter. Obviously, the images printed were not great-looking, but it gave an idea as to whether the plotter output would be what the user expected. Also, a 'preview' such as this one was less resource-consuming and fast enough. Gave the users an ability to play around with the input values to land up with the diagrams they wanted.

It was fun, a great learning experience, and above all, had a lot of utility value. Didn't really get a chance to work on FORTRAN after that, but it is still my 'first-love'. I still carry the hard-copy of my programs.

In the early 1960s, I learned programming techniques and FORTRAN on my own from the IBM manuals obtained from the grad school computer center. This was a means to a selfish end: gain access to the school's IBM 1620 (20K memory) for a class reach project. Little did I know I had created "virtual" memory in the application because the data manipulations required using the connected hard drive to simulate memory.
A few years later I became VP of a NY business which needed my talents to save about 4,000 personnel hours per year and shorten certain cyclical billing cycles from six months to 30 days. Using FORTRAN on a timeshare computer, I developed a business application which accomplished these goals, and the computer took about 29 CPU seconds to run.
In the early 1970s, two college professors requested I collaborate with them and sell John Wiley & Sons (publishers) on the idea of us authoring a self-teaching paperback on how to program business applications in FORTRAN. The publisher took on the project with hesitation, but later experienced the text book becoming a best seller in the Americas (English and Spanish editions).
The takeaway from the above is one could write FORTRAN in a structured and self documented format, similar to COBOL. Furthermore, one could easily develop subroutines which performed text and formatting operations not inherent to native 66 and 77 FORTRAN, making it quite usable in the business community.

Are you certain the FORTRAN code is actually on-board the voyager? I seriously doubt that. Any on-board software would be written in assembly language. All the FORTRAN code is on the ground.

The on-board computers were custom designs and there is no FORTRAN compiler for them.

Of course, no source code or compiler would be on the Voyager. This would be wasteful. The on-board computer(s) run machine language. But likely, part of those object programs were compiled with FORTRAN and then installed on ("ported to") the satellite before it was launched.

In reply to by chris albertson (not verified)

Remember the maxim: If it can't be done in Fortran, it can't be done at all.

Very interesting.
My programming "training" as an engineering student consisted of a semester of Fortran IV in 1974, with punch cards and wide greenbar printouts. Two years later I took my first job in an automotive supplier test lab and I worked, sans programming, until 1984, when we contracted to install a computer- controlled multi-service wind tunnel. I spent a couple of years on the delivered Fortran 77 software (on an HP minicomputer), cleaning it up, extending and customizing it.
I still spend part of my time in the same lab, among my other duties, but that wind tunnel software got rewritten in VB6. I've moved on to C, WordBasic, VB(A), embedded C++, and C#.
Perhaps in retirement, I'll come full circle and get a moonlight gig helping to keep Fortran alive...

It makes me feel old. I've been writing and maintaining FORTRAN(77), Fortran 90/95 and Fortran 2003/2008 code for the past 15 years. The "replacement" for my analysis job didn't even learn a compiled language in school, just MATLAB. I took classes in 3 and taught myself another several. Of course, much of what those engineers did on Voyager is similar to what I do today since I also work in the space industry on spacecraft that go to other planets.

Very good article. I started with FORTRAN II-D on an IBM 1620, first version to use a disk based system for much of its work instead of punched cards for everything. One's programs were still punched cards. Programmers at my dad's office taught me when I was doing programming assignments for numerical analysis course. Over my career of 50 years+ with computers I've used Fortran for numerical/math, business functions, business administration, system utilities including a program that converted UNIVAC print files into a format that could be used on an IBM system with high-speed, high-quality printer. It's a great language. Writing math program (system?) for Windows now and Fortran would be so much easier than Visual Basic, except maybe for Window designing/coding.

I've often heard that FORTAN is good for math-heavy programming. But it would be nice to know whether it's intrinsically good for that, or just that lots of math-heavy code is already written in FORTRAN.

(1) E.g., as far as I know, FORTRAN is the only language with a native type for complex numbers (other than APL, which is matrix-based).

(2) Also, you wrote, "Its focus on mathematical performance makes Fortran a common language in many high-performance computing applications". FORTRAN really crunches numbers faster than other languages?

There are a number of reasons, including the following:
1) multi-dimensional arrays are "first class citizens", and these are _very_ useful for storing the fields used by, e.g., weather models;
2) Fortran's aliasing rules make it much more optimizable than vanilla C.
[3) FWIW, it's nice to have "safe" strings and string operations, that are not subject to the sort of buffer overflows that are so common in C.]

It's not unusual for Fortran programs to outperform C written by "average" programmers by a factor of 2; getting. And this is important when computational costs for program executions run into processor-days.

And current (F-90 or later) Fortran _is_ a well structured higher level language that still offers this performance. Speaking as an environmental modeler who has written hundreds of thousands of lines of both Fortran and C.

In reply to by Haim Roman (not verified)

I saw this slide page 17 https://www.slideshare.net/KentaSato/julia-36537461
It's a slide of Julialang, but in this benchmark only FORTRAN is faster than C in most cases. For complex numbers. C99, Common Lisp have native complex numbers. Some languages using heavily in scientific computing like Python, R also have builtin support, but I'm not sure they're native.

In reply to by Haim Roman (not verified)

I rather like the fact that the "trend of Fortran" graph shows the type of asymptotic curve that Fortran is quite good at dealing with...

Column 7 was great, especially when there are only 80 columns on the card.

Many do not realise that relatively speaking, FORTRAN is 'just another' BNF format code with local idiosyncrasies , so learning it isn't that hard. Though the 80 column issue highlights the changes in the need for 'care', and 'method', and their replacement by 'flexibility' in newer language forms.

For fun, try FORTH (nearly as old..) but certainly gave a fresh way of thinking about problems.

Thanks for the great article!

I taught myself how to write programs in AppleSoft BASIC on the Apple II, but FORTRAN was my first compiled language. I still have the FORTRAN 77 ANSI X3.9 - 1978 book on my bookshelf.

As an undergraduate physics student in the early 1990s, we all learned to write programs in FORTRAN 77 so we could do numerical analysis on our lab data. That seemed standard at the time.

As a research intern at a national lab between my junior and senior years, my mentors discovered I knew FORTRAN. So I got the job to port a FORTRAN IV program to FORTRAN 77 (Fortran 90 had recently been defined, and the lab didn't have the compiler yet). The computed-goto still gives me nightmares when I think about it.

I programmed in Forego, a Fortran predecessor, at a high school enrichment class at Clarkson using punched cards in the mid 60's, then went on to use Fortran in the early 70's to predict geosynchronous satellite drift for GE Space Division. More Fortran after that to support radar data analysis and produce 2D and 3D plots in the 80's-90's. It has been a valuable tool for many years! I don't know if I still have my copy of Daniel McCracken's Guide to Fortran Programming.

About 1962 I worked at AERE Harwell developing the FORTRAN compiler for the Ferranti Atlas super computer. This was written in FORTRAN and developed on the IBM 7090 at RISLEY. The code was loaded onto mag tape on an IBM 1401 and sent to Risley (Manchester) on a Dakota flying from Jersey via RAF Abingdon to Manchester. It was a tedious job with FORTRAN not being a good language for the job. Another interesting computer was the PR1ME with all its software including the operating system written in FORTRAN - a very successful computer for its day. Oh happy memories!

Anyone else remember Murray-Shelley's "Teach yourself computer programming"? I learned Fortran from it when I was 11, and went on to add "Teach yourself Linux" to the same series.

I have a GNU FORTRAN T-shirt that I've worn to PyCon... ;-)

The Xerox Sigma-7 with operating system CP-5 (IIRC) had a few different FORTRAN compilers. It had a vanilla FORTRAN, but also included EFORT (pronounced "effort") the Extended FORTRAN compiler, an FLAG, a.k.a. FORTRAN Load and Go. I think it was EFORT that could would take forever to compile but optimized the hell out of the code. In an Assembly Language course, a professor showed us just how much "effort" EFORT would make by creating complex program that did nothing. EFORT analyzed all the variables that were set to constant values and then never changed, did the math wherever such variables were used, looked at the IFs and DOs and eventually came to the conclusion that the IFs were either always false or always true and the DOs would never be executed. So it generated an output file with a file size of zero -- well, maybe not zero, but we saw the generated assembly language and there was essentially nothing there.

I don't know if it still the case but back in the early 70's at the "tute", pretty much everybody was required to take at least one semester of programming and each engineering department (and a number of science departments) offered a programming course. I was a ChE major but the Civil Engineering department had the newest mini-computer, so I took their course. We needed to write programs in three languages: assembly (i.e. using register arithmetic), COGO (a language used for surveying), and FORTRAN IV. And yes, we wrote the programs using punch cards on IBM 039 card punch machines. Every card held a single line of code... And if you mistyped something, you had to tear up that card and type out a new one. Those were the days... :)

In addition to the NASA and weather forecasting software mentioned in the article, there is still commercial software in routine use that is running FORTRAN under the hood. In the chemical engineering arena, both Aspen Plus and PRO-II have process simulation engines that are written in FORTRAN 77. Their GUI's are written in more modern languages (FORTRAN is not so good at event-driven programming :) but the GUI then submits the problem to an engine written in FORTRAN and then receives the results and displays them for the user.

As with NASA's software, these ChE simulators are still usable and it would take an enormous effort to rewrite these simulators in a more modern language and you would then need to spend man-years to get all the bugs out.

AspenTech and Invensys have the same trouble as everybody else with old FORTRAN code... Nobody learns it in school these days. In addition, there are fewer and fewer FORTRAN compilers available. Back in the day, there 5 or 6 commercial FORTRAN compilers but now I believe there is only the GNU open source FORTRAN compiler and Intel's (which I believe is a derivative of DEC's). And, of course, if you ware wanting to run your code on the latest computer hardware their has to be a compiler written for that hardware.

It's hard to beat libraries that have been developed and therefore battle tested and debugged for decades.

It's been decades since I learned and coded FORTRAN(-77) but it was the language I learned in college (I think my 3rd programming language I learned) and my introduction to structured programming.

FORTRAN was the first computer language I learned, as a college sophmore in the late '60s. Still have the text book. Compiler was at a local engineering firm, and test turn-around was overnight. At one shot per day, you learned to do careful desk checking. The next year used Basic via GE Telecomputing - programs punched on paper tape. For my senior year, the school sprang for a FORTRAN compiler to run on the business office NCR computer. My job was to run the students punch-card decks through the computer during the business office lunch hour. Spent an interim month learning to use FORTRAN as a language usage analysis tool, under tutelage of a Classic Languages professor.

Post college, took a job with an insurance company as a trainee programmer, thinking I might eventually use my Math degree in the actuarial field. Enjoyed the challenges of solving problems in multiple languages ranging from machine language, operating systems, application developlment tools, and business programming. When preparing my resume for my post-career job search, I realized that I could list over 35 programming languages, data access protocols and the like. Even did a smattering of FORTRAN during those years.

Also- I believe that Fortran is more machine independent.
That is- You will get the same answer when you run it on different hardware.

I used Fortran until I started grad school in the late 80's, and then switched to C and eventually C++. Fortran moved ahead without me. A year or two ago, I collaborated on a project with one of the post-docs in our lab, but the only language he knew was Fortran, so I warned him that I would be doing my part in "grumpy old man Fortran 77".

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.