TIDE
Languages

Modula-2

Installing Modula-2 on Ubuntu in TIDE

Modula-2

Modula-2 is a systems programming language designed by Niklaus Wirth as the successor to Pascal, introducing modular programming constructs and concurrency.

Installation

Install the GNU Modula-2 compiler (gm2) via Ubuntu's package manager:

apt update
apt install -y gm2

Verification

Check the installed gm2 compiler version:

gm2 --version

Writing and Compiling Code

Create a Modula-2 source file named hello.mod:

MODULE Hello;
FROM StrIO IMPORT WriteString, WriteLn;

BEGIN
   WriteString("Hello, World!");
   WriteLn;
END Hello.

Compile and run the binary:

gm2 hello.mod -o hello
./hello

Official Resources

On this page