Modula-2 is a programming
language invented by Niklaus Wirth, who
the inventor of Pascal. If you liked Pascal, you'll like Modula-2 even
If you're not familiar with
the language, fetch the document Modula-2
for Pascal programmers.
The information on this page
has a bias towards Modula-2 for the
that happens to be the machine I use most often. For more general
check the "other information sources" mentioned below.
See also the following separate documents:
- The PMOS
library: a large
of modules for multitasking applications. Includes modules for screen
windows, graphics, mouse control, menus, and quite a few other things.
Free for non-profit use. I can confidently recommend this because I
wrote it myself.
is a port of PMOS to
- Numerical analysis software
by Marco van de Voort (freeware, but apparently a broken link). A collection of modules (for TopSpeed
3, but could be ported if anyone wants to make the effort) supporting
things like multitasking, XMS, mouse, various screen operations.
- M2AFX (another broken link, it seems):
application framework for Windows programming.
- There are collections of
useful software at
- Multigraph library
(shareware), available for
3 compilers. I've never used
this, but I've looked through some
of the documentation files and it seems to contain extensive graphics
- Libraries and example code
Remark: the above is my
personal list of things I've discovered and
look useful. It makes no claim to be comprehensive. There are still a
few broken links for which I haven't yet had the time to search for
I'm not aware of many net links for commercial suppliers, but you might
want to check out the following links.
See also the compilers section below; compiler vendors generally also
related products such as libraries.
for OS/2 are listed on a
- PMI (broken link):
(formerly known as XDS):
compilers and related
and related products.
Much of this section is now obsolete, because the compiler vendors have
either gone out of business or have moved to other interests such as
Java. (A language that would be interesting if it had the courage to
cut loose from its C origins. Can you believe that Java, supposedly a
high-level language, still has zero-based array indexing and the
brain-dead C "for" loops?) I have not gone through a detailed check, so
be aware that you might find some inactive web links.
The open source community is still active in supporting the language. There are two projects I have heard of so far.
- Objective Modula-2.
One of the many attempts - and possibly the only surviving attempt - to
add object-oriented features to Modula-2. The base language is Wirth's
4th edition, which in my opinion is inferior to the 3rd edition, but
this is a minor quibble given that the language rules have been changed
anyway. The object-oriented features do not follow the recommendations
of the Modula-2 standards committee, but instead appear to be based on
the object model of Smalltalk. (Again, a minor quibble, given that the
standards committee is essentially defunct. Besides, one of the
designers is, if I can trust my memory, a former member of the
standards committee.) I'm a little bothered by the dropping of some
important Modula-2 features such as subranges. (This implies zero-based
array indexing. Do we really have to repeat the "off by one" errors
that are so familiar to C programmers?) But I haven't tried it, so I'm
not really qualified to say how good it is.
- GNU Modula-2. I'm more
inclined to trust this one, since the GNU developers have a stronger
belief in portability and the importance of standards. (This is where
the Modula-3 people went wrong. They couldn't guarantee re-use of
existing Modula-2 library code.) Again, I haven't tried this one. I see
from the web page that FINALLY and TYPE COMPLEX are both supported; I
depend on those in some of my own code. As programmers in C-like
languages know, numerical analysis code is not particularly readable in
a language where COMPLEX is not a scalar data type.
The main reason why I have not evaluated either of the above is that
neither of them has yet been ported to OS/2. I have to use Windows at
work - and there I use XDS Modula-2 plus a variety of C compilers - and
anyone who has had that experience will understand why I don't use
Windows except when I have no choice. I will seriously consider
switching to Linux when an objective-oriented desktop is available, but
for now I consider Linux to be seriously short of user-friendly
software. I do use Linux at work - it's pretty much the only available
platform for serious real-time engineering applications - but as a
development platform it's a huge pain in the posterior.
Here are the shareware or free
Modula-2 compilers that I know about
DOS (including Windows) or Linux. (Please contact me if you know about
others. Note that many pointers in this list are probably obsolete.)
General comment: these compilers are not up to the "turbo" quality that
PC users have come to expect. If you want a good user interface and/or
features then you'll have to pay real money.
I've checked this one out, and it's reasonably good. Registration
(Access problem. It looks as if QUT has classified this as
"confidential" - a growing problem now that the Australian government
is trying to suppress the distribution of research and
scholarship results). I've checked
this only superficially, so can't
comment on quality. There was also a copy at
ftp.psg.com (Error response. Faulty web server?). I think
the DOS and OS/2 versions are free.
- Mocka (Modula Compiler
Karlsruhe). The PC version is free, but
requires Linux or 386BSD as a prerequisite. (I've never used this,
but the people who do use it seem to like it.) Copies are available
A related product, also free
for research/educational purposes:
M2 project was an initiative by
group of volunteers to create a freeware Modula-2 compiler. The project
to be in a state of suspended animation.
- Modula-2*, an extension of
Modula-2 for parallel programming.
Supported on several platforms, but it does have Unix as a
prerequisite. Check this
(broken link, so perhaps the project has been ordered to be killed) for further details.
(This list is probably incomplete - I'd welcome feedback from other
people.) If you're having trouble finding any of these, check this list
- FTL: Now defunct, as far as
I know, but there are probably still
copies floating around. I used to use it, and was very happy with the
quality, but decided to drop it because of software portability
- TopSpeed. For DOS
programming this is my personal favourite, but
the new owners seem to have lost interest in selling it. As far as I
know, the only way to get this compiler is to find a reseller who has
- Logitech: I can't comment
on this, it's years since I last used
- OM2 for DOS/Windows from
ModulaWare: I know nothing about this
one, other than that it's for both Modula-2 & Oberon-2.
- Stony Brook: no comment,
I've never tried it.
Oberon-2 compilers for a variety of
platforms. I use the OS/2 version and rate it very highly. The Windows
version has an inferior IDE, but is otherwise of good
checked out the Linux version.
Check the list of suppliers,
or look here
for more general information.
This information was compiled
Last modified 22 March 2010.