← Macintosh Hands-On Pascal

Macintosh Hands-On 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™ Hands-On Pascal Pascal T. G. Lewis Abbas Birjandi Begin While X <> Y If X > Y Then X := Else Jacobs 89

A book cover with orange and yellow title text on a dark maroon-to-orange gradient background, showing an illustrated Macintosh computer whose screen displays a flowchart and a magnified code snippet held by a hand, with another hand typing on the keyboard.

Reading notes: The small 'Jacobs 89' signature in the lower right may be an artist credit and its year is uncertain. The code snippet inside the magnifier is partly cut off at the edges and may be incomplete. The trademark symbol after Macintosh is small and raised; its exact placement is uncertain.

Printed dates
89
Languages
English
PDF page 1

Macintosh™ Hands-On Pascal T. G. Lewis Abbas Birjandi Begin While X <> Y If X > Y Then X := Else JACOBS 85-

A book cover showing an illustrated Macintosh computer with a magnifying glass held by a hand over a screen displaying a flowchart and Pascal code, against a dark maroon-to-orange gradient background, with a hand typing on the keyboard.

Reading notes: The signature 'JACOBS 85-' in the lower right corner is small and partially cut off, so the year and trailing characters are uncertain. The code on the screen is partially visible and cut off by the magnifying glass, so 'Else' may be followed by hidden text. The trademark symbol after Macintosh is small and rendered as ™ in the transcript.

Printed dates
85
Languages
English
PDF page 2

Macintosh™ Hands-On Pascal Don Barr 14-

A plain white title page with a spiral-binding punch edge on the left, the printed title centered in the upper third, and a blue handwritten signature "Don Barr" with the handwritten marking "14-" in the upper right corner.

Reading notes: Handwritten name and the "14-" marking in the upper right are informal and may be read with some uncertainty; the handwritten "14-" may be a partial page or section number. A partially visible curved mark at the top edge is not legible text.

Languages
English
PDF page 3

Macintosh™ Hands-On Pascal

- - - - - - - - Macintosh™ Hands-On Pascal Ted G. Lewis Abbas Birjandi Wadsworth Publishing Company Belmont, California A Division of Wadsworth, Inc.

Languages
English
PDF page 4

Production Management: Miller/Scheier Associates Cover Designer: Detta Penna ®1986 by Wadsworth, Inc. All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transcribed, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher, Wadsworth Publishing Company, Belmont, California 94002, a division of Wadsworth, Inc. Printed in the United States of America 1 2 3 4 5 6 7 8 9 10 90 89 88 87 86 ISBN 0-534-06354-3 Apple is a trademark of Apple Computer, Inc. Macintosh is a trademark licensed to Apple Computer, Inc. Library of Congress Cataloging-in-Publication Data Lewis, T. G. (Theodore Gyle), 1941- Macintosh hands-on Pascal. Includes index. 1. Macintosh (Computer)-Programming. 2. Pascal (Computer program language) I. Birjandi, Abbas. II. Title. QA76.M3L49 1986 005.265 85-20200 ISBN 0-534-06354-3 "11"!1! '

Reading notes: Printed page numbering and copyright year sequence are ambiguous in the copyright block. Trailing garbled characters at the end of the source may be damaged.

Printed product names
Macintosh · Apple
Printed dates
1986 · 1941 · 1 2 3 4 5 6 7 8 9
Languages
English
PDF page 5

- - - Preftice xiii Introduction xv Why Pascal? xvi What Is a Programming Language? xvi How Does Macintosh Understand Pascal? xviii How to Use This Book xviii Session 1: Getting Started The Mouse that Points 1 A Picture Language 3 Menus or When Is a Computer Like a Restaurant? 3 Windows into Macintosh 4 Opening a Pascal Window 6 Closing a Window 6 Dragging a Window 7 Sizing a Window 7 Scrolling a Window 8 Dialog or Talking Back to Your Macintosh 8 Starting Pascal 9 Quitting Macintosh Pascal 11 Summary 11 Problem Solving 12 1

Languages
English
PDF page 6

vi Session 2: Entering, Running, and Saving a Pascal Program Running Your First Program 13 Changing a Line of Program Text 15 Running a Program 16 Bug Dialog 18 Saving Your Program For Later Use 19 Editing 22 Saving Your Edited Program 22 Restoring a Saved Program 25 Printing the Current Program 25 Summary 26 Program Solving 26 Session 3: The Structure of a Pascal Program Reserved Keywords 27 Syntax Diagrams 28 Program Statement 29 Identifiers 29 Program Body 30 Declaration Part 30 Types 31 Constants 31 Variables 32 Assigning a Value to a Variable 32 Hands on the CandyJar 33 Communicating with the Outside World 35 Writeln vs Write 35 ReadLn 36 A Complete Example 38 Comment Statement 40 Summary 41 Problem Solving 42 CONTENTS 13 - 27 - I""" I

Languages
English
PDF page 7

CONTENTS - - - - - - - - Session 4: Integer, &Al, 11nd Chllr Expressions The Instant Window 43 Integers 45 Reals 47 Char 49 Hands-On Example 50 Summary 51 Problem Solving 52 Session 5: What Is 11 Subprogram? Pascal Subprograms 53 Procedures 54 Hands-On Examples of Procedure GET.MPG 56 Functions 59 Hands-On Example of Function MILEAGE 60 Summary 61 Problem Solving 62 Session 6: Choosing in P11SC11l Boolean Variables 63 Boolean Operators 64 Boolean Expressions 66 IF Statements 66 RUN-STEP 69 Putting in STOPS 69 One-Legged IF Statements 70 Compound IF Clauses 70 Hands-On Example of Compound IF Statements 71 Multiway Branching 73 Case Statement 74 A Hands-On Example 77 The Observe Window 78 Summary 78 Problem Solving 78 vii 43 53 63

Reading notes: OCR errors in several headings (e.g., '11nd' for 'And', 'Chllr' for 'Other', '11' for 'a', 'P11SC11l' for 'PASCAL') Page numbers and dot leaders are not clearly aligned with entries

Languages
English
PDF page 8

viii Session 7: Iteration Using While, Repeat, and For Algorithms 81 Iteration 81 While Loops 82 Repeat Loops 84 For Loops 85 Hands-On Looping Example 87 Summary 88 Problem Solving 88 Session 8: The Type Statement The Notion of Data Type 91 The Type Statement 92 Subrange Types 93 Hands-On Experiments with New Types 94 Examples of Subrange Types 95 Summary 96 Problem Solving 97 Session 9: Text Files and Printer Output What Is a File? 99 Kinds of Files 100 Declaring a Text File 101 Opening a File 101 Closing a File 102 Hands-On File Output 102 Reading a Text File 104 General Forms of 1/0 104 The Printer 105 Copy a File to the Printer 106 Hands-On Pseudo-File 1/0 106 Summary 108 Problem Solving 109 CONTENTS 81 91 99

Languages
English
PDF page 9

CONTENTS - - - - - Session 10: Arrays The Notion of an Array 111 Examples of Arrays 113 Tables 113 Hands-On Arrays 114 Lists 115 Add to the List 117 Sort the List 117 Look Up an Element in a List 120 Two-Dimensional Arrays 121 Summary 121 Problem Solving 122 ix 111 Session 11: String Processing 123 Strings in Pascal 123 String Declaration 124 Length of Strings 124 The Difference Between String Size and String Length 125 Finding the Length of a String 125 Hands-On String Length 125 String Operations 127 Searching Strings 128 Looking for Patterns 129 Deleting Substrings 130 More on POS 131 An Improvement to the Hands-On Program 131 Copy and Concat 132 Inserting Strings 134 Summary 134 Problem Solving 134

Reading notes: Source is a table of contents with no primary heading; headline set to null.

Languages
English
PDF page 10

Session 12: Data Structures Containing Records

x Session 12: Data Structures Containing Records The Structure of Data 137 The Record Structure 138 Examples of Records 138 Dot Notation 139 Hands-On Experiment with TIC..TOC 142 Nested Dots 143 The With Statement 143 Hands-On With Statements 146 Summary 147 Problem Solving 148 CONTENTS 137 Session 13: Sets and Scalars 151 How Data Are Encoded 151 Enumerated Scalars 152 Hands-On Scalars 153 Examples of Enumerated Scalars 154 Sets 155 Examples Using Sets 156 Hands-On Sets 158 Things to Remember About Sets and Scalars 160 Summary 161 Problem Solving 161 Session 14: Random and Typed Files Nontext Files 163 Sequential vs. Random Files 164 Random Files in Macintosh Pascal 165 Constructing a Typed File 166 Reading a Typed File 168 Random Retrieval 168 Random File Update 169 Hands-On Random Files 169 Summary 173 Problem Solving 173 163

Reading notes: Page numbers and running headers are mixed into the extracted text, so reading order around them may be uncertain.

Languages
English
PDF page 11

CONTENTS - - - - Session 15: More on Procedures and Functions · Scope Rules 175 Spelling Anomaly 176 Side-Effect Anomaly 176 Nonlocal Objects 177 What Block Activation Does 179 Hands-On Blocks 180 Simple Scope Rules 183 Parameter Passing 183 Pass-by-Value 183 Pass-by-Reference 184 External Blocks 185 Recursion 185 Recursive Definition 186 Recursion in Pascal 186 Hands-On Recursive Function S(N) 187 When Not to Use Recursion 188 Forward Referencing 188 Summary 189 Problem Solving 190 Session 16: Pointers and Dynamic Data Structures Why Do We Need Dynamic Data Structures? 193 Addition Problem 193 Deletion Problem 194 Pointers 194 Nil Pointers 195 Operations on Pointers 196 Hands-On Linked Lists 196 Adding to Phonelist 198 Printing a Phone List 198 Hands-On Linked Lists Revisited 203 Deleting from Phonelist 203 Insertion in Phonelist 206 Summary 210 Problem Solving 211 xi 175 193

Reading notes: Headline not identifiable; source is a table of contents rather than advertising copy

Languages
English