Concept

Modula-2

Summary
Modula-2 is a structured, procedural programming language developed between 1977 and 1985/8 by Niklaus Wirth at ETH Zurich. It was created as the language for the operating system and application software of the Lilith personal workstation. It was later used for programming outside the context of the Lilith. Wirth viewed Modula-2 as a successor to his earlier programming languages Pascal and Modula. The main concepts are: The module as a compiling unit for separate compiling The coroutine as the basic building block for concurrent processes Types and procedures that allow access to machine-specific data The language design was influenced by the Mesa language and the Xerox Alto, both from Xerox PARC, that Wirth saw during his 1976 sabbatical year there. The computer magazine Byte devoted the August 1984 issue to the language and its surrounding environment. Modula-2 was followed by Modula-3, and later by the Oberon series of languages. Modula-2 is a general purpose procedural language suitable for both systems programming and applications programming. The syntax is based on Wirth's earlier language, Pascal, with some elements and syntactic ambiguities removed. The module concept, designed to support separate compilation and data abstraction; and direct language support for multiprogramming were added. The language allows the use of one-pass compilers. Such a compiler by Gutknecht and Wirth was about four times faster than earlier multi-pass compilers. Here is an example of the source code for the "Hello world" program: MODULE Hello; FROM STextIO IMPORT WriteString; BEGIN WriteString("Hello World!") END Hello. A Modula-2 module may be used to encapsulate a set of related subprograms and data structures, and restrict their visibility from other parts of the program. Modula-2 programs are composed of modules, each of which is made up of two parts: a definition module, the interface portion, which contains only those parts of the subsystem that are exported (visible to other modules), and an implementation module, which contains the working code that is internal to the module.
About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.