Skip to content
Prev 42620 / 398525 Next

r: fortran help

At 05:16 AM 1/9/2004, allan clark wrote:

            
Interesting question.  The name "Fortran" is generally used for the current 
version of the language (Fortran 95), while FORTRAN often means the 
previous version (FORTRAN 77). Despite many advances in Fortran 95 
(whole-array operations, better modularization, many safety features, and 
others), both versions are widely used, probably because a free compiler is 
available for FORTRAN 77 but not yet for Fortran 95.  So the answer to your 
question depends on which language you want to learn.

(By the way, it's not clear to me if routines compiled with a suitable 
modern Fortran (95) compiler can be linked into R. I would love to have 
enough time to find out, but programming is a small part of my job these days.)

Modern Fortran is an excellent scientific programming language.  A very 
good, concise book is Metcalf and Reid, "Fortran 90/95 Explained," 
published by Oxford University Press.

The best book I ever came across for FORTRAN 77 was by someone named 
Calderbank.  It was thin, readable, and complete. However, I've got rid of 
it (since I now use modern Fortran), and it's out of print.

As Tobias Verbeke suggests, there's quite a lot of material on both 
languages on the Web.

A couple of more FYI's:

Fortran 95 is a proper superset of FORTRAN 77.  Therefore, any 
standard-conforming FORTRAN 77 code can be compiled on any Fortran 95 
compiler.  Because FORTRAN 77 was limited in many ways, much code was 
written with vendor extensions.  Many were incorporated into Fortran 95, 
and the most common others are generally available in current Fortran 95 
compilers.

The next version of Fortran, which I believe will be called Fortran 2004, 
is expected soon. My understanding is that it includes (among other things) 
more features for object orientation and features for better (and more 
portable) interoperability with C.

I hope that helps.

Mike