Modula-2 Programming Language
Free
resources updated everyday:
XXXLINKSXX
In the mid 1970's, after the language Pascal was designed, Niklaus Wirth was experimenting with concurrency which led to the design of Modula. Modula was never released and its development was discontinued after its publication. Wirth then built a language that was meant to be the single language for the new computer system called Lilith. Even though the computer was never a success, his new language Modula-2 was released in 1980.
Significant Language Features
Modula-2 was designed based on Pascal and Modula but its improvements over Pascal included modules, low level features, coroutines, and syntactic features.
- Modules- a tool for expressing the relations between major parts of programs and provide support for abstract data types.
- Low Level Features- small language which can be implemented on a wide variety of microcomputers. contains facilities for high level and low level programming.
- Coroutines- used for embedded systems that require concurrency without the overhead of large operating systems or large languages.
- Syntactic Features- has a small vocabulary and consists of few sentence structures. contains simple and consistant rules of syntax which makes it easy to learn.
Areas of Application
Modula-2 is a simple but yet a powerful language that is suitable for a wide range of applications.
- Systems Programming
- Concurrent Programming
- Embedded Systems
- Software Engineering
- Education
Sample Modula-2 Program
Source Code: (Hello World)
MODULE PrintHelloWorld;
(*This program prints "Hello world!" on the standard output device*)
FROM InOut IMPORT WriteString, WriteLn;
BEGIN
WriteString('Hello world!');
WriteLn;
END PrintHelloWorld.
This program was written with the help of Modula-2 Text and Reference by John Moore and Kenneth McKay. It was compiled, tested, and run by Modula-2 compiler version 2.0a.
This program prints the message "Hello world!" using the Modula-2 programming language.
|