Chapter 12
Pointers and Dynamic Data


12.0 Chapter Goals
     12.1.1 Pointer Variables
     12.1.2 Pointer References
     12.1.3 The value NIL
12.2 Applications of Pointers
     12.2.1 Pointers and Parameters
     12.2.2 Pointers and Sorting
12.3 Pointer Arithmetic
12.4 Dynamic and Static Memory
     12.4.1 Static Memory Use
     12.4.2 Procedures and the Stack--Automatic Dynamics
     12.4.3 Dynamic Memory and the Heap--Program Controlled Dynamics
12.5 Managing Dynamic Memory in Modula-2
12.6 An Example--Dynamic Records and Files
12.7 Towards A Dynamic Array ADT
12.8 Pointers and Return Types
12.9 Opaque Types Revealed
12.10 Pointers and Lists
     12.10.1 Declaring The Linked List Apparatus
     12.10.2 Maintaining The Linked List
12.11 Variations on the List Theme
     12.11.1 Circular Lists
     12.11.2 Two-Way Lists
12.12 Variant Dynamic Records
12.13 Chapter Summary
12.14 Assignments
Contents