# Turbo Pascal for the Mac: A Quick Path to Programming Power — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1)

## Transcribed source material

Machine transcriptions and image descriptions; uncertain copy may be marked [illegible]. Verify against the linked originals. Historical rights remain with the original owners.

These are transcribed excerpts, not the full publications. Open the originals for remaining pages.

### Image 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-51dc44c9d06d7a76b5bd839d81ce301be056734245183b47b4f4a2adcddec7fd)

TURBO PASCAL for the MAC

Transcribed text:

Brady

Paul Goodman & Alan Zeldin

TURBO PASCAL® for the MAC®

A Quick Path to Programming Power

Image description: A book cover with a blue background showing white serif title text and a painted green, teal, and dark navy abstract landscape band across the lower portion, framed on a gray backdrop with a Brady logo in the top-left corner.

Reading notes: The 'Brady' logo in the top-left corner is partially cropped at the edge of the image. Registered trademark symbols after PASCAL and MAC are small and rendered as ® characters.

Printed product names: Turbo Pascal for the Mac

Languages: English

[Original Image 1](https://www.vintageapple.net/files/adf4055ee6cca621f5bf2ba6475048478dff4af658e50c8d11376dd4a864a4c8/663c036eaaa2845bc61d04e6.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-6b57e7a181f8b262e2924d8de3012f0316beb69aa4f934ed3df4f888105368f3)

TURBO PASCAL for the MAC

Transcribed text:

Brady

Paul Goodman & Alan Zeldin

TURBO PASCAL®

for the MAC®

A Quick Path to Programming Power

Image description: A book cover with a blue background, white serif and sans-serif title text, and a painterly green, teal and dark blue abstract landscape band across the bottom, with a gray border and a black 'Brady' publisher logo in the top left corner.

Reading notes: The 'Brady' logo at top left is partially cut off at the edge of the scan. Registered trademark symbols after PASCAL and MAC are small and rendered as ® in the transcript.

Printed product names: Turbo Pascal for the Mac

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-7fd8c4aaccbf27e580c6f7c76b32f4f524aa19878e74337e2ad4d7bb62c1dac8)

Transcribed text:

®   ®
Turbo Pascal for the Mac
A Quick Path to Programming Power
Paul Goodman
Alan Zeldin
A Brady Book
New York, New York   10023
..s-

Reading notes: Transcript is intentionally empty because the exact extracted text is preserved separately. Fields were filled only from the supplied copy, so the visual description and layout are inferred from text alone. The ® symbols and the fragment '..s-' are uncertain and could not be confirmed visually. '10023' appears to be a ZIP code, not a printed date, and was not listed as a date. No prices or explicit publication year are present in the supplied copy.

Printed product names: Turbo Pascal for the Mac

Languages: English

[Original PDF page 2](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-46fab68697e9aa3cf519cb116ab57f578050867110238e4c5bf5e8ffbb002eca)

Transcribed text:

Copyright © 1988 by Paul Goodman and Alan Zeldin.
All rights reserved including the right of   repro-
duction in whole or in part in any form
BRADY
Simon   &   Schuster, Inc.
Gulf   +   Western Building
One Gulf   +   Western Plaza
New York, New   York   10023
DISTRIBUTED   BY   PRENTICE HALL TRADE
Manufactured in the   United   States of America
10987654321
Library of Congress Cataloging-in-Publication Data
Goodman, Paul, 1958-
Turbo Pascal for the MAC: a quick path to programming power
Paul Goodman, Alan Zeldin.
p.   cm.
"A   Brady   book."
Bibliography: p.
Includes index.
ISBN   0-13-933011-9
1. Macintosh (Computer)-Programming. 2. PASCAL (Computer program
language) 3. Turbo Pascal (Computer program) I. Zeldin, Alan, 1957-   .
II. Title.
QA76.8.M3G664   1987
005.265-dc19
-

Reading notes: Publisher imprint and address lines are partially fragmented in the source text, so reading order near the copyright block is uncertain.

Printed product names: Turbo Pascal · Macintosh

Printed dates: 1988 · 1958 · 1957 · 1987

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-f266843b926e63c2e42d578ba42f6da889b2f2b3216a2675b137ab27e82cf9ed)

Transcribed text:

CONTENTS
Preface   ix
Introduction   xi
1. Turbo Pascal for the Macintosh   1
Why Turbo Pascal?   1
Macintosh Overview   2
Why This Book?   4
Starting   Up   4
Running a Program   7
Editing a Program   10
Printing a Program   13
Printing the Active Window   13
The Macintosh Screen   14
Chapter Summary   15
2. Turbo Pascal Fundamentals   17
Introduction   17
A First Program   17
Syntax   18
More on Identifiers   20
Comments   21
Documenting a Program   21
Write and Writeln   23
Trial and Error-Semicolons   24
Data Types   26
Variables   28
Trial and Error-Improper Data   30
Run-Time Errors   30
iii

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-4b549c4035aa94658ad5aa721c4f85f77c1975226d794793281e374a13e70b5f)

TuRBo PASCAL FOR THE MAC

Transcribed text:

iv   TuRBo   PASCAL   FOR   THE   MAC
Assignment Statements   31
Expressions   32
Operations   34
Mixing Data Types   35
Operator Precedence   36
Constants   37
More on Write and Writeln   38
Read and Readln   40
Review of Program Structure   41
The Dirty Dozen-The Most Likely Syntax Errors   42
3. Pascal Structures   49
Introduction   49
Decision Making-If-Then   49
The Boolean Data Type   55
Loops-More Like an Airplane Than a Brick   58
Programming Example- Calculating Bank Interest   64
Quick to the Draw   68
Chapter Summary   77
4. Functions and More on Data Types   79
Introduction   79
The Char Type   79
The   ORD   and CHR Functions   80
The   SUCC   and PRED Functions   83
Other Built-in Functions   83
More on Reals and Integers   84
The Arithmetic Functions   90
The Trigonometric Functions   92
The Logarithmic Functions   92
Console Functions   93
Toolbox Functions   94
User-Defined Data Types   96
The Case Statement   98
Comparing Enumerated   Values   100
Subranges   100
User-Defined Functions   101
Drawing   Ovals   103
Programming Example-Kepler's Delight   105
-

Reading notes: Source is a table of contents excerpt; headline inferred from running header and product names limited to the title as printed.

Printed product names: TuRBo PASCAL FOR THE MAC

Languages: English

[Original PDF page 5](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-2a5bfdeb60b80a0d884273dd8d4b93839992e9a138c7ba81314de0b3af782472)

Transcribed text:

Chapter Summary   107
5. Procedures   109
Introduction   109
Sequence of Execution   110
Using   Procedures   111
Programming Example-Mortgage Calculator   123
6. Arrays and   Strings   129
Introduction   129
Arrays   129
Programming Example-The TicTacToe Program   143
Strings   148
The String Functions and Procedures   151
7. More on Structures   155
Introduction   155
The Repeat Loop   155
The Bubble   Sort   158
Records   159
Time and Date Operations   169
Sets   170
Recursion   175
8. A Formal Look at Graphics   181
Introduction   181
Points   181
Drawing Lines   182
The Pen   190
The Cursor   194
Building a SketchPad   194
Displaying Text   196
Calculations with Rectangles   199
SketchPad Revisited   199
Fun Time with QuickDraw-The PaddleBall Program   203
Chapter Summary   210
CONTENTS   V

Reading notes: Source is a table of contents with chapter and section titles; no advertised products, prices, or dates are present.

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-cf287eb4cb487f63209e4be4015d70f361ca6a666c7fb2b9b63b86011bbd2c71)

Transcribed text:

vi   TuRBO   PASCAL   FOR   THE   MAC
9. Files   211
Introduction   211
Files   211
Text Files   220
File Programming Techniques   224
A File Processing Application-The Checking and Savings
Program   227
Chapter Summary   249
10.   Variant Records, Pointers, and Handles   251
Introduction   251
Variant Records   251
Pointers   256
The Memory Manager   263
Why Bother, Who Cares?   272
11. Events and Event Handling   273
Introduction   273
Events   274
The Toolbox Managers   274
Event Types   277
Pull-Down Menus   291
Swapping Menu Bars   300
Displaying the Apple Menu   303
The SystemTask Procedure   306
Miscellaneous Menu Routines   308
12. A Complete Macintosh Application-The TurboDraw
Program   313
Introduction   313
Drawing Programs   314
TurboDraw   314
Connecting the Nodes with Edges   323
Printing Pictures   325
Loading and   Saving   the Data Structures   330
FileNames   332
-

Reading notes: Source is a table of contents rather than advertising copy; headline is not clearly identifiable.

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-555d59953dfbd72bbb6d26cb1fbf01434a45e15466a906f03eea608353b5de19)

Appendix A. Turbo Pascal Reserved Words

Transcribed text:

Appendix A.   Turbo Pascal Reserved Words   349
Appendix B.   Turbo Pascal Menu Summary   350
Appendix C.   Compiler Error Messages   358
Appendix D.   IOResult Codes   361
CONTENTS   vii
Appendix E.   Documenting a Program   363
Appendix F.   Differences Between Turbo Pascal and
Macintosh Pascal   370
Appendix G.   Turbo Pascal Syntax Diagrams   373
Appendix H.   Units   388
Appendix I.   Macintosh Character   Set   391
Bibliography   392
Index   394

Reading notes: Headline taken from first line of table of contents; primary heading unclear

Printed product names: Turbo Pascal · Macintosh Pascal

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-e1667f15ce6d82e14eecdffcc52dde4820e53c6a1a0d3f14f51a99c3184f1ada)

Transcribed text:

Other Brady Books by   Paul   Goodman and Alan Zeldin
The MacPascal Book,   1985
Other Brady Books by   Paul   Goodman
The Commodore 64 Guide to Data Files and Advanced Basic,   1984
TRADEMARK LIST
Macintosh is a trademark licensed to Apple Computer Inc.
Mac is a trademark of Apple Computer Inc.
LaserWriter is a trademark of Apple Computer Inc.
ImageWriter is a trademark of Apple Computer Inc.
Turbo   Pascal   is a trademark of Borland International
Macintosh   Pascal   is a trademark of Apple Computer Inc.
IBM   PC   is a trademark of International Business Machines   Corpo-
ration
MacWrite is a trademark of Apple Computer Inc.
MacPaint is a trademark of Apple Computer Inc.
MacDraw is a trademark of Apple Computer Inc.
Limits of Liability and Disclaimer of Warranty
The authors and publisher of this book have used their best efforts
in preparing this book and the programs contained in it. These efforts
include development, research, and testing of the theories and   pro-
grams to determine their effectiveness. The authors and publisher
make no warranty of any kind, expressed or implied, with regard to
these programs or the documentation contained in this book. The   au-
thors and publisher shall not be liable in any event for incidental or
consequential damages in connection with, or arising out of, the   fur-
nishing, performance, or use of these programs.

Reading notes: Line-break hyphenation in 'Corpo-ration' and 'fur-nishing' may split words across lines Extraneous spacing around some trademark names may reflect original typesetting

Printed product names: The MacPascal Book · The Commodore 64 Guide to Data Files and Advanced Basic · Macintosh · Mac · LaserWriter · ImageWriter · Turbo Pascal · Macintosh Pascal · IBM PC · MacWrite · MacPaint · MacDraw

Printed dates: 1985 · 1984

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-f2dec146ebee142d720de8abed93e9bc1e7fb76a541e44e88f8e60d70392f698)

Transcribed text:

PREFACE
On   a   cold   day in the winter of 1642, in the northwest corner of France,
a young man put the finishing touches on a strange device built from
gears, pegs, and dials.
On   a snowy day in 1971, in Zurich, Switzerland, a university prof es-
sor put the finishing touches on a paper for publication.
On   a sunny day in 1976, in a garage in northern California, two
young men wearing jeans put the finishing touches on a computer no
one   could   have predicted   would   cause a revolution.
History has ways of connecting events that take   place   hundreds of
years and thousands of   miles   apart. None of these men   could   have
realized   the importance of their work in the future, nor completely
understood their connection to the past.
On   a hot day in 1986, in Lexington,   Utah,   a team of computer   scien-
tists at Borland International linked the works of   Blaise   Pascal,   the
seventeenth-century mathematician, natural   philosopher,   and   inven-
tor of the first adding machine, to   Nikolas   Wirth, designer of the   Pas-
cal   computer   language,   and to   Steven   Jobs and   Steven   Wozniak,
founders of   Apple   Computer, and   completed   an extraordinary   com-
puter   language,   Turbo   Pascal   for the Macintosh.
That is the   legacy   of this book.   Turbo Pascal for the Mac   is intended
for both the novice who wants to   learn   how to program and the   expe-
rienced   Pascal   programmer who wants to use Turbo   Pascal.   A   high-
light   of the book is its discussion of how to use QuickDraw graphics to
produce animation and interesting graphics effects. Graphics are   inte-
grated into each chapter to demonstrate the topic and to provide some
entertainment. A separate graphics chapter includes a video game
program and ideas for others.
As a full implementation of   Pascal,   Turbo   Pascal   allows   a   program-
mer to express   problems   in a   natural   form that is   similar   to how   people
ix

Reading notes: Hyphenated line breaks in 'pro-fessor' and 'es-sor' require reading-order confirmation Spacing irregularities such as 'prof es-sor' may reflect OCR artifacts

Printed product names: Turbo Pascal for the Macintosh · Turbo Pascal · Pascal

Printed dates: 1642 · 1971 · 1976 · 1986

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/1#scan-ec88d5333c00405b1865eff6ee5a0ec3aed31eb49645a3b09ca92be3af9924fd)

TURBO PASCAL FOR THE MAC

Transcribed text:

X   TURBO   PASCAL   FOR THE   MAC
think. As Macintosh software, Turbo   Pascal   takes full advantage of the
unique features of the Macintosh, making   it   easy to learn, to use, and
to debug the occasional programming mistakes that inevitably occur.
This book contains all that you will need to become a proficient   Pascal
programmer.
--

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/7d937dc55c9ef8e7f96cae391616b9feab6c37d37f8a3bed09679c09be7893d8/Turbo_Pascal_For_The_Mac_1988.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-turbo-pascal-for-the-mac-1988-e8d2f3/2.md)
