Path: senator-bedfellow.mit.edu!dreaderd!not-for-mail
Message-ID: <computer-lang/Modula2-faq/
[email protected]>
Supersedes: <computer-lang/Modula2-faq/
[email protected]>
Expires: 3 Jul 2009 04:13:03 GMT
X-Last-Updated: 2009/05/13
Organization: none
Newsgroups: comp.lang.modula2,comp.answers,news.answers
From:
[email protected] (Rick Sutcliffe, Modula-2 FAQ maintainer)
Subject: Modula-2 FAQ/part1
Followup-To: comp.lang.modula2
Distribution: world
Approved:
[email protected]
Keywords: languages, Modula-2, ISO, OO, Generics, programming
Summary: This file contains the answers to some commonly asked questions
about the programming language Modula-2.
Originator:
[email protected]
Date: 20 May 2009 04:13:11 GMT
Lines: 880
NNTP-Posting-Host: penguin-lust.mit.edu
X-Trace: 1242792791 senator-bedfellow.mit.edu 309 18.181.0.29
Xref: senator-bedfellow.mit.edu comp.lang.modula2:22186 comp.answers:66527 news.answers:323048
Archive-name: computer-lang/Modula2-faq/part1
Version: 2.33
Last-modified: 2009 05 08
Posting-frequency: Monthly
Modula-2 Frequently Asked Questions
What is new in version 2.33 (2009 05 08)?
It's been two years and little has happened until quite recently, when a sp=
ate of corrections arrived. Some defunct sites are now no longer referenced=
here. Some miscellaneous comments have been inserted in a number of places=
and a few corrections made, including to some links that had moved.
The material that was at 4.6 on Modula-3 converters is defunct and 4.7-4.11=
have been renumbered. There is a new answer at 4.12 to a rather odd questi=
on on linkers. Section 1.11 has a new entry at A11. The murus entry under 4=
1.1 is new. The GCC version has moved. The Megamax Atari project has been =
reinstated with a new link. Objective Modula-2 is still alive, but has a ne=
w info site. The section at 1.17 has been reorganized to split the question=
A question on the iPhone has been added at 1.19.
The StonyBrook material has been rewritten to reflect its new owner. The re=
views section has been dropped as its material is defunct.
At some point in the not too distant future I plan to split the FAQ into tw=
o sections--one for current material, one for legacy info. All help is welc=
ome. I have not systematically checked for dead links at this point.
What was new in version 2.32 (2007 01 25)?
Invalid links pointed out have been removed.
The forum alternative to the Usenet news group at ArjayBB.com (section 2.2.=
1) has been removed. It wasn't being used, the connection was hard to maint=
ain, and bulletin boards get too much spam.
The summary section 3.3 has been revised and expanded to all major platform=
s. Note made that GPM does not run on solaris 10 but the ULM compiler does.=
Some information has been removed at the request of manufacturers, who wis=
h the only point of contact to be the web. One old spelling error corrected=
(thanks Keith) and the GPM http links corrected. The p1 section has been r=
evised to reflect new products. Under 1.11 (what is Modula-2 used for) answ=
ers have been expanded and a new section (A10) added. The MegaMax Atari pro=
duct has been removed as the links appear no longer functional. The MOCKA l=
inks have been altered and pruned. The GNU link was revised, and numerous s=
mall changes were made throughout.
SUMMARY:
1. Answers to many questions about Modula-2 as a programming notation may b=
e found in the shareware textbook. As always, users should pay the sharewar=
e fee. See section 1.4.
2. Answers to most other frequently asked questions about Modula-2 will be =
collected by Rick Sutcliffe at Trinity Western University and included in t=
his document from time to time as it is revised.
3. Submissions should be mailed to -- rsutc-AT-arjay.bc.ca(modify address i=
n the obvious way)
Anyone making a submission guarantees that they have the right to do so (co=
pyright holder, or information in the public domain.) and that the informat=
ion is not from any source whose copyright lies with another.
4. I will update this summary file and post to the newsgroups comp.lang.mod=
ula2 and to comp.answers and news.answers
5. The latest version will always be available in a Nisus (Mac) form in
http://www.arjay.bc.ca/Modula-2/m2faq.html.
CONTENTS:
Part 1
1. WHAT IS MODULA-2?
2. WHERE IS MODULA-2 DISCUSSED?
3. WHERE CAN I GET MODULA-2 COMPILERS?
Part 2
4. WHERE CAN I GET SOURCE CODE, OTHER INFO?
5. SPECIFIC QUESTIONS ON CODE AND ALGORITHMS
6. WHAT ARE SOME REFERENCE MATERIALS ON MODULA-2?
7. REVIEWS
Appendix: AUTHOR INFORMATION AND DISCLAIMERS
1. WHAT IS MODULA-2?
A. Modula-2 is a programming notation that corrects some of the deficiencie=
s of Pascal. It is suitable for learning programming, for large projects wr=
itten and maintained in the fashion of professional software engineers, and=
for real time embedded systems. Modula-2 is small, expressive, easy to lea=
rn, and to read.
1.1 Who developed Modula-2?
A. Modula-2 was developed by Niklaus Wirth at ETH in Zurich, Switzerland in=
the late 70's. Wirth also developed Algol-W, Pascal, Modula, and Oberon an=
d the Lilith computer, a natively Modula-2 machine (see section 1.15).
1.2 Where is this language described?
A. In Programming in Modula-2 3rd edition published by Springer-Verlag in 1=
985. For the purposes of distinguishing this from later variants, this desc=
ription will be referred to herein as classical Modula-2.
1.3 How do you pronounce Herr Wirth's name?
A. It is incorrect to call him by his value (worth.) Instead his name is ve=
art.
1.4 Can I get a simple introduction to ISO Modula-2?
Yes, the latest revised and corrected edition of the shareware text as of 2=
004 is at
http://www.modula-2.com/
Mirror (for the text, not the FAQ): TWU
http://www.csc.twu.ca/rsbook/index.=
html
1.5 How does Modula-2 fit into the language zoo?
A. It is a descendent of Pascal and Modula, and one predecessor of Modula-2=
+, Modula-2*, Modula-3, Oberon, Oberon-2, and various object oriented versi=
ons of these. The latter languages are not replacements for Modula-2, mere=
ly later notations in the same family, having strengths and weaknesses of t=
heir own. Modula-2 is sometimes classified with Ada and C as the trio of mo=
dern languages in view of their expressive power. Modula-2 is smaller and m=
ore readable than either.
1.6 What are the differences between Modula-2 and Standard Pascal?
A. Modula-2 has separately compiled library modules, and makes much less us=
e of blocks (begin...) than Standard Pascal. Identifiers are case sensitive=
; there is no goto label; and I/O is in libraries rather than built in. The=
IF statement is more versatile; and there are facilities for concurrent pr=
ogramming via coroutines. Extended Pascals may have some of these features.
1.7 What is ISO Standard Modula-2?
A. A committee of ISO JTC1/SC22/WG13 with delegates from several countries =
met from 1987 to work on a standard description of Modula-2 and a set of st=
andard library modules.
A2. The official home of the ISO Modula-2 working group WG13 is at http://s=
c22wg13.twi.tudelft.nl/
1.7.1 What is the status of ISO Standard Modula-2?
A. The international standard (IS 10514) was voted on and is official. The =
Object oriented extensions and Generic extensions were also voted on and ar=
e official.
1.7.2 Where can I get the Modula-2 standard?
A1. Contact your national standards body or ISO (the publisher.)
A2. For a slightly older version, try looking in
ftp://ftp.mathematik.uni-u=
lm.de/pub/soft/modula/standard/draft4/
1.7.3 What format is the standard document in?
A. Latex.
1.7.4 Who was the convenor of the standards group (WG13)?
A. Martin Schoenhacker of Vienna was the last convenor.
1.7.5 When was the last WG13 meeting?
A1. It was March 17-18 1997 in Linz, Austria. For more details, follow http=
://sc22wg13.twi.tudelft.nl/docs/meetings.html
1.7.6 When is the next WG13 meeting?
A1. No meeting is currently on the schedule. One may be held if necessary t=
o do routine maintenance on the standards, but at this time WG13 is in main=
tenance mode--not operating actively.
1.7.7 Will I be able to read the standard?
A1. The concrete syntax is written in a variation of EBNF (Extended Backus-=
Naur Formalism) and should be accessible to most.
A2. Much of the base document's details are written in VDM-SL (Vienna Devel=
opment Method - Specification Language) which is a formalism for giving a p=
recise definition of a programming language in a denotational style. It is =
worth learning VDM-SL if you plan to write a compiler or use formal methods=
to do any design work.
1.7.8 Can I at least get electronic copies of the definition modules?
A. Yes, in
ftp://FTP.twu.ca/pub/modula2/ISOLibraries/ISODEFMods/or ftp://ft=
p.mathematik.uni-ulm.de/pub/soft/modula/standard/libdefs/
1.7.9 Can I get ISO library code to port?
A. Yes, a partial ISO library is available from Rick Sutcliffe, the FAQ mai=
ntainer. He has done an ISO I/O library for the Mac, and StonyBrook ported =
this to their system. Anyone else is welcome to do a port provided: (1) TWU=
gets a license to the software produced (2) All code changes are marked an=
d submitted to Rick Sutcliffe for the benefit of anyone else who wants to d=
o a port.
1.7.10 Can I get copies of the grammar?
A1. Yes, in http:/www.arjay.bc.ca/Modula-2/Text /Appendices/Ap3.html
A2. For classical Modula-2, see also CocoCoco (section 4.9)
A3. There are nice syntax diagrams for classical Modula-2 in
http://cuiwww.=
unige.ch/db-research/Enseignement/analyseinfo/Modula2/BNFindex.html
and there are syntax diagrams for ISO Modula-2 stored at
http://www.arjay.bc.ca/Modula-2/Text/Appendices/Ap2.html
1.8 What difference is there between classical and ISO Modula-2?
A. ISO Modula-2 has resolved most of the ambiguities in classical Modula-2.=
It adds the data type COMPLEX and LONGCOMPLEX, exceptions, module terminat=
ion (FINALLY clause) and a complete standard I/O library. There are numerou=
s minor differences and clarifications.
1.8.1 What else has WG13 done?
A. WG13 has completed two additional standards (separate from the main one)=
for (a) object oriented Modula-2 and (b) generic programming facilities. O=
lder versions of the generics proposal are stored in the directory
ftp://FT=
P.twu.ca/pub/modula2/WG13/
1.9 What is (was) Turbo Modula-2
A. Borland prepared CP/M versions of Modula-2 and sold them for a time in E=
urope (also in North America via a distributer.) One of these versions late=
r migrated to become TopSpeed Modula-2.
1.10 What is (was) Top Speed Modula-2
See also 1.9. Eventually, Top Speed merged with Clarion, a maker of databas=
e products, who used Modula-2 as their DB language, and for a time sold Top=
Speed separately. Later still, this became SoftVelocity, but the Modula-2 =
compiler has vanished. A fuller history is available at
http://www.attryde.=
com/clarion/.
1.11 Where and for what is Modula-2 used?
A1. Modula-2 is widely used for teaching the fundamentals of sound programm=
ing techniques, data structures, and software engineering in many parts of =
the world. It has been the language of choice in much of Europe, though Jav=
a and C++ have made great inroads. Modula-2 has features that make it super=
ior to other languages for large projects and for programming and real time=
controllers.
A2.Here is a reply by Andrew Trevorrow (
[email protected]) who is the author of =
several Macintosh programs written in p1 Modula-2: OzTex (standard Tex impl=
ementation on the Mac) X-Words (a meta-Scrabble word game), Anagrams (a fas=
t and friendly anagram generator), LifeLab (a software laboratory for 2D ce=
llular automata, Googolator (an arbitrary-precision calculator, X-Words Del=
uxe (a meta-Scrabble-like game), and CrossCards (a combination of Scrabble =
and Poker.) His home page is:
http://www.trevorrow.com/
"Back in 92-93 I worked for the Australian National Uni's Research School o=
f Earth Sciences writing Noble, a large suite of programs to control mass s=
pectrometers and analyze all the data. Everything was written in Modula-2 (=
the only reason I took the job!).
In fact, one of the reasons I decided to try making a living from shareware=
was so that I could keep using Modula-2."
A3. General Motors and its subsidiary Delco have done their programming in =
General Motors Modula-2. Up to a point, all GM car computers were programme=
d in this language, though the keeper of the FAQ is unable to confirm that =
this is still the case.
A4. Here is a message sent in by a maker of test equipment:
Our BoardWizard range of test equipment has compilers,pseudo-code interpret=
ers and a complete test operating system written in M2. The code was writte=
n for one tester in 1987 and has been maintained from that date to the pres=
ent. New tester models have added and new interface and UI code has been wr=
itten, indeed sections have been completely re-written but much of the core=
test logic is untouched since about 1990 when I shifted to management. Muc=
h of the code is unknown to those who maintain it - yet when i look at it a=
fter several years I can still explain it to others even though comments ar=
e sparse. I believe that that is the hallmark of a great programming langua=
ge. (Emphasis added.)
Dave Appleton,
Technical Manager
Goldtron Technologies Tel : (065)-870-9886
(Ex- Proteq Technologies) Fax: (065)-777-2118
26 Ayer Rajah Crescent #07-01 www:
http://www.proteq.com.sg
Singapore 139944
A5. Here is an answer sent in by a developer:
Magic Mouse Productions
12615 Sir Francis Drake Blvd.
Inverness, CA 94937 USA
1-415-669-7010
http://www.magicmouse.com
The following products were made using Modula-2. The programs are all about=
100,000 lines long, and 99% Modula-2, with about 1% assembler code for per=
formance in critical areas.
Flying Colors 2, Anime Designer DragonBall, Action Designer Ultraman, T=
amagotchi
Sketch, Curious George Paint and Print Set -- all paint and creativ=
ity programs.
Gorgeous Mail -- a new years card making program
JuniorNet web activities -- various creativity activities for JuniorNet=
web subscription service
Discus -- CD label making program
Web Workshop Deluxe -- Web site design product
A5A. Here is a later rant sent in by the same person.
We make commercial software using Modula-2, and have been doing so since th=
e first appearance of the Logitech "Multiscope" compiler about 17 years ago=
, and about a million lines later we are still using Modula-2 to great effe=
ct.
I am proud to announce that Web Workshop Pro, a kids website editor, is abo=
ut to go "golden" and be released to the public. The program, written in 98=
% Modula-2 (with a small assembler section), is reliable, fast, and very ef=
ficiently coded. An almost identical product in feature set and user interf=
ace style (but not as good) called Site Central was written in C, and is 4 =
times larger in executable. There is no better way to compare languages tha=
n to see two similar products implemented in the same environment (macintos=
h + windows), and see the result.
We use the excellent StonyBrook compiler (a fully integrated development en=
vironment) for Windows (it still works!), and the wonderful p1 compiler und=
er the Macintosh MPW development environment (ed. note: now available in XC=
ode; MPW is defunct).
We have a porting tool that converts between the two compilers, although re=
cent improvements to the StonyBrook compiler make it almost possible to hav=
e identical source code.
We have implemented a quickdraw emulation layer for windows which allows pr=
ograms to run identically between macintosh and windows platforms. This ver=
y layer eluded a very large company years ago, and is crucial to having a s=
ingle code base that operates on the mac and windows in an identical manner=