80-Bus News

  

April–June 1982 · Volume 1 · Issue 2

Page 42 of 55

Book Reviews

by Rory O’Farrell

Writing Interactive Compilers and Interpreters, by P. J. Brown
publ. John Wiley

All fans of Professor P.J. Brown will be happy to know that the latest edition of his most readable guide to the complexities of compiler design and construction is now available in a paperback edition, at a most reasonable price reduction on the hardcover edition.

Pascal from BASIC, by P.J.Brown,
publ. Addison Wesley 1982 (cost approx £5 in paperback)

This book has recently appeared on the bookstands. This author’s work will need no recommendation to those who have read his previous work, mentioned above. This new book is a detailed and extensive guide to the problems of converting from BASIC to Pascal – which is a problem that will confront more and more microcomputer users as time goes by. In this book, in his usual humorous way, Professor Brown discusses very fully the different approach needed to write successful Pascal programs from that used for BASIC. He is alive to the advantages of Pascal, but does not hesitate to deal with its disadvantages as well (Gasps of horror.. surely Pascal can’t have any? Well, Heloise, you are a big girl now, and there are things you should know. Of course these are only talked about in the proper place (not in front of BASIC programmers)). In dealing with the language, he deals with the ‘standard’ Jensen and Wirth Pascal, which is substantially that proposed for the ISO standard. In restricting his discussion to this definition of the language, he is able to avoid heavily system dependant and non-standard extensions, referring you for these to the detailed manual which has been supplied with your particular implementation (we hope). The book is illustrated with comparative examples of Pascal and BASIC programs, with humorous cartoons as chapter headings. The book is well printed and typeset, with only three misprints coming to my notice. These were on page 81, line 7 of text, which should read

ecount['p',true] {p' omitted}

and line 35 of text, which should read

for row:='a' to 'z' do {z' omitted}

and page 134, last line, which should read

score:1..50;{a dartboard etc} {. omitted}

In the course of the book, he makes helpful hints to the would-be Pascal programmer, with sound advice on how to approach the problems of writing a program, and useful little points of style to help overcome some of the infuriating syntax errors of Pascal. For example, did you know that you don’t preceed an ELSE with a ‘;’ in an IF THEN ELSE construction? I know that it is in the syntax diagrams, but I hadn’t realised that it could be as formally stated as that!

Without any reservation, I wholeheartedly recommend this book to the would be user of Pascal, more particularly if he is trying to convert from BASIC. Because of the language similarities, it will not be irrelevant to those of us who learned to program in Fortran II (They are now at Fortran 77 or 80, so you can figure out how long ago that was!). I think that in writing this book, which is light and easy to digest, but not trivial, Prof. Brown has done a service to the microcomputer fraternity, having written a very valuable contender for the title of ‘Computer Book of the Year’. He might even end up being mentioned in our prayers, along with Niklaus Wirth!

Page 42 of 55