This Is Not Your Father’s FORTRAN

I learned to program FORTRAN IV in the spring of 1968 while working as an engineering technician in water resources. One of the engineers knew of my interest in computers and asked if I would like to learn FORTRAN. He needed to calculate the biological oxygen demand in streams but didn’t have any interest in programming. I jumped at the chance.

415I2ZfVyqL._SX258_BO1,204,203,200_This was the days of big iron when the term computer meant a room full of heavily air-conditioned equipment. The State University of New York at Buffalo had an IBM 704 but they soon upgraded to a CDC 6400. To help pay for it they were inviting people to attend a seminar on FORTRAN so they could use the system. My job was with a small State of NY office and getting approval for me to attend was surprisingly easy.

Off I went for 6 weeks of training on one night a week. I still have my black “A Guide to Fortran IV Programming” by [Daniel McCracken]. For years, this was the FORTRAN bible, commonly referred to as just “McCracken”.

The programming went well and somewhere out there is a very old paper with a reference to the results it generated about the Chadakoin River flowing through Jamestown, NY.

This is FORTRAN’s strength – scientific calculations. It’s name says it: FORmula TRANslation.

Origins and FORTRAN IV

[John W. Backus] suggested to IBM a language to replace assembly language. Development began in 1953 for the IBM 704 and the project reached fruition in 1957. Not only was it the first general purpose high-level language, just beating out COBOL and LISP, but its compiler optimized the code since it needed to compete head-on with assembly language. It was the C compiler of its day in that regard.

That was not the only reason it attained success. Reducing the number of punched cards needed for a program by a factor of 20 over assembly helped considerably.

In those days, you needed to use a key punch to create a deck of punch cards. To be really good you had to know how to create a programming card that would let you skip through the fields on a FORTRAN card, or how to edit a card by duplicating it and holding one of the cards in place while you typed in new characters. Because of my fascination with computers I’d taken a key punching and automation machines class in high school so I was all set.

A FORTRAN card begins with a field of 5 characters. If the first character was a ‘C’ is was a comment card. Otherwise the characters were either blank or a line number. The line number provided the destination for GOTOs.

fortran cardThe sixth character could be anything except a ‘0’, which meant the card was a continuation of the previous card. A good practice was to use characters in sequence so you could tell the order of continuation.

Columns 7 to 72 were for program statements. The remainder, from 73 to 80, were not used by the compiler. The intent was to put sequence numbers in those cards so when the deck inevitably was dropped, or the card reader ate it, you could sort the cards into proper order again. A box of cards contained 2,000 cards and trays about 5,000. I’ve seen programmers literally cry when a card or tray dropped with cards that were not sequenced. I worked as an operator at SUNY at Buffalo on that CDC 6400 and loaded programs and data that spanned multiple trays of cards.

The character set for FORTRAN was:


A .. Z 0 .. 9 = + - * / ( ) , . $

A space, interestingly enough, was not a character. They were totally ignored. A variable named XYZ was valid in that form, as X YZ, or as XY Z.

Variable names were limited to 6 characters and had to start with a letter. The letter I-N as the first letter implicitly meant the variable was an integer. All other letters meant a real number. This could be overridden by explicitly typing a name:

INTEGER ABC, XYZ
REAL IMREAL
LOGICAL TRUE, FALSE

The other data types were COMPLEX, CHARACTER, and DOUBLE PRECISION.

Arrays were declared with the DIMENSION statement:

DIMENSION XY(100), AB(2000, 3) 

Data initialization used DATA:

DATA A, B, C, D, E, F /0, 1, 2, 5*3/

One of the interesting control structures was the arithmetic IF statement. The value in the statement was tested for being greater than, equal to, or less than zero. Depending on the result the statement jumped to one of the three line numbers following the statement:

IF (NONZERO) 100, 200, 300 

There was an IF statement that tested for .TRUE., as FORTRAN deemed the value. IF statements could not be nested.

There was only one loop statement, the DO, which could be nested:

DO 200 I = 0, 10, 3
C do some calculations, I starts at zero,
C increments by 3, and exits when it exceeds 10
C The next line is the end of the loop
200 CONTINUE

FORTRAN IV did have SUBROUTINEs and FUNCTIONs that were entered using a CALL statement and exited with a RETURN.

Here is a list of the other program statements allowed in FORTRAN IV:

EQUIVALENCE
GOTO, GOTO, ASSIGN, assigned GOTO
DO
FORMAT
READ, READ INPUT TAPE, WRITE, WRITE OUTPUT TAPE, PRINT, and PUNCH
READ TAPE, READ DRUM, WRITE TAPE, and WRITE DRUM
LOGICAL
END FILE
REWIND
BACKSPACE
PAUSE
STOP
FREQUENCY
END
COMMON

See if you can decipher this FORTRAN IV program for calculating the area of a triangle.

C AREA OF A TRIANGLE - HERON'S FORMULA
C INPUT - CARD READER UNIT 5, INTEGER INPUT, ONE BLANK CARD FOR END-OF-DATA
C OUTPUT - LINE PRINTER UNIT 6, REAL OUTPUT
C INPUT ERROR DISPAY ERROR MESSAGE ON OUTPUT
 501 FORMAT(3I5)
 601 FORMAT(4H A= ,I5,5H B= ,I5,5H C= ,I5,8H AREA= ,F10.2,12HSQUARE UNITS)
 602 FORMAT(10HNORMAL END)
 603 FORMAT(23HINPUT ERROR, ZERO VALUE)
     INTEGER A,B,C
  10 READ(5,501) A,B,C
     IF(A.EQ.0 .AND. B.EQ.0 .AND. C.EQ.0) GO TO 50
     IF(A.EQ.0 .OR. B.EQ.0 .OR. C.EQ.0) GO TO 90
     S = (A + B + C) / 2.0
     AREA = SQRT( S * (S - A) * (S - B) * (S - C) )
     WRITE(6,601) A,B,C,AREA
     GO TO 10
  50 WRITE(6,602)
     STOP
  90 WRITE(6,603)
     STOP
     END

Code from https://en.wikibooks.org/wiki/Fortran/Fortran_examples.

GOTO the Future

Despite its age Fortran, as it is now called, continues to survive and possibly even prosper at its job of scientific and engineering calculations. It is true that C++ is now making inroads, but it has a long way to go before it is the king of calculations.

One reason Fortran does well is the extensive collection of legacy code from the previous decades. You don’t rewrite code that took man decades to produce, is debugged, and known to work well. Even the open-source community recognizes this since the GNU compiler suite, usually known for C and C++, includes a modern Fortran compiler. This isn’t really surprising because after the first phases of compilation are completed the generation of the machine code is common to all of the suites’ languages. Those first phases are the easy part.

The language has been regularly updated by the standards committees, including the ANSI standards group once it came into existence. FORTRAN IV came out in 1962. It was followed by updates in ’66, ’77, ’90, ’95, 2003, and 2008. Work is currently proceeding on Fortran 2015 to be released in 2018.

Along the way it lost its fixed format lines and became free form like other modern languages. It also lost its line numbers. The arithmetic IF met its demise.

Today the language carries most of the features you’d expect: do-while, recursion, select-case (switch-case equivalent), dynamic memory allocation, and even object-oriented capabilities.

One capability added is the ability to handle matrix operations. This is sensible given its usage for scientific calculations. Still, Fortran today is relying more and more on libraries written in C/C++, so much so that the specifications include compatibility guidelines for using those languages.

It’s Not Dead, Jim

The language isn’t dead, although it doesn’t show up on the popularity charts. A quick search on LinkedIn found 9 jobs in Houston, and many more around the US, with the requirement of knowing Fortran. Most also wanted C/C++ which reflects how the three languages are commingling. I would expect most of those who use Fortran aren’t using it for hacking so GitHub doesn’t see many uploads, which seems to be a main measure of popularity.

Additionally, Fortran is a niche language and I mean that in a positive sense. Where Fortran is used, it is the language to use. That is, of course, high performance and scientific computing. A few specifics are weather forecasting, climate modeling, and computational physics, astronomy, chemistry, and economics. It’s used by investment houses for financial modeling. According to [Adam Fabio] Fortran based air-control systems are still in use. Think about that the next time you fly.

Is Fortran a career path to recommend to your college age children or friends? Probably not. Although they may need to learn it for careers in the fields mentioned above. It’s not likely to show up as a language used for Arduinos, but you may be able to install in on a Raspberry Pi.

Fortran is still out there doing what it does best: crunching numbers.

Here’s a promise. I’ll write up the first hacker who notifies Hackaday on the tip line that they created a Fortduino.

106 thoughts on “This Is Not Your Father’s FORTRAN

  1. THANKS! What a great trip down memory lane! Yes, for many, FORTRAN was all about legacy code. I inherited a polynomial curve fitter written at Harvard, having a single comment line “Crout’s Reduction Method”. When the university CDC 6600 went away, I bought the Lahey Fortran compiler for the brand new thingy called a “PC”. Why? I tried every math package curve fitter I could locate, and nothing came close to doing as good a fit as that mystery code from Harvard. Hmmmmmm. . . I wonder if anyone ever ported a sufficiently ancient PC DOS to modern hardware. . . .

      1. Most Fortran programs were distributed by source, as practically everyone had a Fortran compiler available for the target system, and in its heyday there was a large variety of target systems (wildly different processor architectures). Also Fortran source code was commonly published in scientific and computer science journal papers (or appendixes), and government research projects and laboratories (e.g. NEC, NETLIB, LAPACK, BLAS, MM5).

        I found it odd the focus on FORTRAN IV, which while influential in its day, was not the lasting influence of Fortran 77 which come from the heaps of Fortran 77 (i.e. the 1977 standard) code based that retained the bulk of those antiquated restrictions (variable names, indentation, column awareness) that were not lifted until Fortran 90/95 (1990-95). I have never had to compile FORTRAN IV code, while I have used several instances of Fortran 77 code from various sources since 1990.

      1. “Of all the software associated with the Ferranti Atlas computer, two systems were destined to be remembered as landmarks. One was the Supervisor, which was the first multitasking, multi-user operating system. The other was the Compiler Compiler which, when provided with a syntactic and semantic description of a programming language, would automatically generate a compiler for that language. Both the Supervisor and the Compiler Compiler (CC) were conceived and developed at the University of Manchester between about 1960 to 1964, in the spirit of making a high-performance computer more efficient and user-friendly. The Compiler Compiler was the idea of R A (Tony) Brooker.”
        https://elearn.cs.man.ac.uk/~atlas/docs/Tony%20Brooker%20and%20the%20Atlas%20Compiler%20Compiler.pdf

  2. Flight Simulator company Singer-Link in Binghantom NY did/does use Fortran. I once went for an interview there – and got a small tour of their factory – lined with barriers for security. I didn’t know Fortran well enough for their needs.

    1. I work on a bunch of 30 year old Link sims. We’ve converted almost all of them to modern linux PCs (from ancient mainframes that look like oversized refrigerators) but they’re still 99% FORTRAN.

      Sims built since 2000 seem to be almost entirely C or C++ from what I’ve seen.

  3. I learned Fortran in the 70s using an IBM punch card machine and a Honeywell computer. The character sets were slightly different, I think I had to punch a ‘&’ character instead of ‘(‘, which made it very difficult to read the code.

    My Matrix algebra course at the university used Fortran and a code library (I can’t remember the name) for handling matrices, but that was painful, required a lot more knowledge of matrix math than the beginner students had at the time.,

    1. Same timeframe, but the hardware was IBM. There were still a few characters that had mismatches, due to the choices made for the sets on the card punches and printer bands. It was almost an improvement when I got access to the 5252 display terminals, except for the vertigo they induced.

  4. Programing was like photography. You had to take it to the developer and come back later and see you made a tiny mistake. Go to the keypunch make a new card right, and resubmit.

  5. I started with Fortran IV a on a Watfiv compiler. And I was one of those that dropped a full box of non sequenced cards. I sat down with my code handwritten on a green and white Fortran coding pad and sorted them back in order. Actually took less time than punching new cards and I didnt have to wait in line for a punchcard machine and I was able to keep some cards in order after I dropped them. It was a day to celebrate when I got a terminal login authorized.
    I didnt realize there was a GNU version of Fortran, I’ll have to look at that.

      1. Although I guess the patterns would help with sorting the card deck if you dropped it, we used the pattern as a means to quickly identify our deck in the output bin when we got our run back. Personally, I lived in fear of dropping a deck! So I was very careful with them and was lucky enough never to have to sort a scrambled deck. That or I block the horrible memory of having to sort them by hand.

      2. Many years ago one of the operators where I worked dropped a 360’s IPL deck. Unfortunately he was unaware that the cards had to be read in order (!) and just stuffed ’em back in the tray as he picked ’em up. Took everyone a while to figure out why the machine wouldn’t come back up next IPL. :)

  6. I learned UTO [University Toronto Ottowa] Fortran on an IBM 1620 back in ’68 – I recently bought a copy of the programming book [Basic Programming Concepts and the IBM 1620 Computer], that I had used in high school, and enjoyed the section on how the original Fortran compiler for the machine worked. It’s an interesting guide to ‘rolling your own’ for those interested.

  7. Programming was like photography, you had to take it to the developer and come back later to find you made a tiny mistake. Go to the keypunch make a new card right and resubmit.

  8. My first computer language was Fortran. We used it to calculate students’ marks. I made my first computer generated Xmass card using ascii art. Had to run to another faculty building to pick up the output on green-and-white listing paper. Those were the days my friend…

          1. Most columns are doric, although doric and ionic columns appears at around the same time. Corinthian columns came at a later date with more fancy engravings.

          2. Show of Hands time: Who’s read “Real Programmers Don’t Use Pascal”? By the author’s definition my Dad was definitely a Real Programmer: Piles of greenbar paper, stacked in approximately chronological order, carefully moved from division as he hopscotched around Goddard, filled with FORTRAN (and God help us all APL) listings of nearly everything he’d ever written. The idea that he could use a PC and carry his source on a floppy disk revolutionized my old man’s life! :)

    1. Ah, my grandmother used to bring us so much green-and-white paper to draw on when we were kids. It was used, but the plain white side was still great for drawing on. If it was now, I’d be more interested in what was on the green side. If we were really lucky, it was duplicating stuff, so we could play with carbon paper!

      She told me later it was from a Burroughs mainframe. Same Burroughs family whose fortune let William Burroughs bum around Morocco absorbing their national heroin surplus.

    1. I learned FORTRAN at Michigan Tech in 1974 using their then new VAX 1110. The thing was so large it had to be lowered through the roof of the Admin Bldg (also new at the time) by crane. It was my second language after learning BASIC in high school on a DEC PDP 8i “mini-computer” using an ASR33 Teletype. The VAX used more “modern” punch cards and I remember well the same FORTRAN IV book shown in this post (I still have it in storage somewhere). There were only a few card machines outside the computer center so it was hard finding one unoccupied. I eventually went on to become a computer service engineer for Honeywell from those humble beginnings. It was so satisfying watching those machines hum, blink, and come to life after a repair!

      1. I was at MTU a year later and programmed FORTRAN on the UNIVAC using punch cards, but its still a large, large, large world. (Got on a airplane in Chicago and took 8 hours to fly to Germany, its a large, large, large world.)

  9. I first learned ForTran at a community college, NHCC, in Houston back in the early 80’s. It was about ForTran 77 btw. I had a job in early 90’s updating an interface simulator for the a Tomahawk program that was in ForTran 77. The Tomahawk programmers were doing ROLM ForTran which was a variant of ForTran IV. BTW, I have used punch cards for ForTran programs.

  10. I think I just missed you at SUNY/Buffalo. They had just replaced the CDC6400 with a Cyber170. My first undergrad classes were Fortran on punch cards, but within a few years they added dumb terminals and you could manipulate your card decks with a command line editor (ucedit?) My favorite i/o device was the plotter. I still have a big binder of listings which are much more readable than the dozen varieties of floppies and tape I have no way of reading.. Ironic.

    1. My bachelor’s was in ’74 and I did a couple years towards an MS in CS. But I left in late ’76 as a computer system manager / programmer at the U of Rochester Laboratory for Laser Energetics. Then to Houston in ’78. It was good being an operator for my CS classes. I could run them under the operator’s account and up their priority for faster turnaround.

      1. In 1974 when I took a comp sci course that required keypunching Macro-10 assembly (which didn’t have any provision for sequence numbers), people routinely took a felt pen and drew a diagonal line across the top edge of the deck, starting at the left at the front (first card) to the right at the back of the deck. This made it easy to sort because any out-of-place card showed a dot away from the proper diagonal line. Tedious, but not tragic.

      2. Paper IS the ultimate backup. Back in the days of highly-flammable nitrocellulose film stock, the US Copyright office (or was it the Library of Congress?) only accepted prints of movies on paper. This has allowed many very early films to be restored and digitized. Or so I’m told.

  11. I always think about under-managed mainframes when I hear talk of fortran or cobol

    P.S. I actually learned fortran while wearing a aloha shirt and sunglasses back in 300 B.C. while sitting around talking about last night’s football game with Aristotle arrrgggg kids these days with their matlab

  12. I learned Fortran in high school in the late 70’s using a PDP 11/03 — it could do Multi-User Basic (MuBAS), or single user RT-11 for Fortran. The first college class was also Fortran, and then I didn’t use it again until my first job out of school (I’d done programming work while in school too), on VAX/VMS. I was asked to solve why a certain program got slower and slower as it ran. It turns out that the code would read records from the input file, which didn’t have an “end of section” mark in it, but did have a “start of section”. So if it hit the start of a new section, it issued the Fortran BACKSPACE command on the file. That might work great on tape, but for the VMS disk driver, it would close the file, open it again, and read records until it got to the same spot again.

    Easy logic to fix. I was a hero.

  13. I first ran FORTRAN on Southeast Missouri State University’s mainframe. I wrote a program to kick out the 10,000th prime number using a PC version of FORTRAN. I compiled it into an .exe. It took about five minutes to run on my 80286 8MHz machine. It ran in less than half a second on the mainframe. It was the same algorithm.

  14. I first came across FORTRAN at university. My girlfriend was a psychology major, and she was struggling with some statistical analysis of experimental data. All of the stats were crunched using SPSS – which was written originally in FORTRAN. I just consumed it, and wrote a ton of code. I think it was that, and the fact I could touch type on an IBM 029 card punch which earned me sexual favours.

    To be honest, I much preferred ALGOL on the local ICL 1907 for playing with. That may be where the girlfriend got bored and drifted away.

  15. My memories of this era seem somewhat different and perhaps confused.

    I can’t really distinguish between the time when we learned Fortran and the time we learned COBOL, from memory they were close together.

    The first cards we used had little rectangular breakout sections and were fan-form like fan-form paper where one sheet (card) was connected to the next by a perforation and folded back and forth.

    The next cards we used where ‘Mark Sense’ where you marked squares with a heavy 6B pencil and the reader would detect the conductive mark from the pencil. There were also fan-form but they were also very unreliable especially when the cards got a little worn out so they were quickly replaced by the next type.

    The third type were ‘Optical Mark Sense’ and they had light sensors that detected the marks on the cards. They were far more reliable than the previous conductive type as long as the reader was kept well tuned.

    For both the conductive ‘Mark Sense’ and the ‘Optical Mark Sense’ you could use a rubber to correct mistakes. For the punched cards you had to punch out all the rectangles in the incorrect row so that the reader ignored it.

    Cards could be separated by tearing along the perforation so you could add cards (a program line) in between others.

    We always had fan-form cards and never had any issue with sequencing cards so I don’t know why my experience was different to others. Perhaps I was luck or maybe it was just a location thing or a difference in the preferences of our stores people.

    It was really an art to keep your edits to a minimum so you don’t have to tear any perforations and it made it so so much easier to feed the reader with one continuous section of cards.

    1. I was once playing the “Oh you had paper tape? We’d have loved to have paper tape!” game with someone when we were both one upped by a Lutheran pastor. He overhead us and said, “Oh, I took a computer class in college. Of course, my school didn’t have a computer. We used cards that had little die cuts in them and we’d punch them out by hand. Then we’d put them on a bus that took them to (nearby big University). The next day, the bus would come back with your printouts and get more cards.”

      I’ve done a lot of things in my time, but hand punching cards isn’t one of them. However… I was telling that story in a class I was teaching some years back and the students said, “Oh yeah. We use those kind of cards.” I was at the West Palm Beach Election District (no kidding) and this was before they had made the term “hanging chad” infamous. A year or two later I’m watching the news stunned that CNN was filming from where I got my breakfast every day during that class.

  16. I wanted so badly to learn FORTRAN while at college from the very experience professor who knew it like the back of his hand. Sadly, in all my years there, they never offered the course. That said, there is nothing wrong with learning it on my own… when I get around to it for personal curiosity’s sake.

  17. I learned Fortran in the summer of 1979, when I was in middle school (we called it “junior high school” in those days). I first wrote useful programs in it when I was in engineering school in the mid 80’s. Also used it on some defense projects at my first engineering job, in the late 80’s. Yes, I’m getting old.

  18. I learned FORTRAN IV at school in about 1972. We had a trainee maths teacher when I started A levels and he did a lunchtime programming course for those interested. We sent coding forms to the local Polytechnic at Plymouth where data entry staff punched cards for us. We got output listings back with a stack of cards in a couple of days, then we hand-punched a few cards to edit the code for the next run.

    Happy days! :)

    1. I should have said the computer we used then was an IBM 1130 with 16k words of (I think) magnetic core memory.
      I still have the punch cards and have thought of making a card reader to resurrect my old code.

      Thanks for the article and the memories.

  19. In the late-90s I had a boss who only knew one programming language: Fortran. I was trying to explain how webserver cgi-bin programs worked and he just wasn’t getting it. So I coded up a Fortran cgi-bin program to serve dynamic web content as an example. Always wondered if if we had the sole computer in the world serving up webpages via Fortran. If I recall the tricky part was getting the html POST data from environment variables (I think I had to cheat and call to some C code to get that to work)

  20. Hey

    I use to run topology optimization programs (youtube it to see what it is, or go to sawapan.eu/topostruct to run a simple program).
    Most of the most efficient ones are based on a software called Nastran, originally developped by NASA in FORTRAN ^^
    But I didn’t now all of this about FORTRAN ^^

  21. I learned MS FORTRAN77, BASIC & Pascal in the mid 80’s in college. And promptly used none of them. Missed out on a chance to learn TAL, but ended up doing more editing JCL than anything else. These days, I no longer babysit datacenters & jobstreams, but play analyst chasing oddball network traffic (miss my snort install) & try to avoid learning Oracle.

    1. Nope, never had the honor. Did have to rescue a long-haired female programmer from the clutches of a printer. Her hair got caught on a wire brush that de-staticed the output paper. Fortunately it was a simple friction feed so once she got caught it stopped turning.

    2. One of our rites of passage (other than the aforementioned dropping of the 360’s IPL deck :) ) was changing a print train on an IBM 1403 while wearing a white shirt, and going home to find ink stains and inky fingerprints all over it. That ink got EVERYWHERE inside those printers.

  22. Wow, a blast form the past…. I learned FORTRAN on a CDC6500, circa 1975 @ Michigan State University….on punch cards. You don’t realize how far things have progressed till you look back that far.

  23. I taught myself Fortran 77 while studying electrical engineering in the 1980s. No formal programming class, just a need to use Fortran in practically every engineering class! This was my first introduction to VAX VMS also.

  24. A lot of researchers seem to like FORTRAN for its ability to run on multiple processes, which the language seems to have really embraced over the years. LINPACK/LAPACK and other benchmarks for supercomputers are written in FORTRAN.

  25. I took Fortran classes at Florida State back in 1976-1980. After graduation and going into the Defense Field, I had to write code in Fortran for just about every simulation we did, from explosive design to end game analysis! I sure as heck miss it! Its now C++ and Python but not as efficient as Fortran.

  26. FORTRAN II in high school in the 60’s, using an IBM 026 keypunch, no backspacing. in the 70’s WATFOR/WATFIV in college, later in grad school we had an IBM 029 which didn’t punch until return was typed at the end of the line. We turned over the green bar paper to use the white side to print ASCII pictures using the printer that was attached to an IBM 370/168. Somewhere I still have a 800 bpi 9 track tape with a picture of the college homecoming queen on it. Later I tracked all of the swine flu immunizations given in Missouri on an IBM 360/50 using FORTRAN. In the 80’s moved into industry and wrote a FORTRAN program to convert EBCDIC IBM Displaywrite 3 documents to ASCII and print on a Xerox Laser.

  27. Well, Rud, you finally reeled me in!

    So when are you going to write up RATFOR, from the original 1976 edition of Software Tools? (For those too young to remember, it’s effectively an interpreter for C, implemented in Fortran.)

    And where in the timeline does G-E’s FORTY (Fortran-Y) fit?

      1. RATFOR is particularly interesting; Plauger and Kernighan chose to implement it in Fortran because that was the one language they felt would be available on almost any platform. And the utilities they they wrote in RATFOR will be familiar to any Linux or BSD user today!

  28. Loving this discussion. I supported Fortran IV on 6600s S/N’s 6 and 43, and then onto an 7600 thence on an early Cray. This was during co-op student days at a military weapons lab. I did have that black fortran book (printed on rather pulpy paper IIRC) and had to use cards punched on a 026 and 029 keypunch machines.

    Odd to look at that snipped of Fortran code and be able to parse 95% of it having not used it in 35 yrs. I never dropped a deck, though I sure drew a felt tip line diagonally across the deck to aid in reassembly if I did. Control Data machines had a neat “Update” system by which edits to code could be done in an ad-hoc version without having to reload the whole source decks (which would be many many MANY cases of cards in the weapons simulations code I worked on).

    Fun times. I’m in the process of learning to tweak an Arduino.

  29. Not sure why Fortran wouldn’t be used on Arduinos – or Atmel microcontrollers at any rate. The GNU compiler has a front end for Fortran, and it has a back end for Atmel, so there’s not a lot of work that would need to be done, if I understand it correctly. Seems like Fortran would be a great match for microcontrollers with limited program memory, since it was written in a day when memory was a lot more expensive than it was by the time C made its debut.

  30. I took my first Fortran class in 1969 using a WATFOR compiler, an IBM 360 main frame computer, and that same Fortran IV text. The compiler was a stand alone piece of hardware, not software running on the mainframe. The 360 occupied several thousand square feet of floor space and had a whooping 4k of memory, all of it individual,hand wired transistors. 2k of that memory was allocated for student use. We learned to write very short programs. I landed a number of jobs over the years because I listed Fortran on my resume. Mostly it was moving old legacy code onto PCs. A lot of it I never quit understood what it was doing but I was assured that it was working properly before I moved on to the next piece of code. Fortran, or any language with a GO TO statement, is horrible for self documentation.

  31. Fortran is still actual in geophysical research. For example, it is used for ionosphere and atmosphere models such as IRI and NRLMSISE. But I think progress of these models could be better if they were in any modern programming language (C/C++ or Java). Unfortunately there are no good Fortran translators and enthusiasts can only rewrite code manually (there are very poor MATLAB and C ports).

  32. Fun article to read. I didn’t think ‘0’ (in column 6) meant a continued line in FORTRAN IV — because I’m pretty sure that, as of FORTRAN 77 (when I started paying very close attention to standards), either a ‘0’ or a space in column 6 meant the first (maybe only) line of a new statement, and other characters (‘1’, ‘2’, ‘3’, …, or maybe ‘&’, ‘+’, ‘$’, which were also popular choices) meant a continuation of a preceding line.

    1. lol

      A friend of mine asked me if I ‘knew anyone’ who could program in COBOL. I guessed that the ‘knew anyone’ was a loosely coded invitation for me to do the required COBOL programming.

      What they had was a coders nightmare. The original COBOL application ran on plain old DOS. So when they upgraded to a GUI (probably Win 3.1), they then stuck the application in a DOS shell (box) and wrote a GUI front end that used a literal serial port for the GUI to communicate with the application in the DOS shell.

      That worked fine until Windows no longer supported literal serial ports in dos box. I think Win98 (or ME) was the last that allowed direct access via Port / IRQ’s.

      So then they suck the application in a Virtual Machine running on the same box (PC/Server) along with a protocol interface to convert the serial port to a TCP/IP link and added a virtual TCP/IP link to the front end so the GUI could talk to the application in the virtual machine.

      Now they wanted the application re-written for a modern server.

      To cut a long story short, I said “Try the gave yard”.

      Not touchin that lol.

  33. I appreciate your nostalgic feelings, but I’d leave writing about fortran to people who programmed in it at least in the past decade. ;)

    >Even the open-source community recognizes this
    I’d like to remind you that MS kept refusing to update the C compiler to support post-89 standards and suggested that people write code that is “both valid C and C++”. Or introduced and quickly dropped J#. Or that people had to make an open source reimplementation of Clipper to run their old programs. Or that FreePascal is the only compiler that still can compile pre-Delphi Pascal. Or that all but few proprietary Lisp compiler vendors are long out of business, but open source CommonLisp translators are still alive. Or… ;)

    >GNU compiler suite, usually known for C and C++
    Most (possibly all) widely used modern fortran compilers (Sun Studio, Intel, PathScale…) are modular and usually known for C and C++.

    >Still, Fortran today is relying more and more on libraries written in C/C++
    Mixed fortran and C code existed for a long time, modular compilers facilitate it. Try building say Octave or another popular numerical analysis tool from source: it’s often a C/C++ wrapping around load of fortran and C libraries.

    >so much so that the specifications include compatibility guidelines for using those languages
    So much that any practical language has a FFI specification these days.

    >but you may be able to install in on a Raspberry Pi
    On raspbian, “aptitude install gfortran”.

  34. I taught myself Fortran because I needed to use Fortran subroutines to create graphics for my Masters thesis. I think I simply used DEC and IBM manuals I tested the code on a DEC PDP-6/10 where I monitored particle physics data analysis every night, and punched it onto cards to run with my PL/1 analysis code on an IBM 360. I ended up writing lots of mapping code which reappeared in my later Fortran projects over several decades. I had learned PL/I years earlier in high school and learned how to write a compiler for it in 6.251 at MIT as a freshman. I liked it lots better, but Fortran won, and I am still using Fortran, plus C, Perl, and various shell languages.

  35. Took my first programming class in 1966 at Michigan State University, Introduction to Fortran Programming. OMG! 51 years ago! Within a few days I discovered where my interests and future was, so I quickly changed my major from Liberal Arts to Computer Science in the College of Engineering. In 1970 I graduated with my B.S. and programmed in FTN throughout my 45 yr career. Business applications, would you believe? Survey database creation and information retrieval for cross-tabulations in GM’s market research area. Fantastic language! Now I am going to make a cluster of Raspberry Pies and will be using Fortran to experiment with multi-processing, parallel processing, etc.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s