This book is intended for the novice as well as for the experienced programmer who wants to learn Modula-2. We do not limit ourselves to just a description of Modula-2. Instead, we seek to familiarize the reader with the concept of algorithms and to show him/her how to implement algorithms in Modula-2. The programming language Modula-2 was developed by Niklaus Wirth (also the father of world-famous Pascal) and made public in 1978. Compared to other programming languages such as Ada, COBOL or PL/! , Modula-2 is a compact language, which makes it easy to learn. Nevertheless, Modula-2 contains all important language elements necessary for formulating complicated algorithms and for implementing the modern concepts of software engineering. Modula-2 is distinguished by a systematic structure that makes it possible to write easily readable programs. The language supports many of the principles of modern software engineering. All this makes Modula-2 a useful instrument for an introduction to the basics of programming. This textbook strives to establish a solid foundation in the techniques of programming with up-to-date methods of program development. Use of the programming language Modula-2 is reinforced with numerous hands-on exercises. This book does not presuppose any knowledge of programming, but it does require a certain ability in the realm of abstract thinking, some pleasure in problem solving, and a desire to come to terms with complex interrelationships.
Inhaltsverzeichnis
1 Algorithms. - 1. 1 Examples of Algorithms. - 1. 2 Definition of the Term Algorithm . - 1. 3 Objects and Actions. - 1. 4 Means of Representing Algorithms. - 1. 5 Some Simple Algorithms. - 1. 6 Algorithms and Programs. - Exercises. - 2 Principles of Program Development. - 2. 1 The Principle of Stepwise Refinement. - 2. 2 Data Capsules. - 2. 3 The Module Concept. - Exercises. - 3 The Programming Language Modula-2. - 3. 1 Notation for Language Description. - 3. 2 Lexical Elements of Modula-2. - 3. 3 Elementary Program Structure. - 3. 4 Declarations. - 3. 5 Expressions. - 3. 6 Statements. - 3. 7 Procedures. - 3. 8 The Module Concept of Modula-2. - 3. 9 System-Dependent Language Properties. - 3. 10 Processes and Coroutines. - 4 Writing Modula-2 Programs. - 4. 1 Some Simple Modula-2 Programs. - 4. 2 Input/Output. - 4. 3 Dynamic Data Structures. - 4. 4 Recursion. - 4. 5 Language Extension Modules. - 4. 6 Parallel Processes. - Exercises. - 5 Programming Style and Program Testing. - 5. 1 Programming Style. - 5. 2 Program Testing. - 6 Software Engineering with Modula-2. - 6. 1 Modula-2 as a Tool for Specification. - 6. 2 Modularizing and Structuring. - 6. 3 Data Capsules and Data Abstraction. - 6. 4 Separate Compilation and Type Binding. - Appendix A: Syntax Diagrams. - Appendix B: Predefined Identifiers. - Appendix C: Compatibility Rules. - Appendix D: ASCII Table. - References.