Programming in Modula-2

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This text is an introduction to programming in general, and a manual for programming with the language Modula-2 in particular. It is oriented primarily towards people who have already acquired some basic knowledge of programming and would like to deepen their understanding in a more structured way. Neveltheless, an introductory chapter is included for the benefit of the beginner, displaying in a concise form some of the fundamental concepts of computers and their programming. The text is therefore also suitable as a self-contained tutorial. The notation used is Modula-2, which lends itself well for a structured approach and leads the student to a working style that has generally become known under the title of structured programming. As a manual for programming in Modula-2, the text covers practically all facilities of that language. Part 1 covers the basic notions of the variable, expression, assignment, conditional and repetitive statement, and array data structure. Together with Palt 2 which introduces the important concept of the procedure or subroutine, it contains essentially the material commonly discussed in introductory programming courses. Part 3 concerns data types and structures and constitutes the essence of an advanced course on programming. Palt 4 introduces the notion of the module, a concept that is fundamental to the design of larger programmed systems and to programming as team work. The most commonly used utility programs for input and output are presented as examples of modules.

Author(s): Niklaus Wirth
Series: Text and Monographs in Computer Science
Edition: 4th
Publisher: Springer
Year: 1988

Language: English
Pages: 183
Tags: Programming Languages, Compilers, Interpreters

Front Matter....Pages N1-7
Introduction....Pages 9-10
A First Example....Pages 11-13
A Notation to Describe the Syntax of Modula....Pages 14-15
Representation of Modula Programs....Pages 16-18
Statements and Expressions....Pages 19-21
Control Structures....Pages 22-27
Elementary Data Types....Pages 28-35
Constant and Variable Declarations....Pages 36-36
The Data Structure Array....Pages 37-46
Procedures....Pages 47-48
The Concept of Locality....Pages 49-50
Parameters....Pages 51-53
Function Procedures....Pages 54-55
Recursion....Pages 56-61
Type Declarations....Pages 62-63
Enumeration Types....Pages 64-64
Subrange Types....Pages 65-65
Set Types....Pages 66-67
Record Types....Pages 68-70
Records with Variant Parts....Pages 71-73
Dynamic Data Structures and Pointers....Pages 74-78
Procedure Types....Pages 79-80
Modules....Pages 81-82
Definition and Implementation Parts....Pages 83-86
Program Decomposition into Modules....Pages 87-93
Local Modules....Pages 94-100
Sequential Input and Output....Pages 101-108
Screen-Oriented Input and Output....Pages 109-118
Low-Level Facilities....Pages 119-121
Concurrent Processes and Coroutines....Pages 122-128
Device Handling, Concurrency, and Interrupts....Pages 129-132
Back Matter....Pages 133-184