← Microsoft Macinations

Microsoft Macinations

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

MICROSOFT MACINATIONS

MICROSOFT® MACINATIONS An Introduction to Microsoft® BASIC For the Apple® Macintosh™ The Waite Group • Mitchell Waite • Robert Lafore • Ira Lansing MICROSOFT PRESS 050 NPT 105 PRICE 19.95 A 6EM 45 70

A red book cover with a large blue letter M overlaid by cream-colored gears, arcs, and construction-style lines, with cream title text below and a blue Microsoft Press logo box at the bottom, plus a pink price sticker in the upper right corner.

Reading notes: Sticker text in the upper right corner (050 NPT 105, A 6EM 45 70) is small and partly obscured, so its exact spelling and digits are uncertain. Sticker reading order is inferred from layout.

Printed product names
Microsoft Macinations · Microsoft BASIC
Languages
English
PDF page 1

MICROSOFT MACINATIONS

MICROSOFT® MACINATIONS An Introduction to Microsoft® BASIC For the Apple® Macintosh™ The Waite Group • Mitchell Waite • Robert Lafore • Ira Lansing MICROSOFT® PRESS 050 NPT 105 PRICE 19.95 A 6EM 4570

A red book cover with a large blue stylized letter M overlaid with cream-colored gear, circle and crosshair line drawings, a Microsoft Press logo block at bottom, and a price sticker in the top right corner.

Reading notes: Price sticker text in top right is partially obscured and worn; '050 NPT 105' and 'A 6EM 4570' are uncertain readings. The price '19.95' appears on the sticker as 'PRICE 19.95' without a currency symbol.

Printed product names
Microsoft BASIC
Languages
English
PDF page 2

MICROSOFT® MACINATIONS

A plain off-white page with the words MICROSOFT® and MACINATIONS centered in large black serif capitals near the lower middle, with a thin vertical fold or crease line running down through the right side of the lettering and light speckled foxing across the paper.

Reading notes: The crease line passes through the letters 'F' and 'I' of the headline; both are still legible but the overlap should be checked against the original.

Printed product names
Microsoft
Languages
English
PDF page 3

MACINATIONS An Introduction to Microsoft® BASIC

MICROSOFT® MACINATIONS An Introduction to Microsoft® BASIC For the Apple® Macintosh™ The Waite Group · Mitchell Waite · Robert Lafore · Ira Lansing

Printed product names
Microsoft® BASIC · Apple® Macintosh™
Languages
English
PDF page 4

PUBLISHED BY Microsoft Press A Division of Microsoft Corporation 10700 Northup Way, Box 97200, Bellevue, Washington 98009 Copyright © 1985 by Mitchell Waite All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Cataloging in Publication Data Waite, Mitchell. Microsoft macinations. Includes index. 1. Macintosh (Computer)-Programming. 2. Basic (Computer program language). I. Lafore, Robert (Robert W.) II. Lansing, Ira. III. Waite Group. IV. Title. QA76.8.M3W35 1985 005.2'65 85-13863 ISBN 0-914845-34-9 Printed and bound in the United States of America. 12 3 4 5 6 7 8 9 FGFG 8 9 0 9 8 7 6 5 Distributed to the book trade in the United States by Harper and Row. Distributed to the book trade in Canada by General Publishing Company, Ltd. Distributed to the book trade outside the United States and Canada by Penguin Books Ltd. Penguin Books Ltd., Harmondsworth, Middlesex, England Penguin Books Australia Ltd., Ringwood, Victoria, Australia Penguin Books N.Z. Ltd., 182-190 Wairau Road, Auckland 10, New Zealand British Cataloging in Publication Data available Apple® is a registered trademark of, MacPaint 1 " and MacWrite"' are trademarks of, and Macintosh"' is a trademark licensed to Apple Computer, Incorporated. IBM® is a registered trademark and PC/XT™ is a trademark of International Business Machines Corporation. Microsoft® is a registered trademark of Microsoft Corporation.

Reading notes: Source contains OCR-style spacing irregularities and garbled trademark symbols such as MacPaint 1 " and Macintosh"' that may not reflect exact printed characters.

Printed product names
Microsoft Macinations · MacPaint · MacWrite · Macintosh · Apple · IBM
Printed dates
1985 · 85-13863
Languages
English
PDF page 5

The image is a completely blank white page with no artwork, layout, or printed content visible.

PDF page 6

CONTENTS Acknowledgments ix Introduction xi SECTION I Introduction to BASIC 1 BASIC Preliminaries 3 2 Instant BASIC 27 3 Programs: Creating, Editing, and Saving 45 4 Introducing Graphics 71 5 Variables and INPUT 95 6 Loops 117 7 Decisions 143 8 Subroutines and Program Organization 159

Languages
English
PDF page 7

9 Arrays and Read-Data 177 10 Strings 201 SECTION II Advanced BASIC for the Macintosh 11 The Mouse and Event Trapping 229 12 Menus 251 13 Buttons 279 14 Windows, Dialog Boxes, and Edit Fields 303 15 QuickDraw 339 16 Files 389 17 Animation 431 18 Multivoice Sound 459 Index 489

Reading notes: Table of contents fragment; no primary heading or advertised products present

Languages
English
PDF page 8

ACKNOWLEDGMENTS The authors would like to thank the following individuals for helping to make this book possible. At The Waite Group we thank Michael Pardee for his contributions to the subjects of menus, buttons, windows, and files, and Paul Hoffman for his excellent sound chapter. We bless the wonderful person at TWG who supplied the great chocolate chip cookies during the rainy Christmas weeks Robert and Mitchell spent writing. A wink and kind nod to Salley Oberlin and the folks at Microsoft Press who took the authors' creativity and tamed it into a consistent and unified whole. Barry Preppernau and Chris Matthews provided excellent techni- cal input. Special kudos to Chris for his great program contributions. A wave and smile to Nahum Stiskin who brought The Waite Group to Micro- soft Press in the first place. A final bow and domo arigato goes to David Laraway at Microsoft Press, who took our final manuscript and made its presentation crisp, succinct, and trimmed of unnecessary verbiage.

Reading notes: Japanese phrase 'domo arigato' appears in romanized form; spelling preserved as supplied

Printed product names
Microsoft Press
Languages
English · Japanese
PDF page 9

INTRODUCTION The Macintosh computer is justly famous for its revolutionary "user interface." This term simply means the way in which we humans interact with the computer and harness its power. The Macintosh is one of the most powerful personal computers ever built; at the same time, its artful blend of pull-down menus, movable windows, dialog boxes and but- tons, and the well-known mouse makes the Macintosh easy to use. It is this ease of use that makes the Macintosh so unique, and so appreciated by those who work and play with it. Such a multidimensional machine deserves a programming lan- guage that makes use of its many "bells and whistles." Because beyond its basic design, a computer-even the Macintosh-is only as good as the software programs that make it "think." Without good software, one wit has observed, a computer is nothing but a very expensive paperweight. And software is, to a large extent, a function of the programming language used to write it. It must be capable of using the powerful features of the computer, but at the same time, like the computer itself, it must be as easy to use as possible. You will find that Microsoft BASIC 2.0 for the Macintosh meets the twin requirements of power and simplicity. This comprehensive, two- part book will help you harness that power by showing you how to write programs that will make the Macintosh really perform. The first half of the book teaches the fundamentals of using the Microsoft BASIC language, including such concepts as variables, graphics, loops, decision making, subroutines, strings, and arrays. Although these ideas may sound strange now, in no time at all you'll be bandying them about with ease. In the second half you will learn how to write programs that use menus, windows, and buttons-the elements of Mac's famous user inter- face. You will learn about "event" programming-a modern method for

Reading notes: Source text ends mid-sentence at 'a modern method for'; reading order may be incomplete

Printed product names
Macintosh · Microsoft BASIC 2.0 for the Macintosh
Languages
English
PDF page 10

xii IS THIS BOOK FOR YOU? MICROSOFT MACINATIONS programming responses to the outside world. Windows and how the infor- mation in them is updated when one overlaps another are both clearly explained. If you have heard of QuickDraw, Macintosh's built-in graphics routines, you'll learn everything you need to know about them here. We teach you how to use the graphics pen, how to plot points, draw lines, arcs, rectangles, ovals, and complex designs and patterns. There are also chap- ters on disk files, graphics animation, multi-channel sound, and music. Many of the example programs used in this book are useful and interesting in their own right. For instance, a pattern-maker program gives you a FatBits-like interface that lets you design any custom pattern you want and use it to make a background or fill a shape. Another program presents a race between two rabbits to demonstrate the principles of ani- mation. A sound-lab program lets you create and edit custom waveforms and then listen to them. You can use it to design special-quality sound effects, musical instruments, and so on. There is even a complete rendition of a four-voice Bach concerto. We've written this book with both the new and the experienced program- mer in mind. If you're a beginner, this book will get you started. We begin with the most fundamental principles of BASIC programming and build on them to more complicated topics. We believe that a person best learns how to use a programming language by being shown how it works, rather than simply being told how it works in abstract terms. Accordingly, we focus on example programs that we encourage you to type in as you go along. We support the programs with figures that show their actual output, so you can compare your results with ours and know if you're on the right track. In fact, even if you don't have access to a Macintosh (either a 128K or 512K version) you'll still be able to learn a lot about how Microsoft BASIC for the Macintosh works by reading the explanations and studying the pro- grams and figures. Whether you're a new programmer or an old hand with code, this book won't outlive its usefulness after you've learned the basics about Microsoft BASIC for the Macintosh. We're confident that it will become a

Reading notes: Running header 'MICROSOFT MACINATIONS' and page number 'xii' appear mid-text, so reading order around them is uncertain.

Printed product names
Microsoft BASIC for the Macintosh · QuickDraw · Macintosh
Languages
English
PDF page 11

INTRODUCTION xiii valued reference source as you expand your programming proficiency. We hope that you keep it near your computer and turn to it when you need to refresh your memory or expand your knowledge of BASIC. The Macintosh is one of the most exciting personal computers around today, and Microsoft BASIC is one of the most exciting program- ming languages available for it. We've written this book to help you get the most out of both. So turn the page and let's begin!

Printed product names
Macintosh · Microsoft BASIC · BASIC
Languages
English