The purpose of this chapter is to introduce the use of pointers and some applications that use them. As well, the concept of dynamic data is explored and illustrated with some elementary dynamic structures. On completing the chapter, the student should understand and be able to use the following:
General:
Static and dynamic representations of existing data types are discussed and the concept of a dynamic list is introduced.
Realized in the Modula-2 notation:
pointers, handles, dynamic data structures and linked lists
General:
manipulation of items stored in dynamic memory
Realized in the Modula-2 notation:
the dereferencing operator, NEW, DISPOSE, Storage.ALLOCATE and Storage.DEALLOCATE
General:
using stack and heap memory, applications of pointers, dynamic types and ADTs
Realized in the Modula-2 notation:
opaque types and variant dynamic record memory allocation