← Macintosh Pascal

Macintosh Pascal

From the originals

13 scans

Machine-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

Macintosh™ Pascal Lowell A. Carmony and Robert L. Holliday COMPUTER SCIENCE PRESS Member of the Macintosh™ Development Team

A black book cover with a white grid pattern, a red apple with a gray leaf, a white fractal-like shape, and white concentric arcs and triangular steps, with the title at top and author names on a white band.

Reading notes: The trademark symbol after Macintosh is rendered as a superscript TM and may be a stylized mark rather than plain text.

Languages
English
PDF page 1

Macintosh™ Pascal Lowell A. Carmony and Robert L. Holliday COMPUTER SCIENCE PRESS Member of the Macintosh™ Development Team

A book cover with a black background and white grid pattern, a large red apple with a gray leaf in the lower right, and a white fractal-like shape and stepped white triangles and arcs on the left and center.

Reading notes: The trademark symbol after Macintosh is rendered as a superscript TM and is transcribed as ™.

Languages
English
PDF page 2

The image is a entirely blank white page with no visible artwork, layout, or text.

PDF page 3

The image is a entirely blank white page with no visible artwork, text, or layout elements.

Reading notes: No visible text found in the image; transcript and printed fields left empty.

PDF page 4

COMPUTERS AND HATH SERIES

COMPUTERS AND HATH SERIES MARVIN MARCUS. EDITOR University of California at Santa Barbara Lowen A Carmony and Robert L. Holliday lfaclntosh Pascal Lowen A Carmony, Robert J. McGllM, Ann Miller Millman, and Jerry P. Becker Pro/Jlem Solving In Apple Pascal Marvin Marcus Discrete lfathematlcs: A Computational Approach Using BASIC S. 6111 Williamson Com/Jlnatorlcs ror Computer Science

Reading notes: Series title reads 'HATH' and author-name OCR spacing is irregular; 'lfaclntosh' and 'lfaclntosh' may be OCR errors for 'Macintosh'

Languages
English
PDF page 5

Macintosh Pascal

Macintosh Pascal · Lowell A. Carmony Wt1 FortlSt CoJkJ/ftl Robert L. Holliday lakt1 F0rt1st Col/tl//fl COMPUTER SCIENCE PRESS

Reading notes: Author and publisher line contains garbled characters (e.g., 'Wt1 FortlSt CoJkJ/ftl', 'lakt1 F0rt1st Col/tl//fl') that are uncertain OCR readings. Reading order of the authors and publisher is ambiguous.

Printed product names
Macintosh Pascal
Languages
English
PDF page 6

Copyrl!llt • 1985 Computer Science Press, Inc. Printed In the I.kilted Slates of America All rl~ts reserved. No part of this book mav be reprclCKed, transmitted, or stored In any form or by any means, without the prior written consent of the pW>llsher# except by a reviewer who mav quote brief passages In a review or as provided or In the Copyrl!lll Act of 1976; Compul1r Sclmce Press, Inc. II Tafl C()(Jl"f RockY/111, /1aryland 2085() 234 Library of Congress cataloglng In Mllcatlon Data Carmony, Lowell A., 1943- ttaclntosh Pascal. Includes Index. 88878685 1. ttactntosh (Computer) 2. PASCAL (Computer program lsiguage) I. HDl1td8'f, Robert. II. Title. QA76.8.t13CJ7 1985 001.64 84-19901 ISBN 0-88175-081-6 "t1ilclntosh" ls a registered trademai k of Apple Computer, Inc., Cupertino, CA.

Reading notes: OCR corruption in copyright line, publisher address, and cataloging data (e.g., 'Copyrl!llt', 'Mllcatlon', 'ttaclntosh') Publisher ZIP code '2085()' appears damaged; likely 20850 Reading order of cataloging block is uncertain

Printed dates
1985 · 1976 · 1943 · 2085()
Languages
English
PDF page 7

Sc:hla.f t em Ue4 tn. alien DUMJm 8chlumrnert kQ.ummc£ fort u.ncl fort, um clie k'eLt hebt an zu zi.rlcJen. Tl'i.Jfst du nu.I' das Zau&er-wort. Joseph von tidlendol'f f

Reading notes: Heavily damaged OCR text with many garbled characters, e.g. 'Sc:hla.f t em Ue4 tn.' and 'tidlendol'f'. Line order and word boundaries are uncertain; no clear primary heading identified.

Languages
German
PDF page 8

PREFACE Pascal ts a landmark language provtdtng the reader wtth an elegant vehicle for studytng tmportant concepts of computer sctence. The Macintosh ts a landmark computer provldtng the reader wtth a degree of user-frtendltness and pedagogtcal features unparalleled In any other machine. We are excited and deltghted to present the reader with th1s self-study guide to /1aclntosh Pascal This book ts designed for the beginner to Pascal as well as a reference to the reader who already knows some Pascal. The book begins at an elementary level and contains all the Information needed by the novice to get started. New constructs are carefully developed with ample examples. The reader who works through the materlal presented here and writes the programs suggested In the exercises wtll have gained a thorough understanding of Pascal. This text contains a careful explanatlon of the Mactntosh Pascal operating system as well as Pascal so that the reader has, In one place, all the matertal needed. Learntng Pascal and at the same time learning to gutde a program through the computer can be frustrattng If you must fltp back and forth between a Pascal text and various computer manuals. In thts book we guide the begtnner step by step through the language and the operattng system. Mactntosh Pascal ts an extension of standard Pascal. We have made every effort to lndtcate which features belong to standard Pascal and which are extensions so that the reader can transfer the knowledge Obtained here to other Pascal systems. In particular, we have Included detailed dtscusstons of random access ftles (because they are useful) and graphtcs (because they are stunntng). The main nonstandard feature that we have tncluded tn the core Is the string type. Thts dectslon was made to keep the presentatton as simple as possible. In our experience begtnners are not ready for the subtlettes of arrays of characters, espectally ff they have never heard of arrays! We do, however, eventually tell the truth about strings, tntroduce the character type, Introduce records, and show the "'

Reading notes: Frequent OCR substitutions such as 'tn', 'ts', 'lndtcate', 'Mactntosh' and '/1aclntosh' make some spellings uncertain. Source ends abruptly mid-sentence, so the final passage may be incomplete.

Printed product names
Pascal · Macintosh
Languages
English
PDF page 9

vii reader how to live In a Pascal without strings. We also Include the built-In random number generator early In the text because It provides the opportunity ror very nice exercises. Hence, although this Is a text meant to be used with the Macintosh, It strives to present a balanced approach to Pascal so that the successful reader will have no trouble In moving to a Pascal on another machine. This Is a book that emphasizes structured programming. The method or structured programming Is taught through an extensive number or problems solved In the text. Functions and procedures are Introduced early and used throughout the remainder or the book. Since problem solving and sound programming skills are only learned by the reader actu- ally solving problems and writing programs, we urge the reader to write programs ror as many of the exercises as possible. Fortunately, the computer checks programs carefully and gives the reader feedback about the programs presented to It. For our part, we have tried to provide Interesting and challenging exercises that we hope you will enjoy as have our many students over the years. Another convenience for the reader Is that a disk Is available to """ accompany the book. This disk not only contains the sample programs from the book so that the reader can run or modify them, but It also contains text files for some or the exercises, as well as buggy programs. We have saved some of our students' best errors and provide them to hone your debugging skills. There Is much to learn In the debugging or programs. Indeed, you can't call yourself a programmer untll you can debug your programs. (Information on ordering this speclal disk Is provided at the end of the book.) Finally, the Macintosh's features entitle It to Its own Pascal text. We do not want to give away the exciting story that follows, but we believe that the Interpreted nature of Macintosh Pascal, together with the 'windows' Into the mind of the computer, will revolutionize and humanize the study of Pascal. May your journey be as exciting as ours was. About this book Appropriately enough, this book was typeset on a Macintosh. The text was created with MacWrlte using 12 point Geneva font. The pages were then reduced to flt a standard 6 by 9 Inch rormat. Each chapter had to be divided Into many pieces due to the limitations or the 1281< Macintosh and

Reading notes: Frequent OCR-style errors such as 'Include', 'ror', 'Mac' spellings and 'untll' appear in the source copy. The heading is absent; the opening page fragment is a preface excerpt without a clear primary heading. Some words in the 'About this book' section are broken or garbled, including '1281<' which may be a misread memory size.

Printed product names
Macintosh · Macintosh Pascal · MacWrlte · Geneva
Languages
English
PDF page 10

viii early versions of MacWrite. The pieces were then cut and pasted together on a 512K Mac or on a Llsa running Macworks and then printed on an lmageWriter printer. We are deeply grateful to Paul Collete and Jim Fiester of Lake Shore Computers in Lake Forest for letting us use their "Fat Mac" and to our colleague Jim Fryxell for making his Lls~ ava11able to us. So much effort was given to the task that rumors spread on campus that Bob was spending many hours in his office with Lisa wh11e Lowell was in his office with Mac. The program listings were produced from Macintosh Pascal and pasted into the text. Since all of the programs have been tested, this serves to ensure that no devastating typos have crept into the listings. In addition, all of the exercises have been solved to ensure that they are reasonable and can be done with the techniques at hand at the time they are given. Acknowledgments Our work in producing this book was made easier by the considerate help of a number of people. We extend our appreciation to Don Enns. Larry Jacober, and Bonnie Koven who worked through the material and provided suggestions for preparing the final manuscript. Special thanks go to Joe Hofmeister and George Pryjma who read the final manuscript and offered many valuable suggestions. Also thanks to Steve Lipton who first brought Koch's snowflake to our attention and suggested recursive graphics (Chapter 15) on the Macintosh. Permission to quote material from 6Al1ES magazine is greatly appreciated. We gratefully acknowledge McGraw-Hill, Inc. for permission to quote from The Devil's OP Dictionary, by Stan Kelly-Bootle (copyright (c) 1981 by McGraw-Hill, Inc.). Finally, we are also deeply indebted to the dedicated staff of Lake Forest Computer Camp who so graciously filled in for us during the summer of I 984 so that we could complete the first draft of these materials. Lowell A. Carmony Robert L. Holliday

Reading notes: OCR-style spacing and character errors in the source (e.g. 'Llsa', 'Lls~', 'OP Dictionary') may affect product name spelling Source is a preface/acknowledgments section with no primary heading

Printed product names
MacWrite · Macintosh Pascal · Macintosh · Lisa · Macworks · Mac
Printed dates
1981
Languages
English
PDF page 11

CONTENTS CHAPTER I INTRODUCTION . • • A Historical Sketch of Computing . Computers of the Modem Era • • Terminology . . . • • . • • A Few More Remarks about the Macintosh Programming a Computer. Summary • . . . • . . • • Exercises. • • • • . . • • CHAPTER 2 THE OPERATING SYSTEM A First Program • • • • • . Loading Pascal Into the Macintosh • Open and Close Shortcuts • • Opening Macintosh Pascal Moving and Adjusting Windows • Creating and Editing a Program . Saving Programs and Initializing Disks Running and Simple Debugging of Programs Closing Windows and Flies • • Loading Programs from Disk. • Printing a Ltsttng of a Program • Quitting Macintosh Pascal Renaming Programs and Disks The Reset Switch . • . . Final Words of Encouragement Exercises . . . . • • • CHAPTER J BEGINNING PASCAL • A Pascal Program . . . . • Variables and Memory Locations Variables In Pascal . . • The Assignment Statement Variable Types • The var Section • • Arranging Output . Simple Arithmetic ix I 3 8 9 12 13 18 19 22 22 23 24 29 34 35 44 49 56 59 62 63 64 . 65 . 65 . 67 68 69 73 . 75 . 75 . 77 . 80 . 84 . 86

Reading notes: Table of contents OCR contains spacing and character irregularities such as 'Modem' and 'Ltsttng'. Page numbers in the contents list are partly garbled, so reading order of entries is uncertain.

Printed product names
Macintosh · Macintosh Pascal
Languages
English