Doctor Fortran in “IMPLICIT Dissent”

“GOD IS REAL, unless declared INTEGER.” That’s the only Fortran joke I know, the basis of which is one of the oldest (mis)features in the language, implicit typing. As it has been since The FORTRAN Automatic Coding System for the IBM 704 (1956), variables whose names start with the letters I through N are implicitly INTEGER, all others are implicitly REAL. (In ur-Fortran, these were called “fixed point” and “floating point”.) The earliest Fortran didn’t have type declarations at all, nor the IMPLICIT statement. I think it safe to say that no other Fortran feature has caused programmers more trouble, yet it remains a “first-class” feature today. Some people want to change that, though the approaches vary. Let’s explore.


Doctor Fortran in “Order! Order!”

It’s right there in the (original) name – FORmula TRANslation. Formulas, or expressions, are an integral part of pretty much every Fortran program. The rules regarding evaluation of expressions in Fortran can sometimes be tricky, with some that will be surprising to those used to other languages.


Doctor Fortran in “We’re All BOZos on This Bus”

Time for another “ripped from the headlines” post about a frequently misunderstood Fortran feature! Today I’m going to talk about non-decimal constants, often referred to as BOZ constants – Binary (base 2), Octal (base 8) and Hexadecimal (base 16). (Yes, I know Hexadecimal doesn’t start with Z, but what can you do?)


Doctor Fortran in “Not My TYPE”

Fortran is a strongly typed language, meaning that entities (variables, etc.) have a type that is largely known at compile-time and can be checked by the compiler. In addition to the intrinsic types that existed in FORTRAN 77 (integer, real, complex, logical, character), Fortran 90 added the concept of user-defined types or “derived types”. (FORTRAN 66 and 77 considered DOUBLE PRECISION its own type, which led to some weird carve-outs in the language that persist to this day.)


Doctor Fortran in “Farewell to Walt”

Former Fortran committee member Jerry Wagener sent this sad news today:

Walt Brainerd passed away on June 4th, 2020. He had cancer of the brain stem.

Walt joined X3J3 in the mid 1970s and was a strong advocate for Fortran for the rest of his life. He authored and co-authored many books on Fortran, taught classes, gave seminars, and ran “The Fortran Company” website.

On X3J3, Walt consistently advocated adding clear modern features and deprecating old, unsafe, features; often against strong opposition. He encouraged the numerical analysis community to take an interest in Fortran development and he was the typesetter for Fortran 90. Throughout all of the Fortran struggles and joys, he was just a good guy.

He was teaching a class at the end of February and had a fall. After he flew home and went to the hospital, they discovered a mass on his brain stem. He was in home hospice when he died. His family was with him.

I met Walt only once, at the “Fortran Geezers” meeting in 2017, but had many online interactions with him. Walt was a tireless supporter of the Fortran language and continued teaching Fortran classes after his retirement. If more details or an official obituary become available, I will update this post.

Doctor Fortran in “The Modes, They are A-Changin'”

I have often said that my least-favorite feature of the Fortran language is “OPEN on a connected unit”. In most cases, programmers invoke this accidentally and are confused by its behavior. But it does provide a way to do something useful for which the language doesn’t provide an alternative. Let’s explore.


Doctor Fortran in “Military Strength”

In my Twitter feed today was this gem from user @science_dot:

There is very little proper Fortran 77 in the world. Legacy Fortran almost always uses extension from MIL-STD-1753 and we should call most legacy Fortran “Fortran 80” to reflect when those compiler features would have been broadly available.

I agree completely – nearly every bit of code I see someone call “FORTRAN 77” isn’t at all. Sure, there are the obvious things such as INTEGER*4 and STRUCTURE/RECORD that are extensions that never made it into any standard. But I’ll often see INCLUDE or END DO, which were also not part of FORTRAN 77; they were part of another standard, MIL-STD-1753.


Doctor Fortran in “Forward!”

Welcome to the new home of the Doctor Fortran blog! Given that I have been retired from Intel for more than three years, it seemed appropriate to give my posts their own home on my web site. With Intel’s permission, I have copied here the posts I wrote while I was an employee. (Apparently four of those posts had been deleted – I was able to recover one of them.)


Doctor Fortran in “Larger Than Life”

Stan Whitlock 1948-2018

I hate writing these, but as the years go on there will be more.

Stan Whitlock passed away yesterday (September 3, 2018) a mere six weeks after he was diagnosed with pancreatic cancer that had spread to his neck. He was 70 years old. Many of you may not know Stan’s name, but if you’re reading this blog Stan has undoubtedly touched your Fortran life. Stan joined Digital Equipment Corp. (DEC) in 1976, to work on the TOPS-10 (DECsystem-10) FORTRAN compiler. He had previously been a COBOL programmer for the Federal Reserve Bank of Boston. By the time I met Stan in 1979, he was leading the VAX APL project. Somewhere in the mid 1980s, he returned to Fortran, joining the DEC Fortran 90 project, and eventually he ended up being the project lead. In the Intel years he gained the title “Fortran Architect”, which meant that he helped explain Fortran to other teams at Intel what Fortran required and (re)designed directive syntax so that Fortran could use it.


Subscribe to Doctor Fortran

Subscribe to Doctor Fortran