If you’re an experienced C programmer, you should be able to pick up Fortran pretty easily. The syntax is similar and nothing terribly cryptic.
Unfortunately, there isn’t a “Kernighan and Ritchie” like reference. But there are a lot of books out there. Fortran 77 was a popular standard for a number of years, but lacked a lot of the bells and whistles that were added.
The biggest differences off the top of my head(keeping in mind that it has been a while since I’ve worked with Fortran):
- strict column placement (no “as much whitespace as you want”): line numbers (if any) must be in columns 1 - 6 (I think), continuation ‘X’ in 7, and the statement starts in 8.
- No structures. Just arrays (multi-dimensional, but all same type)
- No pointers.
- Implied typing: variables starting with “i”, “k” are integers (fixed point math), variables starting with other letters are floating point.
- not a “structured” language - aka no brackets and the dreaded “goto” statement. You will learn (hopefully minimally painfully) why they abolished the “goto” statement in suceeding languages.
So the syntax and such will not be so different that you won’t be able to figure out what’s going on in a given statement. BUT Fortran lended itself to the infamous “spaghetti code” phenomenon. That is, being unstructured, it allowed programmers to write the most difficult to follow code possible. Most good programmers did things in reasonable manners, but inevitably you would come across code that jumped from hell and back (or sometimes not “back”). This is going to be the biggest challenge - figuring out what the code is doing. You thought reading someone else’s C code was tough ?
Somthing to keep in mind is that Fortran (“formula translation”) was originally created to implement mathematical calculations: step 1 -> step 2 -> step 3 -> etc… And for this, the code can be reasonable readable. When programs started to get more complicated and they needed to start writing more “control” functions/applications, that’s when things got ugly (spaghetti code).
Good luck. If you get stumped on something, you could e-mail me the code and I can maybe help (no promises).