Pascal for fortran programmers

Pascal for fortran programmers

BOOK REVIEWS Pascal for Fortran Programmers Edited by R. Weiss and C. Seiter. Publisher: Addison Wesley Publishing Company In recent years Pascal has ...

83KB Sizes 2 Downloads 149 Views

BOOK REVIEWS Pascal for Fortran Programmers Edited by R. Weiss and C. Seiter. Publisher: Addison Wesley Publishing Company In recent years Pascal has become a very popular programming language for all sizes of computer. This is witnessed by the large number of books on the subject of learning to program in Pascal. Despite this, Fortran remains in extremely widespread use (though not to quite the same extent on microcomputers), and is a frequent 'first' language. As a result, there is a great need for books to teach Pascal to Fortran programmers. Most books concentrate on teaching the new language from scratch, however 'Pascal for Fortran Programmers' attempts to draw on the skills and knowledge which the reader has already developed. The analogy which the authors choose is that of a traveller abroad using a phrase book to translate his sentences. The analogy is in fact very good, for negative reasons as well. Just as students of a foreign language are taught that literal translation is doomed to failure, and that they must learn to think directly in the new language, so too with conversion from Fortran to Pascal. Having said that however, there must be a starting point for this relearning exercise, and a simple one-to-one conversion is a useful first step. On reading the preface, the reader learns that the book is divided into five sections. This division is a good one, and it is a shame that the next page, the contents page, reveals that it has been left to the reader to work out which of the nine chapters and two appendices actually belong to each of the five logical sections. The first section consists of one chapter, and is entitled 'Pascal in One Evening'. This is designed to enable the reader to start experimenting immediately, albeit just with toy programs. As an overview of the language, this chapter is very good. It does mention some things which on the one hand might have been less confusing left unsaid, but on the other, serve to whet the appetite for the contents of the succeeding chapters. The second section summarises some characteristices of compilers and interpreters, and their influences on Pascal and its dialects. The third section is the largest, and describes each of the main features of Pascal in turn. Like the rest of the book, this section is fairly informal and light-hearted. There are plenty of examples, both in Pascal and in Fortran, which are well chosen for simplicity, clarity and entertainment. In some places though, the light-heartedness is taken to rather unusual extremes: the authors actually tell untruths, only to admit in the next sentence that it was only a joke. The fourth section describes the issues involved in serious program writing. This includes a comparison between the styles of top-down and bottom-up design (though the example of the latter was a little confusing). The section also includes two slightly larger examples of program. In many ways, their self-referential nature (one program manipulates Pascal programs, and the other manipulates arithmetic expressions) might make them confusing as examples. The first one was designed to illustrate how novices might program in Pascal using a Fortran style; although the justification is given inthe test, the value of such an exercise might be questionable. The final section, in the appendices, is entitled 'A Fortran-to-Pascal'. This therefore re-asserts the emphasis on literal translation between the two languages. Such a technique really must be restricted to starting the reader off in Pascal, and at s the book is probably fairly expensive for such a limited life. The book was enjoyable to read though, and it proved to be a quite an informative tutorial. It could certainly be recommended for the library if only for its different view of how to learn to program in Pascal. M.J. SHUTE 57