Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Effective FORTRAN 77
Metcalf M., Oxford University Press, Inc., New York, NY, 1985. Type: Book (9789780198537090)
Date Reviewed: Mar 1 1986

Despite the floccinaucinihilipilification (the act or habit of estimating as worthless) by many people, the oldest surviving programming language FORTRAN still thrives. When the language first appeared in 1957, it was a revolution when only assembly languages were available. It was first standardized in 1966, a revised standard appeared in 1978, and much work has been done on a new standard to appear late in this decade.

Why does FORTRAN survive? Here are a number of reasons:

  • (1) FORTRAN is the only language available on almost all mainframe computers and minicomputers. Indeed, some significant machines, including so-called supercomputers, are virtually FORTRAN engines and have no other compilers.

  • (2) FORTRAN remains accessible and understandable to the average scientist and engineer. It is still the best language for many applications in the scientific, numeric, and engineering fields.

  • (3) Good FORTRAN compilers can make more efficient use of machine resources than can other languages. This is still often important.

  • (4) FORTRAN has allowed the use and development of subroutine libraries and packages. The concept of libraries of routines which can be called from an application program, without recompilation, was fundamental to the success of the original FORTRAN and was ignored by many subsequent languages, thus making them impracticable for large problems. ADA has refined the library concept into packages, and the next FORTRAN proposals include some of the package concepts from ADA.

  • (5) There is the inertia of millions of lines of FORTRAN in use. This is likely to remain so for the foreseeable future.

Effective FORTRAN 77 has a dual aim. It is designed to (1) introduce the current standard FORTRAN 77 to those who have experience in other languages, such as BASIC, PASCAL, or even FORTRAN 66; and (2) improve the skills of practicing FORTRAN programmers. The author succeeds admirably in these aims.

Chapter 1 provides a brief introduction to computer hardware and software, defining many terms used later, and a short history of FORTRAN. The hardware introduction provides the important basis for a conceptual model of a FORTRAN machine. I have found from years of helping users with FORTRAN that those users without a basic understanding of computer architecture and concepts such as addressing most often go astray in understanding concepts like parameter passing (especially of arrays).

Chapters 2 through 7 provide, in 135 (small) pages, an essentially complete exposition of FORTRAN 77, starting from the simpler concepts, and finishing with perhaps the most difficult, INPUT-OUTPUT. Without actually checking the standard line by line, I could not find any major omissions here. Some minor topics, such as side-effects of function calls, and illegal argument association, are covered in Chapter 8 on Portability. Very little information, if any, is missed. The style is very good. Both formal definitions and simple examples are given for most concepts. Each chapter in this section ends with a summary, which gives an overview of the concepts introduced and their usefulness, and a set of exercises which would be of use to both instructors and independent readers. The author also combines his exposition with guidance as to the use of the features introduced. Thus, for example, in the chapter on Control Statements, he explains why the GOTO statement must be used sparingly, and why the logical IF is usually to be preferred to the arithmetic IF.

I found two errors in these chapters: (1) The description of the exponent field for E edit descriptor output is wrong; and (2) the explanation of the results of an example of list-directed input, when the input contains a slash, is incorrect.

Chapter 8 deals with portability issues: with problems caused by compiler extensions; with problems caused by the incomplete nature of the standard; and with problems caused by differences in the underlying machines. There is little new here, but how frequently the advice is ignored]

Chapter 9 deals with FORTRAN style. There is a lot of sensible advice here. I do not agree with some of the suggestions, such as the preferred place for FORMAT statements, but the important point is that the code should be readable and its intent as clear as possible. Some features of FORTRAN 77 which will be deprecated in FORTRAN 8X are mentioned.

The subject of the design of FORTRAN programs is treated in Chapter 10. This chapter has subsections on Software Engineering, Program Design, and Good Programming Practice. The author comes back to the topic of style again, but at a higher level than mere statement level. Data structuring (yes, in FORTRAN]), modular structure, declarations, the use of program libraries, disciplined control structures, and the handling of input and output are all considered.

The vexing question of efficiency arises in Chapter 11. The author deals effectively with both the school of thought which ignores the need for program efficiency and the opposite school which optimizes too soon. He lays down the accepted steps to writing an efficient program, starting with algorithm selection and working down to the level of writing code to help optimizing compilers. Some of the advice is perhaps too specific, being relevant only to certain machines. In my limited experience at looking at code generated by compilers, there seems to be no end to the tricks used. For example, on one machine I have used recently, constants like 2.0 are not stored in memory, but are generated by enter, shift, and pack instructions, to avoid slow references to memory. Advice for one machine can be quite wrong for another at this low level.

The last chapter deals with testing and documentation. Some simple advice, which is often ignored, is given here. Many programmers ignore the useful information which a cross-reference map can give. Many programmers do not read their code and do an imaginary execution of it. I am sure that many interactive systems and editors do not encourage programmers to do this sort of checking, which is usually easier with the old-fashioned line-printer listing.

The book concludes with an Appendix containing a list of intrinsic functions, an Appendix containing a list of the FORTRAN statements, and an Index. A nice feature is that terms appearing in the Index are given in italics in the main text.

The book has a few minor layout problems. I found confusing the use of subheading numbers which start again with each chapter. For example, the subsection labeled “5. Constants” in Chapter 2 is called “2.5 Constants” in the Contents. This subsection refers to “Section 7.2” which is in fact Chapter 7, Section 2, not subsection 7.2 in Chapter 2. Chapter numbers in heading would help too.

I can thoroughly recommend this book to FORTRAN programmers, both new and old. For the new, it provide a good, concise introduction, plus good guidance. For the old, it provides some reminders of techniques which may have been forgotten, as well as some new tricks. The author’s experience in practical scientific computing shows through, and he is able to bring both new and old light to the use of a language of great importance, still widely used, but often maligned.

Reviewer:  R. C. Bell Review #: CR109883
Bookmark and Share
 
Fortran 77 (D.3.2 ... )
 
 
Mathematical Software (G.4 )
 
Would you recommend this review?
yes
no
Other reviews under "Fortran 77": Date
Interactive FORTRAN 77: a hands-on approach
Chivers I., Clark M., John Wiley & Sons, Inc., New York, NY, 1984. Type: Book (9789780470201015)
Jun 1 1985
Engineering applications software development using Fortran 77
Moses G., John Wiley & Sons, Inc., New York, NY, 1988. Type: Book (9789780471638513)
Jan 1 1990
Structured FORTRAN 77 for engineers and scientists (4th ed.)
Etter D., Benjamin-Cummings Publ. Co., Inc., Redwood City, CA, 1993. Type: Book (9780805317756)
Apr 1 1994
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy