# Macintosh Programming Using MS-BASIC 2.0 — source transcripts, page 1

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/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-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-2d7ca85230e9275aeaecdbb2dbdc34285d88396946913428d941f5a30f9a5c24)

Transcribed text:

MACINTOSH™ PROGRAMMING USING MS-BASIC™ 2.0 RICHARD C. VILE, JR.

Image description: A red book cover with large silver serif capitals for the title Macintosh Programming Using MS-BASIC 2.0, with the author's name in smaller silver capitals below and a small circular mark near the upper right.

Reading notes: Trademark symbols (™) after MACINTOSH and MS-BASIC are small and rendered as superscript; transcribed as ™. Title lines are large display type; reading order taken top to bottom.

Languages: English

[Original Image 1](https://www.vintageapple.net/files/b9daec1b5412dd00d30ca09a8a02c4e7401b81aae819ab2b2a86acc8fedbe94a/f64824b6bcf9e739d0d2c0dc.webp)

### PDF page 1

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-0fc62270d786a47ddd454f411da38df8be984870261cc58c6b311b982fede28b)

Transcribed text:

MACINTOSH™ PROGRAMMING USING MS-BASIC™ 2.0 RICHARD C. VILE, JR.

Image description: A red book cover with large silver metallic capital letters reading the title in stacked lines, the word USING in smaller type between lines, and the author's name in smaller silver capitals below, with a dark circular spot near the upper right.

Reading notes: Trademark symbols (™) after MACINTOSH and MS-BASIC and after the 2.0 area are small and reproduced as shown; the superscript placement near the right of the title is approximate. Title is printed in silver foil-like type and may read less crisply in places; text itself is clear.

Languages: English

[Original PDF page 1](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=1)

### PDF page 2

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-7bbe11422b94e29e0d75a790c9d1b8e3afe8cf9a64bd595bf57542f0bae505d2)

Transcribed text:

No. 2621
$24.95

MACINTOSH™
PROGRAMMING
USING
MS-BASIC™ 2.0
RICHARD C. VILE, JR.

TAB BOOKS Inc.
Blue Ridge Summit, PA 17214

Image description: A book cover page with large bold black serif title text centered on a cream-colored background, a catalog number and price in the upper right, and the TAB Books Inc. logo and address at the bottom.

Reading notes: Faint ghosted text beneath the title area (apparent bleed-through from the reverse side) is not legible and was not transcribed. Reading order of the upper-right number and price is inferred from layout.

Printed prices: $24.95

Languages: English

[Original PDF page 2](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=2)

### PDF page 3

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-18974b5cd991720d244b25bd1ad745d2fdad0dbb925aa7a1bbd5112faeac6705)

Transcribed text:

To my parents with   love   and appreciation.
Macintosh is a trademark   licensed   to   Apple   Computer,   Inc.
MacWrite is a trademark of Apple   Computer,   Inc.
MacPaint is a trademark of Apple   Computer,   Inc.
Apple   is a registered trademark of Apple   Computer,   Inc.
The Finder is a trademark of   Apple   Computer,   Inc.
Microsoft is a registered trademark of Microsoft Corporation.
MS   is a trademark of Microsoft Corporation.
TAB   BOOKS   Inc   offe
sale.   For   informa·t.   rs software for
I   ion   and a cat   I
P   ease contact TAB   S   a og,
Department, Blue   Ridge   o~~~~it
_!:A 17294-0850.   '
--   FIRST   EDITION
FIRST   PRINTING
Copyright   ©   1985 by TAB   BOOKS   Inc.
Printed in the   United   States   of America
Reproduction or publication of the content in any manner, without express
permission of the publisher, is prohibited. No   liability   is assumed with respect to
the use of the information herein.
Library of Congress Cataloging in Publication Data
Vile,   Richard   C.,   1943-
Macintosh programming using   MS-BASIC   2.0.
1. Macintosh (Computer)-Programming.   2.   BASIC
(Computer program language)   I.   Title.
QA76.8.M3V55   1985   005.2'65   85-22218
ISBN   0-8306-0321-2
ISBN   0-8306-0221-6   (pbk.)
Cover   photograph courtesy of Apple   Computer,   Inc.

Reading notes: The number 85-22218 is a Library of Congress catalog control number rather than a date and may be misread as a year. The source text contains OCR-like line breaks and a partially damaged phrase in the sale notice ("offe", "informa·t.   rs"). The reading order of the damaged sale-contact block near the top is uncertain.

Printed product names: Macintosh · MacWrite · MacPaint · Apple · The Finder · Microsoft · MS-BASIC 2.0

Printed dates: 1985 · 1943 · 85-22218

Languages: English

[Original PDF page 3](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=3)

### PDF page 4

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-46ed7951f2605a88fe26c0bc570733b8999f6953a7580fe2297cab46a4f25a02)

Transcribed text:

Contents
Acknowledgments   v
Program   Titles   vi
Introduction   viii
Section 1   Getting Started   1
1   A Tour of   MS-BASIC   on the Mac   1
2   Programs, Programs, Programs   7
Section 2   Learning the Ropes   11
3   Menu Trainer   11
4   Menu Maze   18
5   Prototype Menu Handler   23
6   Pretty Flashy   29
7   Window Trainer   35
8   Elevator   46
9   Pattern Maker   52
10   Address Book   58

Languages: English

[Original PDF page 4](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=4)

### PDF page 5

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-c0e8cc7ba0ce8eb92ec318b444fc155084998c74c5fdd49bf70d702f3564965e)

Transcribed text:

11   Mouse   Utilities   62
12   Quickdraw Trainer   70
13   Scribble   and Video   91
14   Rose Patterns   98
15   Ups   'N Downs   112
16   Fancy   MOUSE   (0)   118
17   Help   File   Generator   124
18   The Help   File   Support   128
Section   3   A Programmer's Notebook   132
19   Please Take Note ...   132
20   Macintosh Programming Notes   134
21   Bugs   156
Section   4   Applications   162
22   Cursor Editor   162
23   Mouse Kaleidoscope   180
24   Vocabulary Quiz   204
25   Dialog Designer   219
Section   5   Keeping at   It   247
26   Now   It's   Your Turn   247
27   Challenges Revisited   251
Appendix A   Command/Program Cross Reference   257
Appendix B   Program   Highlights   262
Appendix C   Help   File   Listings   266
Appendix D   Feedback   274
Index   275

Reading notes: Source appears to be a table of contents; no headline or advertised products are present Reading order of contents entries should be verified against original

Languages: English

[Original PDF page 5](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=5)

### PDF page 6

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-7dd6e959c3a55c9ed84bb23a66e53ecf07971d7a7e5bb4dd1c1436bb4f08962d)

Transcribed text:

Acknowledgments
I wish to thank Kevin Burton of TAB   BOOKS   Inc. for his help and guidance during this
project. Thanks go to TAB also for giving me the extra time to take full advantage of
MS-BASIC   2.0.   Tom   Steppe   of FAME Software gave me the idea for the Pretty Flashy
program.   Stan   Wyszomirski, also of FAME Software, kindly tried out some of my pro-
grams and offered valuable suggestions. Finally, to my wife and children, I owe more
than   I can say. Without their love, patience, and understanding, I never would have started,
let, alone finished this project.
v

Printed product names: MS-BASIC 2.0

Languages: English

[Original PDF page 6](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=6)

### PDF page 7

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-8ca19f413ee62a39416487c108136eda83fbbbd4f41035b893d9599976756767)

Program Titles

Transcribed text:

Program 3-1
Program 4-1
Program   5-1
Program 6-1
Program 7-1
Program 8-1
Program 9-1
Program   10-1
Program 11-1
Program 11-2
Program 11-3
Program 11-4
Program 11-5
Program 12-1
Program 13-1
Program 13-2
Program 14-1
Program 15-1
Program 16-1
Program 17-1
Program 18-1
Program   20-1
Program 22-1
vi
Program   Titles
Menu Trainer
Menu Maze
Prototype Menu Handler
Pretty Flashy
Window Trainer
Elevator
Pattern Maker
Address Book Entry
Click to Continue   Subroutine
Crosshairs
Flying Crosshairs
Mouse Inside Rectangle   Subroutine
Drag   Open   a Rectangle
Quickdraw Trainer
Scribble   or Random Neckties
Video
Rose Patterns
Ups   'N Downs
Fancy   MOUSE   (0)
Help File Generator
Help File   Support
Windows With   One- Pixel Borders
Cursor Editor

Reading notes: Program numbering and titles appear in a two-column list; some line breaks may affect reading order

Languages: English

[Original PDF page 7](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=7)

### PDF page 8

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-086031f92ed67dee3777b4f64e7184b13a7f3e0d9ac8f1ad1e1598d700ee93ec)

Transcribed text:

Program 23-1
Program 24-1
Program 25-1
Program 25-2
Program 25-3
Program 25-4
Program 27-1
Program 27-2
Mouse Kaleidoscope
Vocabulary Quiz
Dialog Design (Startup Program)
Dialog Boxes
Generated Basic for Print   Setup
Generated Basic for Print . . .
Changing Cursors
Double Click Analyzer
vii

Reading notes: Source is a table-of-contents style list of program titles with no advertised products, prices, or dates. Ellipsis in 'Generated Basic for Print . . .' may be truncated text.

Languages: English

[Original PDF page 8](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=8)

### PDF page 9

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-68404e888dede84ba708e5e5b76a8974c7ee739d8f88ae4150e6cfa2912b06a8)

Transcribed text:

Introduction
This book tells you how to write Interactive programs on the Macintosh using Microsoft
BASIC   2.0.   It assumes that you already know or are rapidly learning BASIC. The em-
phasis is on using the interactive features of the Macintosh: menus, graphics, buttons,
edit fields, the mouse, and so on.   It   contains over   20   programs designed to illustrate these
topics in as much depth as the thickness of the book will allow.
THE   ORGANIZATION   OF   THE   BOOK
The book is divided into five sections:
Section   One:
Section Two:
Section Three
Section Four
Section Five
Getting Started
Learning the Ropes
A   Programmer's   Notebook
Applications
Keeping at   It
Each section begins with a brief introduction explaining the contents and use of the section.
Section   One   discusses   MS-BASIC   on the Macintosh and how to use the book.
Section Two consists of 16 chapters containing sample programs that demonstrate
features and techniques. The emphasis is on the interactive programming features. Each
program concentrates on one specific area such as menus, edit fields, or buttons. Each
chapter discusses significant points about the program it contains.
Section Three is a collection of short discussions of a wide variety of programming
viii

Reading notes: Reading order of the section list is ambiguous because section titles are listed separately from their descriptions. Page marker 'viii' at end of text is an isolated fragment and may not belong to the body copy.

Printed product names: Microsoft BASIC 2.0 · MS-BASIC

Languages: English

[Original PDF page 9](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=9)

### PDF page 10

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-2dbeb043dc110cd2f26ccb603e0bdfc54b281fb9cdab72f7623e808e2dd16e20)

Transcribed text:

topics. First there is a short introductory chapter. The next is a chapter of notes dealing
with details of programming interactively. The third and last chapter of the section is a
collection of bugs. Each section of the chapter discusses a specific bug. Most of these
bugs infested the programs in the book during their development. By studying the bugs
chapter, I hope you can avoid some grief.   You   may also discover how to debug some of
your existing programs if you have already started writing programs with   MS-BASIC   2.0.
Section   Four presents four sample application programs partially developed. They
are all usable, but none could be considered fully polished. They are complete enough
to show you most of what you need to write your own applications. They are incomplete
enough to allow you to change them to suit your own style of implementation.
Section   Five wraps up the book with suggestions about how to continue your applica-
tion development career using   MS-BASIC   2.0.   I have included summaries and cross
references of the points illustrated by the programs. This includes a command by com-
mand chart.   If   you want to know which programs use the   DIALOG   (1) function, simply
consult the chart.
PROGRAM   LISTINGS
Each program is listed in full in the chapter that discusses it. I have tried to debug
these programs as much as possible.   In   a few cases, bugs have been left in as challenges.
In all such cases, I have indicated how to debug the code.
The program listings have many lines that contain a bold, outlined plus sign,   + .   This
is used whenever a long   BASIC   statement had to be placed on two printed lines.   If   you
enter the programs by hand, you should make sure all such lines are put back together
again.   Otherwise,   the lines will probably cause a syntax error. I will repeat this warning
in several places throughout the book, so please bear with me. I would rather bore you
with the explanation than have your versions of the programs fail to operate.
ix

Reading notes: Several words are split across lines or spaced irregularly, such as 'Section Four' and 'Section Five' and the spacing in 'PROGRAM LISTINGS'. The '+' symbol described in the text as bold and outlined may not render exactly as in print.

Printed product names: MS-BASIC 2.0

Languages: English

[Original PDF page 10](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=10)

### PDF page 11

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/1#scan-bbbbd9c571b90bb009e4ed25f384f4a553966629d0174b81decbcc87577ce0c7)

A Tour of MS-BASIC on the Mac

Transcribed text:

Chapter 1
A Tour of
MS-BASIC   on the Mac
Welcome to the world of Macintosh programming! This book introduces you to   MS-BASIC
2.0   on the Macintosh computer. This is a much different language than the microcom-
puter   BASICs   of the past. But then the Macintosh   is   much different from the microcom-
puters of the past. The key to these differences lies in the user interface.
I originally entitled this book   Interactive Programming   because I emphasize Macin-
tosh user interface features.   MS-BASIC   2.0   has done an admirable job of making the Macin-
tosh features available to the   "rest   of   us"   as the phrase goes. From   MSB   2.0   you can
access much of the built-in support for interactive programming: menus, windows, but-
tons, edit fields, dialog, the mouse, and Quickdraw graphics. And what is more, you don't
have to be an   "Inside   Macintosh"   guru to make it all work! You simply use the packaged
commands that   MSB   2.0   provides and the rest is automatic. Well, almost automatic.
In this chapter, I walk you through some of these capabilities. Along the way, you
should get an idea of the kinds of topics that I emphasize in the remainder of the book.
If   the material here doesn't pique your curiosity, doesn't get your creative juices flowing,
doesn't make you want to sit down and start work on your own   MS-BASIC   applications,
then this book is probably not for you.   On   the other hand, if any of the things I just men-
tioned does happen to you, then read on! The fun is just beginning.
MENUS
In   MS-BASIC   2.0   you get a MENU command with several different variations and
a MENU function. You can create your own menus and display them on the menu bar.
With the MENU   ON   and   ON   MENU statements, you can detect when the user has made
1

Reading notes: Repeated OCR-like spacing and hyphenation in body text; product name spelled both MS-BASIC and MSB 2.0 in source

Printed product names: MS-BASIC 2.0 · MS-BASIC · Macintosh · MSB 2.0

Languages: English

[Original PDF page 11](https://www.vintageapple.net/files/e2474319034f34b3c8d04d030505634b9801b31a3971fda74f81c7fd58e7db26/Macintosh_Programming_Using_MS-Basic_1985.pdf#page=11)

[Next transcribed scans](https://www.vintageapple.net/transcripts/media/va-macintosh-programming-using-ms-basic-1985-dd81d5/2.md)
