Interchapter materials are generally incomplete, and only some are included. Comparisons made in the material below are with the older version of the text, published by Charles Merrill.
1. Planning for the Solution of Problems
There is no Modula-2 in Chapter 1. The theme is abstractions and their role in computer assisted problem solving. These are discussed under four categoriesthose for data representation, data manipulation, computing machines, and programming. The computing process is considered abstractly as a tool for problem solving. To this end, problem solving is presented as a technique, and computing systems as tools to assist in the task. A sample problem is analyzed, and from its solution are abstracted the fundamental computing control paradigms of sequence, selection, and iteration. The idea of storage for data, variables and expressions are all introduced here in a notation-free context, and actual programs are given in pseudocode.
2. From Plan to Program
This section has been tightened up. Students now come into the course with a much more substantial background than three years ago. Almost all version-specific material in the original text is being removed. At the same time, the material is accessible to a broad range of students. Those with an extensive programming background can go through chapters 2 and 3 rather quickly; those with less experience need to work through them very carefully. Note that almost every section has a full module as an example; some have a fully planned and worked out example. Modula-2 WHILE loops are included as a realization of repetition, though they are not discussed formally until chapter 3. Some comments on the ISO standard versus classical Modula-2 are included.
3. Basic Program Structure Abstractions
If Chapter 2 was principally concerned with the role of simple data abstractions in programs, Chapter 3 emphasizes the structure of programs themselves. Note that section 5.1 on the FOR statement could be taken up in Chapter 3 after section 3.5 with students who have seen it before in other notations. However, those who have little previous experience ought to practice writing loops using WHILE and REPEAT before using the more specialized FOR.
4. Program Organization and Procedures
Procedures are introduced very early, and their use encouraged thereafter. This chapter has been lightened up somewhat, and the more esoteric points of value and variable parameters, scope, and side effects postponed to a later chapter. Examples from previous chapters are revisited and some of the code re-cast as Procedure calls. The section on predicates is new here; this version of the text emphasizes the role of preconditions and post conditions in the writing and calling of procedures. The material on recursion is more extensive for this initial chapter.
5. Iterations, Enumerations, and Arrays
This chapter is organized around the theme of implicitly and explicitly numbered data and programming abstractions. Thus, enumerations, subranges, arrays, and the FOR loop have a unifying theme. Note that the sections on sets have been moved much later in the text, though they could also be taken up before or after this chapter, as they are presented in a more or less self-contained way. The introductory section on the FOR statement could be taken up in Chapter 3 after the REPEAT statement has been covered, but it is postponed to this point in order to ensure that the (simpler) logic of the WHILE version of the top-of-loop tested repetition structure is understood.
6. Program Organization and Modules
Again, some of the material that was at this point in the earlier editions has been postponed to more advanced sections later in the text. This includes the detailed discussion of scope, and indeed the entire topic of nested local modules. Note that the author regards the construction of Abstract Data Types using the library module mechanism as both fundamental and elementary to modern programming and not as an advanced technique. That is why it comes almost immediately after Procedures.
7. Solving Real World Problems in Modula-2
This chapter introduces few, if any, new concepts in programming. The idea is to have students see a number of detailed examples and to explore the ideas already encountered before taking up any new techniques. The first part examines the implied abstract data type STRING in some detail, and offers some detailed examples. The second part treats a somewhat different topic in each section, each of which is self-contained. Any or all of the sections of Part B may be left out or replaced as suited to the class interests. No extended example section is needed in this chapter as there are several in it.
Note the major departures from existing practice:
Comparison to last edition:
4.0 with HTML markup by Gordon Tisher May 1995
4.0.1 corrected July 1996