A Guide to 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"

Modula-2 is a simple yet powerful programming language that is suitable for a wide variety of applications. It is based on Pascal, a successful programming language that was introduced in 1970 by Niklaus Wirth. During the 1970's Pascal became the most widely taught programming language and it gained acceptance in science and industry. In 1980 Dr. Wirth released the Modula-2 program­ ming language. Modula-2 is an evolution of Pascal. It improves on the successes of Pascal while adding the MODULE - a tool for ex­ pressing the relations between the major parts of programs. In ad­ dition Modula-2 contains low-level features for systems program­ ming and coroutines for concurrent programming. Programming languages are important because they are used to express ideas. Some programming languages are so limited that certain ideas can't be easily expressed. For example languages that lac k floating point arithmetic are inappropriate for scientific com­ putations. Languages such as Basic and Fortran that lack recur­ sion are unsuitable for text processing or systems programming. Sometimes a programming language is useable for a certain appli­ cation but it is far from ideal. A good example is the difficulty of writing large programs in pure Pascal. Pascal is a poor language for large jobs because it lacks facilities for partitioning a program viii Preface 6< ; ~~~~er 0\ Sheet Metal Tube /" 0 (to Affix Eraser to Shaft) ~ Hollow Wooden Shaft A Lead Core Figure 1. An exploded diagram. into separate pieces that can be developed independently.

Author(s): Kaare Christian
Series: Texts and Monographs in Computer Science
Publisher: Springer
Year: 1986

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

Front Matter....Pages i-xix
Front Matter....Pages 1-1
Modula-2 and Pascal....Pages 3-29
Data in Modula-2....Pages 30-70
Control Flow in Modula-2....Pages 71-93
Procedures....Pages 94-127
Arrays....Pages 128-156
Front Matter....Pages 157-158
Local MODULES....Pages 159-177
Definition Modules....Pages 178-189
Implementation Modules....Pages 190-203
Common Global MODULES....Pages 204-215
Desk Calculator with Variables and Assignments....Pages 216-231
Front Matter....Pages 233-233
Enumerations....Pages 235-249
Sets....Pages 250-263
Records....Pages 264-288
Dynamic Data....Pages 289-305
Procedure Variables....Pages 306-317
Front Matter....Pages 319-320
TYPE Relaxation....Pages 321-344
Programming Hardware....Pages 345-356
Coroutines....Pages 357-366
Device Drivers....Pages 367-384
Back Matter....Pages 385-436