[Home Page] - [Reviews Main] | |
| Using the Macintosh Toolbox with C by unknown |
| ISBN: ?? Publisher: unknown Pages: ??pp Price: £?? |
| Categories: macintosh beginner's c |
| Reviewed by Steven Palmer in C Vu 3-5 (Jul 1991) |
Using the Macintosh Toolbox with C claims to be the latter, but is more of an introduction to writing C programs for the Macintosh than a reference of the Toolbox. A list of Toolbox functions are given inside the front and back of the covers, but this is incomplete and omits many functions relating to the operating system and the palette. The overall impression I get from this book is that it is intended to be used in the early months of learning to write C programs for the Macintosh. Having achieved this initial hurdle, the next step is to move up to a more comprehensive work, such as the Inside Macintosh volumes.
Having said that, it does actually achieve its goal of introducing the Macintosh Toolbox. In fact, it is probably the clearest exposition of the Macintosh operating system that I have seen to date. The program listing layout may not be to everybody's liking. The authors have adopted the convention of showing the Toolbox function names in a lighter typeface than the rest of the program - I would have preferred it the other way round.
The Macintosh was originally intended to be programmed in Pascal - the Toolbox assumes Apple Pascal with it's idiosyncratic string convention of putting the string length as the first byte of the string and omitting any NULL delimiter. The convention used by C compilers to get round this are varied, but the majority settle for a simple '\p' at the start of the string. Remembering to include this in all strings passed to the Toolbox is another responsibility for the Macintosh C programmer. The book frequently reminds you of this.
It also contains an intelligent discussion of Macintosh memory management and all the hassle that goes with it. Remember that the Macintosh, unlike MS-DOS, uses relocatable memory blocks. The authors remind us that the usual malloc() and free() functions are a hindrance when used on the Macintosh, and that the proper system calls should be used instead. This also applies to Microsoft Windows, by the way.
At the end, there is a complete program listing. I wouldn't care to type all that in, and I suspect that most readers won't either. The authors do not include a separate disk of program listings as is the practice of publishers such as Microsoft Press. This is a pity since most of the sample programs make useful starting points for building complete applications.
Throughout the text, the authors use the wonderful Think-C compiler. Having used the compiler myself, I would admit that this was a wise choice. For PC users, the closest comparison is learning C using the Microsoft Quick C or Turbo C integrated environments.
The book does not introduce or explain the C language; it assumes that you are an experienced C programmer. It also assumes familiarity with the Macintosh itself. Therefore it serves as an excellent introduction to Macintosh programming for C programmers migrating from the IBM. But be prepared to have to shell out for a proper reference book.
To link to this review, please use the URL: http://www.accu.org/bookreviews/public/reviews/u/u001315.htm
Copyright © The Association of C & C++ Users 1998-2000. All rights reserved.