PDA

View Full Version : Book on Fortran



Normandy6644
2005-Aug-02, 09:47 PM
Does anyone know a good book to start learning Fortan 77 and then 90/95? I'm going to be doing some research in the fall and most of the code is in Fortran, as I'm told. I have little experience with it, so any help would be appreciated. Also, since Fortran 90/95 have replaced 77 essentially, it is necessary to learn 77 first or will I be able to understand it even if I only read a book about 90 or 95?

Taks
2005-Aug-02, 09:49 PM
though i did not do any specific research, i'd suggest Fatbrain.com. that's where i buy all my books, even for school work.

taks

peter eldergill
2005-Aug-03, 04:29 AM
Wow

Didn't know that language even existed anymore...my Mom used to program in Fortran...she's long retired.

Do companies still use it (obvious answer yes, else you wouldn't be asking said question 8) )

L8R

Pete

Taks
2005-Aug-03, 04:34 AM
my guess would be the guy is researching an old code base that was originally done in fortran. some archaic languages are still around, but nearly all new standard developments are in C or C++. embedded developers will often pull out assembly language constructs for direct manipulation of various registers, IO, etc. but those don't really count as a structured language, just the base code each machine runs on. i think ADA is big, as is LISP in various crowds. i actually studied FORTH once, as well as FORTRAN (no longer taught in many schools).

taks

Enzp
2005-Aug-03, 04:40 AM
Wow, I learned Fortran 40 years ago. I too am surprised it is still around. of course I still have my slide rules.

Taks
2005-Aug-03, 04:46 AM
fortran is still a good scientific programming method. simpler than C as i recall (been almost 20 years for me). there were quirks with memory management i think...

taks

Van Rijn
2005-Aug-03, 05:32 AM
Makes me feel old too. I learned Fortran IV back in college. They had a computer that was old then and we used punch cards with it. I absolutely hated the keypunch machine - I had learned how to touch type and the keypunch machine just wasn't the same, so my fingers were constantly "confused." I knew they were going to retire the old computer in the next year, so I took other classes for a semester rather than take other classes where I would have needed to use the keypunch.

Anyway, I did learn Fortran 77 later - it felt very much like BASIC with just a bit different syntax. Much nicer than Fortran IV. I didn't even know there was a Fortran 90, but it looks like it is OOP enabled.

Oh, somewhere I have an early '60s Analog SF magazine with a full page ad for the new super language called "Fortran II"! Fortran IV was so primitive I hate to think what Fortran II must have been like.

Van Rijn
2005-Aug-03, 05:42 AM
i think ADA is big, as is LISP in various crowds. i actually studied FORTH once, as well as FORTRAN (no longer taught in many schools).

taks

I still have a first edition of Brodie's "Starting FORTH" that I bought at a very early West Coast Computer Faire. Very amusing book. If nothing else, FORTH is a great way to get used to stacks and learning to think like a compiler. I was very enthusiastic about FORTH for a year or two.

Grey
2005-Aug-03, 05:50 AM
Does anyone know a good book to start learning Fortan 77 and then 90/95?
Hmm, I might have an old text that I learned this language from in my archives, but since it's inscribed on cuneiform tablets, it would be hard to send to you.

:D

Enzp
2005-Aug-03, 06:27 AM
I still have a couple punch card decks in my attic. DOn't know what they do now. I spent hours bent over a punch card machine. (IBM 052?) I recall using the card sorter a lot too for whatever in the world data I had.

I recall the big deal when the university got its shiny new IBM 360.

The punchcard machines - and for that matter all the peripherals - had these pull out panels behind a hatch that had a mess of little jumper wires, and they served to program the operation of the peripheral. Each was a rectangular affair and various color wires plugged into a grid of holes to connect various things. We made several interesting cribbage boards from them. I still have a couple of them.

Robert Andersson
2005-Aug-03, 09:29 AM
See the Fortran faq:
http://www.faqs.org/faqs/fortran-faq/

You'll find a list of recommended books and other resources.

Eta C
2005-Aug-03, 01:08 PM
FORTRAN, in all of its permutations, was the primary scientific and engineering language from the 60's through the 90's. After that C++ began to take over, largely due to its better data structures. There's still a lot of workable legacy code out there, and rather than re-invent the wheel it makes some sense to continue using it for a while.

For all of its card-punch origins, FORTRAN did prove to be remarkably flexible and adaptable through its versions; so much so that one quote I remember went something like "I don't know what the programming language of the 21st century will look like, but we'll probably call it FORTRAN."

One reference I've used in the past is Metcalf & Reid's FORTRAN 90/95 Explained from the Oxford University Press.

Finally, remember, REAL programmers write FORTRAN, and aren't scared of unconditional GOTO's. :D

Argos
2005-Aug-03, 01:11 PM
This site features some resources: http://www.fortran.com/ and this is a Fortran FAQ site: http://www.faqs.org/faqs/fortran-faq/

Robert Andersson
2005-Aug-03, 02:52 PM
Oops, it seems I forgot to add another link:
User Notes on Fortran Programming(UNFP) (http://www.ibiblio.org/pub/languages/fortran/unfp.html)

I would like to recommend not to devote your life to Fortran coding. It might be good to be able to read, modify and extend existing code (which of course will require some toying). As others have pointed out, there are many better (compact, readable, effiecient) languages, eg. Lisp, Python, C++, depending on the task at hand.

Normandy6644
2005-Aug-03, 02:59 PM
I'm guessing that since my professor has been doing this research for quite some time now, all the code was written in fortran back in the day and it's too much of a pain to rewrite it. I do like python a lot, so I'm doing that on the side, but since the stuff I'm going to be working with is in fortran I need to learn that first. :)

jfribrg
2005-Aug-03, 03:12 PM
I have not used Fortran since college, and that was long long ago. My understanding is that it is used in engineering circles because the engineers learned it in college and then they went on to become engineering professors who then taught it to another generation of engineering students who themselves became engineering professors..... It won't be long before fortran programmers become a separate subspecies of the human race.

From a practical standpoint, many, many scientific software packages use fortran and rewriting them is a very expensive proposition. I am familiar with fortran 77, which is absolutely archaic compared with more modern languages. I assume that Fortran 90/95 is a big improvement, and I doubt that it is necessary to start with Fortran 77. Learn Fortran 95 first, then learn 77 if necessary.

sts60
2005-Aug-03, 04:50 PM
Fortran lives!

It's still used extensively in a lot of numerical simulations (impact, aerodynamics, other safety codes). In some cases, the packages are glued together with C/C++, Java, and the like.

NEOWatcher
2005-Aug-03, 05:19 PM
I'm guessing that since my professor has been doing this research for quite some time now, all the code was written in fortran back in the day and it's too much of a pain to rewrite it. I do like python a lot, so I'm doing that on the side, but since the stuff I'm going to be working with is in fortran I need to learn that first. :)

IMO, learn the version you will use. I have used various flavors of Fortrans, Basics, C's and Pascals, and going from one to the other is very simple syntactically. The issue arrives from the environment that the language is being run. For instance, VMS/Fortran77 is very similar to IBM's Fortran (not sure which version). The issue is compiling, what system resources are available, how things are addressed, byte ordering, and the list goes on.

Fortran was designed with computational speed in mind. Memory management was designed to be fairly static to improve speed, thus the native Fortran local variables were heaped instead of stacked, and allocated once, instead of each call. (thus non-recursive)
New flavors of Fortrans are not restricted in this way, and it's more of a slight syntax difference than anything else.

BTW, just to lead credence to my comments... I've been in the programming arena now since graduating with a math/computer degree over 20 years ago, and have used, Intel based, VMS based, Risc based, and Visual Based architectures, and even have some extensive work in Lisp.

jumbo
2005-Aug-03, 06:37 PM
Just to add another FORTRAN lives post....Its used in the UK in several astronomy departments. I know cardiff use or used it in stellar physics simulations and galaxy formation studies. I also recall explaining OOP to my tutor who had never heard of it. Its often taught because existing code is in fortran and a rewrite would be costly in time and money escepially when the code still clunks along.

NEOWatcher
2005-Aug-03, 06:50 PM
Just to add another FORTRAN lives post....Its used in the UK in several astronomy departments. I know cardiff use or used it in stellar physics simulations and galaxy formation studies. I also recall explaining OOP to my tutor who had never heard of it. Its often taught because existing code is in fortran and a rewrite would be costly in time and money escepially when the code still clunks along.
Tell me about it... Currently I'm writing communication bus between VAX/Cobal, VAX/Basic and C# XML Web services. Talk about bridging a generation gap...

2005-Aug-06, 12:12 AM
i think ADA is big, as is LISP in various crowds. i actually studied FORTH once, as well as FORTRAN (no longer taught in many schools).

taks

I still have a first edition of Brodie's "Starting FORTH" that I bought at a very early West Coast Computer Faire. Very amusing book. If nothing else, FORTH is a great way to get used to stacks and learning to think like a compiler. I was very enthusiastic about FORTH for a year or two.

Thinking Forth (also by Brodie) is still useful as an introduction to generalized programing methods.

2005-Aug-06, 12:18 AM
Just to add another FORTRAN lives post....Its used in the UK in several astronomy departments. I know cardiff use or used it in stellar physics simulations and galaxy formation studies. I also recall explaining OOP to my tutor who had never heard of it. Its often taught because existing code is in fortran and a rewrite would be costly in time and money escepially when the code still clunks along.

Yes, when I worked at JPL rewriting the code used for calculating meteoroid impact probabilities I expected to be working in C but METEM (METeoroid Engineering Model) is in FORTRAN 90/95 because many of the engineers were more familiar with that language.