Thursday, November 1, 2018

The Wayback Machine, Computer Languages Edition

A couple of days ago, I posted on Facebook:
FORTRAN is the first high language I learned. It's clearly also the first one I forgot...
which led to an amusing thread with friends who knew me back in college.

It turns out my command of FORTRAN isn't lost, it's just my brain hid it somewhere. This was no doubt a vain attempt to save my sanity. Now (with the occasional help of a few choice archival sites on the web) the FORTRAN is coming back ... with a vengeance.

To wit, I offer this gem from code I wrote in high school:
WEK DAY = MOD(WEK DAY - 1 + MONTH(B), 7) + 1
That is valid code, because FORTRAN doesn't tokenize on spaces. That is, WEKDAY could be spelled WEK DAY or W E K D A Y; they are all the same valid FORTRAN variable. (Tokens were something for subway turnstiles when FORTRAN was invented.)

At least I commented the program sometime in college. The first version from high school had minimal comments, as I originally wrote it on a 029 keypunch. (If you ever used a keypunch with its lack of an erasing backspace, you would understand.)

Shockingly enough, the program, written in 1978, was not Y2K ready. Let me see what I can do about that . . .

Note: My sanity is not lost, it's backed up on tape, somewhere.

No comments:

Post a Comment