Utility programs and style notes

Peter P. Silvester, Ronald L. Ferrari · 1996

Introduction This Appendix lists several generally useful subprograms for matrix manipulation. It also clarifies some points of programming style as followed throughout this book. Most of the subprograms have no particularly close association with the material of any one chapter, but they are called upon to perform necessary services by programs listed in the several chapters. It therefore seems appropriate to group them in a single listing. Input-data arrangements Nearly all the programs in this book accept input data in roughly similar formats. Typically, a list of nodes is followed by a list of elements, which is in turn followed by a list of constraints. The lists are separated by lines blank except for a slant character / in the leading character position. This technique is based on the special meaning Fortran 77 assigns to the / character in list-directed input-output. It leads to program constructs a little different from C, Pascal, or many other languages, and therefore merits a brief discussion. List-directed input–output is free-format. Numbers may be placed anywhere on the line, only their sequence need be correct. When input is requested, as many full lines are read in as is necessary to ensure that the input list has been fully satisfied , even if that means reading several lines. Since Fortran read statements always read full lines, a blank line will not be visible at all.

Read the paper · More papers on PaperTik