# Programming Primer for the Macintosh 1995 — source transcripts, page 2

[Canonical transcript page](https://www.vintageapple.net/transcripts/media/va-programming-primer-for-the-macintosh-1995-775192/2)

## 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.

### PDF page 12

[Cite this scan](https://www.vintageapple.net/transcripts/media/va-programming-primer-for-the-macintosh-1995-775192/2#scan-4650c11d3ae004d981b321a3a1b14e36968592d6713ab81c5cfe0dae6aa11e83)

Transcribed text:

Contents   xi
Why You May Not Want to Lock a Handle   . . . . . . . . . . . . . . . . . . . . . .   220
Low-Memory Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   220
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   221
Chapter 11   Object-Oriented Programming   ........   223
OOP   and   C++   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   223
Structures   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   225
Declaring and Instance Structure   . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   225
Referencing Data Members of Individual Structures   . . . . . . . . . . . . . .   226
Member Functions and Structures   . . . . . . . . . . . . . . . . . . . . . . . . . . . .   226
Encapsulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   229
Data Hiding   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   230
Class   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   230
Objects   .. .... ...... .. .. .. ,   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   231
Instance Variable   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   233
Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   233
Messages ...... ... : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   234
Access   or . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   234
Constructor   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   234
Destructor   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   235
The   New   and   Delete   Operators   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   236
Friends .......   _ .   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   236
Linked List Example   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   237
Designing the List Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   239
Using   the   TList   and   TNode   Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . .   241
Derived   Classes   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   243
Pointers and   Objects   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   246
Traditional or   Object   Programming:   When to   Use   E ach   . . . . . . . . . . . . . .   249
Class   Libraries   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   250
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   250
Chapter 12   Debugging and Finder Resources   .....   251
Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   251
Types of Bugs   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   251
Debuggers   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   253
Symantec   C++   Debugging   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   254
BOMBS!!!   . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   256
Finder Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   258

Reading notes: Some page numbers and dot leaders in the table of contents are garbled or irregular, e.g. 'Objects .. .... ...... .. .. .. ,' and 'Messages ...... ... :' Chapter entry 'Pointers and Objects' and 'Traditional or Object Programming' contain irregular letter spacing that may affect exact reading

Languages: English

[Original PDF page 12](https://www.vintageapple.net/files/178956df71b83177ce8e1d8ed6a1cdebb09d188dc233339974f069153d8c6ebe/Programming_Primer_for_the_Macintosh_1995.pdf#page=12)

[Previous transcribed scans](https://www.vintageapple.net/transcripts/media/va-programming-primer-for-the-macintosh-1995-775192/1.md)
