bcphyagi@Twg-S5.uucp (Stephen Walton) (10/24/90)
I recently bought a copy of the book "Fortran Tools for VAX/VMS and MS-DOS" by R.K. Jones and T. Crabtree, and thought there might be some interest in my reaction. The book, as has been previously posted, is intended as a successor to the Kernighan and Plauger "Software Tools" book of 1976. It has Fortran source code to, among other tools, a preprocessor to turn VAX/VMS extensions into standard Fortran-77 (v77), a lexical analyzer (lex), and a compiler for a simple programming language (spl). My overall reaction to the book is very favorable. I like the authors' writing and programming styles, probably because they are similar to my own. The programs are well-written, modular, and available from the authors on 6250-bpi mag tape or TK-50 cartridge at $99, or on MS-DOS floppies at $49. However (always a however), I cannot recommend the book unreservedly, particularly if you are not programming under either MS-DOS or VAX/VMS. The first couple of chapters are devoted to setting up VMS DCL command files and some utilities to yield a Unix-ish programming environment. (An appendix contains MS-DOS batch files giving a similar setup.) The chosen environment is a bit, well, odd...a Fortran file is compiled and put in a library, including main programs. To build an executable, the desired main program is extracted such as: $ link /exe=v77.exe chap1.lib /lib /incl=v77 The resulting environment, while usable, is much less flexible than that which comes from using a good Make program. The authors also choose to use a null-terminated format for character strings, resulting in constructs like if (equal(str1, 'integer function'//NULLCHAR)) rather than the more standard if (str1 .eq. 'integer function') I doubt that the first form is portable to a non-ASCII machine. The authors state (pp. 75-76), "The use of a termination character eliminates the need for blank padding strings but also demands that a special string comparison routine be used to compare strings." The authors are aware that string comparisons ignore trailing blanks, but seem unaware that string assignments do blank padding by default, so that CHARACTER*8 STR1 STR1 = 'abc' results in STR1 containing 'abc ' regardless of its previous contents. Incidentally, the authors recommendations for Fortran reference texts are "Fortran 77 featuring Structured Programming," by Meissner and Organick; "Fortran 77: A Structured, Disciplined Style," by Davis and Hoffman; and "Principles of Fortran Programming," by Wagener. I have the Meissner and Organick book, and also recommend it. Summary: the book is probably a "Must-read" if you're using either MS-DOS or VAX/VMS. It is probably even helpful on other systems if you want to be able to do text-handling chores without needing to learn C or Pascal. But the tools therein do, to some extent, duplicate tools which come with Unix systems. -- Stephen R. Walton, Dept. of Physics and Astronomy, Cal State Northridge I am srw@csun.edu no matter WHAT the stupid From: line says!