Complete Macintosh Turbo Pascal
From the originals
11 scansMachine-transcribed text and image descriptions. Check the linked original for uncertain words or fine print.
These are transcribed pages from the documents, not the full publications. Open the original for the remaining pages.
Image 1
Complete Macintosh Turbo Pascal
BORLAND / SCOTT, FORESMAN Complete Macintosh Turbo Pascal Joseph Kelly Foreword by Philippe Kahn Scott, Foresman Macintosh Computer Books
A book cover with a red top band and red side label above a photo of a man in a shirt and tie working at a desk with a beige Macintosh computer, keyboard, telephone, and a desk lamp.
Reading notes: Small red side label text is partly cut off at the left edge, so 'Scott,' and 'Foresman' may be truncated.
- Printed product names
- Macintosh · Turbo Pascal
- Languages
- English
PDF page 1
Complete Macintosh Turbo Pascal
BORLAND / SCOTT, FORESMAN Complete Macintosh Turbo Pascal Joseph Kelly Foreword by Philippe Kahn Scott, Foresman Macintosh Computer Books
A book cover with a red top band, large blue serif title text on a cream background, and a photo of a man in a shirt and tie working at a beige Macintosh computer with keyboard on a desk with papers and a desk lamp.
Reading notes: The red top band text is set in heavy black type over red and may be slightly distorted at the edges; the 'Scott, Foresman Macintosh Computer Books' text in the red side label is cramped and line breaks are approximate.
- Printed product names
- Macintosh · Turbo Pascal
- Languages
- English
PDF page 2 · PDF page 5 · PDF page 3
The image is a fully blank white page with no visible artwork, layout, or text.
Reading notes: No visible text or graphic content appears anywhere on the page, so the transcript and all printed fields are empty.
PDF page 4
Cover photo courtesy of Apple Computer, Inc. Apple® is registered to Apple Computer, Inc. Macintosh111 is a trademark licensed to Apple Computer, Inc. Turbo Pascal® Macintosh is a trademark of Borland International, Inc. Turbo Pascal® Tutor Macintosh .. ', Turbo Pascal® Toolbox Numerical Methods Macintosh111, and Turbo Pascal® Database Toolbox Macintosh'• are trademarks of Borland Interna- tional, Inc. TMON is a trademark of ICOM Simulations, Inc. library of CoDgl'eM Cataloging-in-Publication Data Kelly, Joseph. Complete Macintosh Turbo Pascal I Joseph Kelly. p. cm. Bibliography: p. Includes index. ISBN 0-673-38456-X 1. Macintosh (Computer)-Programming. 2. Pascal (Computer program language) 3. Turbo Pascal (Computer program) I. Title. QA76.8.M3K45 1989 005.265-dcl 9 1 2 3 4 5 6 KPF 94 93 92 91 90 89 ISBN 0-673-38456-X Copyright© 1989 Scott, Foresman and Company. All Rights Reserved. Printed in the United States of America. Notice of Liability 88-26876 CIP The information in this book is distributed on an "As Is" basis, without warranty. Neither the author nor Scott, Foresman and Company shall have any liability to customer or any other person or entity with respect to any liability, loss, or damage caused or alleged to b~ caused directly or indirectly by the programs contained herein. This includes, but is not limited to, interruption of service, loss of data, loss of business or anticipatory profits, or consequential damages from the use of the programs. Scott, Foresman professional books are available for bulk sales at quantity discounts. For information, please contact Marketing Manager, Professional Books Group, Scott, Foresman and Company, 1900 East Lake Avenue, Glenview, IL 60025.
Reading notes: OCR-damaged characters in trademark lines (e.g., 'Macintosh111', 'Macintosh'•') and the Notice of Liability paragraph (e.g., 'b~ caused') Printed dates and numeric strings in the cataloging block are ambiguous and may not all be publication dates Reading order of the cover credit and trademark notices is uncertain
- Printed product names
- Macintosh · Turbo Pascal · Turbo Pascal Tutor · Turbo Pascal Toolbox Numerical Methods · Turbo Pascal Database Toolbox · TMON
- Printed dates
- 1989 · 88-26876 · 94 · 93 · 92 · 91 · 90 · 89 · 0-673-38456-X
- Languages
- English
PDF page 6
Foreword Philippe Kahn Turbo Pascal for the Macintosh has been a very successful product for Borland International. The better to support this popular compiler, Borland has teamed up with Scott, Foresman and Company to provide a complete and concise Turbo Pascal tutorial that bears the names of both companies. Complete Macintosh Turbo Pascal is the result of hundreds of hours of work, not only by the author, but also by our technical support personnel at Borland. Our technicians have critiqued every page of the text and have tested each of the programs presented. This book is an excellent tutorial for all users of Macintosh Turbo Pascal. The book's organization allows the beginner to read it from cover to cover, while more knowledgeable users can start with Part II or mfor coverage of advanced topics. Each chapter concludes with a quiz that reinforces the items covered. All Macintosh-style programming topics are discussed, including menus, dialog boxes, mouse programming, graphics, sound, event-handling, resources, and more. An entire chapter is devoted to debugging strategies to help users at all levels solve their programming problems. The author presents many complete application programs that are useful in day-to-day programming activities, including an album database and a date/ occasion reminder program. When you have completed reading Complete Macintosh Turbo Pascal, you will have enough knowledge of our powerful compiler to create sophisticated programs which utilize the Macintosh environment Borland is pleased to endorse Complete Macintosh Turbo Pascal as the "official" book on Turbo Pascal for the Macintosh.
Reading notes: Text is a foreword with no primary heading; headline set to null. Some words in the source show stray spacing or a possible OCR artifact (e.g., 'mfor' in the Part II reference).
- Printed product names
- Turbo Pascal for the Macintosh · Complete Macintosh Turbo Pascal · Macintosh Turbo Pascal
- Languages
- English
PDF page 7
Contents Introduction xv Part I: AN INTRODUCTION 1 Chapter 1 The Fundamentals 3 What Is Programming? 3 What Is Pascal? 4 What Is Syntax? 6 What Is Programming Technique? 6 Flowchart Symbols 8 How Turbo Pascal Communicates with Macintosh 12 Machine Language 14 Macintosh Storage 14 Getting Ready to Use Turbo Pascal 18 Starting Turbo Pascal 20 Review Summary 23 Quiz 23 Chapter 2 Getting Acquainted with Turbo Pascal 24 The Turbo Pascal Screen 25 Menu Discussions 25 Your First Turbo Pascal Program 44 Running Your First Program 4 7 Editing Your Program 48 Saving Your Program 50 Printing Your Program 52
Reading notes: Source text is a table of contents, so no advertised products, prices or dates are present Heading is not a primary headline; set to null
- Printed product names
- Turbo Pascal · Macintosh
- Languages
- English
PDF page 8
x Contents Review Summary 54 Quiz 55 Part II: THE TURBO PASCAL LANGUAGE 57 Chapter 3 Turbo Pascal Revealed: structure and Syntax 59 The Right Stuff: Syntax 60 The Elements of a Turbo Pascal Program 60 Data Types: What to Declare 66 What to Declare: Variables 72 Assigning Variables 74 Constants 75 A Word on Punctuation: The Semicolon 76 Expressing Yourself 77 Mathematical Order of Operation 78 Simple Turbo Pascal Arithmetic 79 More on Data Types 82 Program Formatting 86 Review Summary 86 Quiz 87 Chapter4 Turbo Pascal Statements 88 The Write and Writeln Statements 89 Assigning Data Values with Read and Readln 97 Statement of Choice: The Conditionals 103 Decisions, Decisions ... The Thinking Mac 103 A Couple of Common Errors with If Statements 106 Nesting Your If Statements 108 Boolean Operators 110 Another Case to Consider 110 Review Summary 112 Quiz 112 Chapter 5 More Statements: The Looping Structures 113 Programs That Repeat 114 The While Statement 114 Counting Your Loops 116 Loops That Sum 118 The For Statement 119 Backward Looping with Downto 125 Summing up For Loops 126 The Repeat Statement 126 "While" versus "Repeat ... Until" 129 Nested Loops 129 One More Loop: The Goto Statement 130 Review Summary 132 Quiz 132 ,_
Reading notes: Source is a table of contents with no advertised products, prices, or dates; headline is not present as a primary heading.
- Printed product names
- Turbo Pascal
- Languages
- English
PDF page 9
Contents xi Chapter 6 Procedures, Parameters, and Units 134 Structured Design 135 What Is a Procedure? 135 What Does a Procedure Consist Of? 136 Where Is a Procedure Placed? 137 How Are Procedures Used? 137 Using Variables with Procedures 139 Global versus Local Variables 140 Passing Information with Parameters 141 Variable Parameters 141 Value Parameters 145 Introducing Functions 148 Compiler Directives 151 The Turbo Pascal Unit 157 The Uses Clause 158 PasConsole Information 159 Using UnitMover 160 Review Summary 162 Quiz 164 Chapter 7 Turbo Pascal Library Features 165 How to Avoid Reinventing the Wheel 165 The Central Library 166 Library Routines 167 Review Summary 178 Quiz 178 Part Ill: APPLICATIONS AND ADVANCED CONCEPTS 179 Chapter 8 Programmer's Corner 181 The Entire Picture: Complete Pascal Programs 181 Metric Conversion Program 181 Guess-a-Number Program 186 Decimal-to-Hexadecimal Conversion Program 191 Tape Counter Program 199 Review Summary 201 Quiz 201 Chapter 9 Advanced Data Structures 202 Advanced Numeric Types: Long Integers and Extended Real Numbers 202 What's in a Type? 204 Simple Arrays 206 Parallel Arrays 208 Records and Files 210 Sets 211 Using Arrays, Records, and Sets in an Application 213
Reading notes: Table of contents contains irregular spacing and line breaks that may affect reading order. Some words are split across lines (e.g., 'Ill' in 'Part Ill') that may be OCR artifacts.
- Languages
- English
PDF page 10
xii Contents Review Summary 216 Quiz 217 Chapter 10 Introduction to Advanced Concepts 218 Recursion; or, Can I Call Myself?! 218 The Pointer and Handle Data Types 221 Almost Everything in Life Has a Point(er)! 225 Further Study-Stacks, Queues, and Trees 230 Review Summary 234 Quiz 234 Chapter 11 More on Records and Flies 235 Fields, Records, and Files 235 Files versus Arrays of Records 236 File-Handling Library Procedures 237 Using a File in a Phone-Book Program 240 Sorting and Merging Records 245 Variant Records 251 Review Summary 253 Quiz 254 Chapter 12 Debugging and File Analysis 255 Debugging 255 File Analysis 256 Encipher/Decipher Program 263 MacsBug 266 TMON 268 Review Summary 269 Quiz 269 Chapter 13 Graphics, Sound, and Resources 270 Graphics 270 Turtle Graphics 271 Standard Macintosh Graphics 275 Fun with the Mouse 281 Making Music in Turbo Pascal 285 Resources 290 Using RMaker 293 Event-Handling Programming with a Resource File 293 Review Summary 299 Quiz 300 Chapter 14 A Few Programs for the Road 301 The Date-Minder Program 301 Batting-Average Program 308 Record Album Database Program 314 Summing Up 323
Reading notes: Source appears to be a table of contents with page numbers rather than advertising copy; no headline or advertised products are present. Some words are hyphenated or split across lines (e.g., 'Point(er)', 'Flies' likely 'Files'), which may reflect OCR error.
- Languages
- English
PDF page 11
Contents xiii Review Summary Quiz Appendix fl\. The Borland Toolboxes and Turbo Tutor Appendix B: Reserved Words Appendix C: Quiz Answers Appendix D: Blbllography Index 323 323 325 329 330 336 337
Reading notes: Appendix title contains 'fl\.' and 'Blbllography', possibly OCR errors Page numbers are interleaved with headings, so reading order is uncertain
- Printed product names
- Turbo Tutor
- Languages
- English
PDF page 12
Introduction Welcome to the world of Turbo Pascal programming on the Macintosh! We're glad you chose this book to learn about this powerful language. This book is structured so that the complete programming novice can use it to learn how to write sophisticated programs on the Macintosh. However, Complete Macintosh Turbo Pascal is not for beginners only! Experienced programmers will find a great deal of information in this book including coverage of resource files, units, event-handling, graphics, sound, etc. For the complete beginner to program- ming, we recommend that you start from the beginning of the book and carefully study each section. For those of you familiar with programming in another language (e.g. BASIC), we recommend that you start with Part II: The Turbo Pascal Language. Finally, for those of you who have used Turbo Pascal on the IBM PC or just want to know about Macintosh-specific areas of Turbo, we recommend that you skip to Part ID: Applications and Advanced Concepts. No matter what your current level of programming is, we sincerely hope you will come to enjoy the full power of Borland International's Turbo Pascal package for the Macintosh and that you will keep Complete Macintosh Turbo Pascal handy as a reference guide when you have become a Turbo "master."
Reading notes: Possible typographic emphasis markers in the source copy around certain phrases (e.g. 'Complete Macintosh Turbo Pascal', 'Experienced programmers') are not reliably distinguishable in the extracted text.
- Printed product names
- Turbo Pascal · Complete Macintosh Turbo Pascal · Turbo Pascal package for the Macintosh
- Languages
- English