Which computer programming language is this? (1970s documents)
August 19, 2022 3:55 PM   Subscribe

I was going through some old documents which belonged to my late father and came across this printout of a computer program. I'm just curious what language it is? I'm guessing Cobol or Fortran just due to the era. I think this was part of his post-grad work, so it might have been about 1974 or so?
posted by Larry David Syndrome to Computers & Internet (15 answers total) 2 users marked this as a favorite
 
Best answer: That's FORTRAN. To be more specific, that looks like FORTRAN IV. (Yes, the all-caps in the name is essential!)
posted by phliar at 3:59 PM on August 19, 2022 [7 favorites]


definitely not COBOL or BASIC, leaning towards FORTRAN as well.
posted by dis_integration at 4:02 PM on August 19, 2022 [1 favorite]


(My first programming language, way back in 1982, was FORTRAN 77.)
posted by phliar at 4:03 PM on August 19, 2022 [3 favorites]


Response by poster: I bet my son that MeFi would have an answer in 15 minutes or less. You folks came through as usual!
posted by Larry David Syndrome at 4:07 PM on August 19, 2022 [7 favorites]


Yep, FORTRAN, just more "modern" than the version I learned in 1970.
posted by forthright at 4:10 PM on August 19, 2022 [3 favorites]


Jeez, that was fucking four minutes. Outstanding!
posted by Bella Donna at 1:17 AM on August 20, 2022 [2 favorites]


Best answer: from the variable names, calculations and handwritten annotations it looks like it is doing some kind of statistical analysis for sales forecasting.

fun fortran facts: unless you turn off implicit typing, the default behaviour is that the type of a variable is determined by its initial letter. variables that start with i, j, k are integers, as that's how index variables are often named in math. fortran has reasonably good support for number crunching with multi-dimensional arrays (which makes it relatively simple to do matrix algebra etc). a bunch of the variables in this program are 1-dimensional arrays. ("dimension sales(120)" allocates a 1d array with 120 elements named sales, maybe each element is a month in a 10 year time period).

fortran still has a bit of a surviving niche these days in large-scale physics simulations, even though no one would think of using it to write new business software. right now there will be various researchers around the world trying to translate some new equations into fortran to bolt on to some existing climate model.
posted by are-coral-made at 1:58 AM on August 20, 2022 [6 favorites]


That's my old friend FORTRAN IV.
posted by james33 at 4:32 AM on August 20, 2022 [1 favorite]


Best answer: And... please allow me to geek out for a sec. If your eyes glaze over looking at that, with a little info, we can decode some of it:

The third line has 01/01/70, suggesting that it was written in 1970, though who knows how accurate that is.

The "Execution" section at the end is the output of the code. It's reading sales data from somewhere, printing out the sales, forecast, and difference. And on the 4th line, we can see that the code creates, via a "dimension" statement, 3 variables sales, frcst, and diff. And we can have up to 120 of each of those, so maybe 120 sales regions, or salespersons, or products?

In the first page and a half, there're 3 "paragraphs", and the second and third paragraphs define subroutines called "STAT1" and "SHSHORT". The first paragraph is the main program, called PUFFT in line 3, which might correspond to a company name, or sales division name, or something. Line 2 tells the OS to run PUFFT.

The STAT1 subroutine is called from the end of the main program, PUFFT, and SHSHORT is called from the middle of STAT1.

The handwritten stuff on the page gives some clues. And I see statistical looking code, like stddev for standard deviation, xbar = a variable commonly used to denote an average of x values. I see the trigonometric function sin(). Skewness refers to whether the plot of a bunch of numbers is bell shaped, bimodal, ski-jump shaped, etc.

In the left margin, there are occasional numbers. These are line numbers. So the first line with a number just says "CONTINUE", which means it's the end of a loop, which is defined up on the seventh line with "DO 1...". You can see other goto and do loops with use the line numbers. You'll see 3 lines numbered 1, and might think that's not allowed or ambiguous, but the second line 1 is within the subroutine STAT1 and the other is in the other subroutine, so no ambiguity.

And the line after the line with the 1 in the margin is where the lines of output are printed.

The holes down the side are so the paper can be fed thru a printer, probably a line printer. And the larger holes are punched out so the paper can be put in a 3-ring binder (in case your son has never seen a 3-ring binder nor a punch that makes those holes).

The data was probably fed into the computer on punch cards, as was the program itself.

I'll stop there, but if you want more about FLOAT and FORMAT...

One more thought:
FORTRAN stands for Formula Translator - translate a math formula into computer code. Lots of the world still runs of it: weather forecasting, climate change models, oceanography models, ecological models, oil exploration models, etc. There's a list of the 500 most powerful computers in the world; those run these kinds of programs and lots of it is still in FORTRAN, and even if programmers today are writing in python, or Julia, or C++, there's lots of numerical code in subroutines in libraries that's still used.
posted by at at 5:37 AM on August 20, 2022 [8 favorites]


> 01/01/70

That's the UNIX epoch, which suggests this was (a) probably *not* written in 1970 and (b) was probably printed on a computer that hadn't had its time/date set.
posted by parm at 12:30 PM on August 20, 2022 [3 favorites]


I used to work in a bank where a chunk of the code running on the mainframe was some kind of FORTRAN variant (yes there was COBOL and more arcane stuff there too). This was in the late 90s and the code was from the late 70s. It would not surprise me in the least to discover it is still in production.
posted by i_am_joe's_spleen at 5:21 PM on August 20, 2022


FWIW, if you know FORTRAN and/or COBOL you can actually make reasonably sweet money today, because of all the legacy stuff still running deep in the bowels of various large banks, insurers, etc.
posted by Thorzdad at 8:51 PM on August 20, 2022


@parm, excellent point!

Fix broken link: https://partee.io/2021/02/21/climate-model-response/
posted by at at 6:30 AM on August 21, 2022


A bit more googling: PUFFT is the Purdue Univ. fast FORTRAN Translator
pdf paper,
pdf, user guide
The Evolution of a Compiler: PUFFT 1964-1972

Seems it ran on an IBM 7090
posted by at at 6:00 PM on August 24, 2022 [1 favorite]


Response by poster: at- thanks for the added info! That makes sense about PUFFT, Dad attended the Krannert School of Management at Purdue and also did his undergrad engineering studies there. I wonder if this was original code which he wrote, or if he just keyed in an "off the shelf" program + his own data set?
posted by Larry David Syndrome at 8:12 PM on August 24, 2022


« Older Talk me through my sourdough starter   |   What's a good source for a free pre-save on... Newer »
This thread is closed to new comments.