Learning Modula2 through exercises: SOLUTIONS


During the exercises that you find on this page we, or more exactly YOU, will learn to program using the programming language Modula2. It is a relatively simple yet sufficiently powerful language which is perfectly suited for education.

Learning to program in Modula2 is like learning to speak a new language. You will have to memorize a whole set of new words. Learn to understand what they mean so that you can use them at the right moment. Not forgetting that you have to be able to write them correctly (computers are very bad at understanding what you actually mean!).

But this is not enough! Programming is about using one such language to control a computer to solve your problems. Programming is to computer language what literature is to a language: the realisation of ones idea using the given tool (be it a computer or human language).


How can you learn to use Modula2 to solve your problems? We always start with simple  programs which demonstrate well defined constructions, concepts, functionalities or features available in Modula2.

Each program serves as a basis for an exercise which requires your brain power. Yes, you will need to get your hands dirty to learn to program in Modula2. In other words, you will be reading, executing and modifiying programs all the time. And before you know it the brand new (programming) language will turn out to be quite readable actually. If and only if you put all your energy into making the exercises! Experience learn that reading the exercises is not enough!

Table of content

Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 5 Lesson 6 Lesson 7 Lesson 8 Lesson 9 Lesson 10 Lesson 11 Lesson 12 Lesson 13 Lesson 14 Lesson 15 Lesson 16 Lesson 17