Google Groups Home
Help | Sign in
Modula-2 FAQ
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Rick Sutcliffe  
View profile
 More options Jun 16, 1:11 am
Newsgroups: comp.lang.modula2, comp.answers, news.answers
Followup-To: poster
From: Rick Sutcliffe <rs...@twu.ca>
Date: 16 Jun 2008 05:11:19 GMT
Local: Mon, Jun 16 2008 1:11 am
Subject: Modula-2 FAQ
Archive-name: computer-lang/Modula2-faq/part1
Version: 2.32
Last-modified: 2007 01 25
Posting-frequency: Monthly

                        Modula-2 Frequently Asked Questions

What is new in version 2.32 (2007 01 25)?
It's been a year and a half and there are few items to report.
Invalid links pointed out have been removed. Someday I'm going to
trim all the non-operative links, so I'd appreciate it if you would
let me know what's not working -- that is, if anyone is reading this.
The forum alternative to the Usenet news group at ArjayBB.com
(section 2.2.1) has been removed. It wasn't being used, the
conenction was hard to maintain, and bulletin boards get too much
spam.
The summary section 3.3 has been revised and expanded to all major
platforms. Note made that GPM does not run on spolaris 10 but the ULM
compiler does. Some information has been removed at the request of
manufacturers, who wish 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 revised to reflect new products.
Under 1.11 (what is Modula-2 used for) answers have been expanded and
a new section (A10) added. The MegaMax Atari product has been removed
as the links appear no longer functional. The MOCKA links have been
alrtered and pruned. The GNU link was revised, and numerous small
changes were made throughout.
What was new in version 22.31 (2005 09 09)?
WThis one has another revision of A8 under 1.11, a new use under A9
of the same section, and a revised comment on GM-M2 in A4 of that
section. I have also revised answers relating to the Mac to clarify
that older compilers support only Classic, not OS X. The BURKS
project at Brighton has become defunct, so all references to this
resource have been removed.

SUMMARY:
1. Answers to many questions about Modula-2 as a programming notation
may be found in the shareware textbook. As always, users should pay
the shareware 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 this document from time to time as it is revised.

3. Submissions should be mailed to -- rsutc-AT-arjay.bc.ca (modify
address in the obvious way)
Anyone making a submission guarantees that they have the right to do
so (copyright holder, or information in the public domain.) and that
the information is not from any source whose copyright lies with
another.

4. I will update this summary file and post to the newsgroups
comp.lang.modula2 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.
It is also available from the site rtfm.mit.edu in plain text form as
ftp://rtfm.mit.edu/pub/usenet-by-group/comp.answers/computer-lang/Mod...
and as
ftp://rtfm.mit.edu/pub/usenet-by-group/comp.answers/computer-lang/Mod...

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
deficiencies of Pascal. It is suitable for learning programming, for
large projects written and maintained in the fashion of professional
software engineers, and for real time embedded systems. Modula-2 is
small, expressive, easy to learn, 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 and 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 1985. For the purposes of distinguishing this from
later variants, this description 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 veart.

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 2004 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 versions of these. The latter languages are not replacements
for  Modula-2, merely later notations in the same family, having
strengths and weaknesses of their own. Modula-2 is sometimes
classified with Ada and C as the trio of modern languages in view of
their expressive power. Modula-2 is smaller and more 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 use 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 programming 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 after 1987 to work on a standard description of
Modula-2 and a set of standard library modules.

A2. The official home of the ISO Modula-2 working group WG13 is at
http://sc22wg13.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 are 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-ulm.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 to do routine maintenance on the standards, but at this
time WG13 is in maintenance 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
Development Method - Specification Language) which is a formalism for
giving a precise 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://ftp.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 maintainer. 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 and submitted to Rick Sutcliffe for the
benefit of anyone else who wants to do 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 Coco (section 4.9)
A3. There are nice syntax diagrams for classical Modula-2 in
http://cuiwww.unige.ch/db-research/Enseignement/analyseinfo/Modula2/B...
  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 termination (FINALLY clause) and a complete standard I/O
library. There are numerous 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. Older versions of the generics proposal are
stored in the directory ftp://FTP.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 Europe (also in North America via a distributer.) One of
these versions later 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
database 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
programming techniques, data structures, and software engineering in
many parts of the world. It has been the language of choice in much
of Europe, though Java and C++ have made great inroads. Modula-2 has
features that make it superior to other languages for
...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Modula-2 FAQ/part2" by Rick Sutcliffe
Rick Sutcliffe  
View profile
 More options Jun 16, 1:11 am
Newsgroups: comp.lang.modula2, comp.answers, news.answers
Followup-To: poster
From: Rick Sutcliffe <rs...@twu.ca>
Date: 16 Jun 2008 05:11:19 GMT
Local: Mon, Jun 16 2008 1:11 am
Subject: Modula-2 FAQ/part2
Archive-name: computer-lang/Modula2-faq/part2
Version: 2.32
Last-modified: 2007 01 25
Posting-frequency: Monthly

                  Modula-2 Frequently Asked Questions Part 2
4. WHERE CAN I GET SOURCE CODE, OTHER INFO?

4.1.1 Is there source or other info available on the net?
A. Here are some net sites I have accessed at one time or another. I
am not sure if all are still available or what is in them.
ftp://ftp.psg.com/pub/modula-2/
http://www.arjay.bc.ca/Modula-2/m2faq.html ( Home of this FAQ)
ftp://ftp.inf.ethz.ch/pub/
ftp://NIC.SWITCH.CH
ftp://ftp.mathematik.uni-ulm.de/pub/soft/modula/

WWW sites
http://dir.yahoo.com/Computers_and_Internet/Programming_and_Developme...

http://i44www.info.uni-karlsruhe.de/~modula

http://modula2.org

4.2 What other FAQs or lists of pages are available?
A1. http://dmoz.org/Computers/Programming/Languages/Modula-2/Compilers/
A2.http://murray.newcastle.edu.au/users/staff/peter/m2/Modula2.html
A3.http://www.unet.univie.ac.at/~a9406973/modula2/

4.3  Where can I find graphics libraries, etc?
A. Try the PMOS library for various platforms at one of the following sites:
   ftp://ftp.psg.com/pub/modula-2/code  (North America)
ftp://cs.ru.ac.za/pub/languages   (South Africa)
ftp://dutiba.twi.tudelft.nl/pub/modula2 (Western Europe)
ftp://ftp.cnit.nsu.ru/pub/msdos/programm.ing/modula2   (Eastern Europe).

4.4 Are there any mathematical libraries available?
A1. See Numerical Procedures in Modula-2 -- authorized translation of
Numerical recipes in Pascal from PolyWare (Klara Vancso):
kla...@telic.nl   (work) OR k.van...@tip.nl   (home) The CD-ROM has
the Modula-2 sources. See http://www.nr.com Note that sources given
in this book are of the "quick and dirty" variety and cannot be sold
as such, only in compiled form.

A2. LMathLib is a library that defines a number of mathematical
functions for Modula 2 programs. Unlike other libraries of the same
kind, LMathLib patches the Modula 2 compiler. All library functions
are inlined as assembler code for the Floating Point Unit. This
results in faster code compared to the traditional solution with
subroutine calls. Due to this machine dependent technique, you can
use the library ONLY with the (free) GMD Modula System Mocka for
Linux on INTEL based machines. You can get the LMathLib library via
anonymous ftp from
ftp://tee-1.tee.uni-essen.de/pub/Mocka/(132.252.131.33) Documentation
is included.

A3. MATHPAK 87/32 is available for most 32-bit compilers. A lite
version for Canterbury M2 is freely downloadable from
http://www.webcom.com/mhc/welcome.html
Features:
  Written fully in INTEL CPU machine language
   Math Coprocessor control
   Basic Math functions
   Vector and Vector-Scalar Routines
   Vector and Vector-Scalar 'Skip' Procedures
   Complex Number Routines
   Complex Vector and Vector-Scalar Routines
   Polynomial Manipulation Routines
   Simple Matrix and Vector-Matrix Routines
   Solving Systems of Linear and Nonlinear Equations
   Unconstrained Minimization
   Nonlinear Least-Squares Minimization
   Eigenvalues and Eigenvectors
   Singular Value Decomposition
   Extrapolation of Vector-Sequences
   Statistical and Data-Fitting Rountines
   Fourier Transforms and Convolution
   Spectral Analysis Routines
   Numerical Integration
   Differential Equations

4.5  Where can I get a Modula-2 to C converter?
A: The program mtc is available from
ftp://ftp.ira.uka.de/pub/programming/cocktail/mtc.tar.gz
ftp://ftp.Uni-Koeln.DE/usenet/comp.archives/languages/modula-2/mtc/
An already ported version for DOS+DJGPP can be found at
ftp://ftp.uni-stuttgart.de/pub/unix/programming/modula/
Several of the compilers available work or can work by producing C or
C++ code and can also serve this purpose. See p1, XDS and Ulm's m2c
(not the same as mtc) listings for examples.

4.6  Where can I get a Modula-2 to Modula-3 converter?
A. m2tom3 is available under the terms of the GNU Library General
Public License from
ftp://ftp-i3.informatik.rwth-aachen.de/pub/Modula-3-Contrib/m2tom3/
    m2tom3 is a system to port Modula-2 programs to Modula-3. It consists
of two parts:
  - A conversion program which tries to create a Modula-3 source text
    with the same semantics as the Modula-2 input while retaining the
    original look and feel as good as possible.
  - A base library which tries to emulate the Modula-2 standard library
    using the Modula-3 standard library.
   contact: Peter Klein
   office:  Ahornstrasse 55, 52074 Aachen, Germany
   e-mail:  p...@i3.informatik.rwth-aachen.de.
   Tel.: +49/241/80-21316
   Fax.: +49/241/8888-218

4.7  Where can I get a Modula-2 to Component Pascal converter?
A.This is available from http://www.lrz.de/~Bernhard_Treutwein/m2o.txt
Note: Component Pascal is an Oberon dialect, but the translator does
not use any CP specific features, i.e. generates standard Oberon-2.

4.8 Are there any Modula-2 applications around?
A. Besides the items mentioned in 1.11, the Idaho National
Engineering Laboratory (INEL) develops and maintains a now
  ~350,000 line MODULA-2 reusable component library called SAGE. For
more information on SAGE send E-Mail to hotl...@sage.inel.gov or see
the web site at http://sage.inel.gov/homepage.htm

4.9 Are there any compiler construction tools available?
A1. Some old ones appear in ftp://ftp.gmd.de/GMD/cocktail/

A2. Coco/R generates recursive descent parsers and their associated
scanners from attribute grammars. Full source code, and a variety of
simple example applications are supplied in the distribution kits.
The Modula versions (1.50 is the latest) are available from
ftp://ftp.ssw.uni-linz.ac.at/pub/Coco/  and the Java versions are
there too, at ftp://ftp.ssw.uni-linz.ac.at/pub/Coco/javacoco.htm
See also:
ftp://ftp.inf.ethz.ch:/pub/software/Coco
ftp://ftp.psg.com:/pub/modula-2/coco
ftp://cs.ru.ac.za:/pub/coco
ftp://ftp.fit.qut.edu.au:/pub/coco
There are versions for the MS-DOS compilers (JPI, FST, Logitech,
StonyBrook, Gardens Point), for the Mocka compiler for Linux and
FreeBSD, as well as for the Gardens Point Unix compilers, including
Linux and FreeBSD. There is also a version that produces TurboPascal
units very similar to the Modula-2 modules. This is also FreePascal
compliant now. A port for the p1 compiler on Mac OS 9 is also
available. Latest information is available at
http://cs.ru.ac.za/homes/cspt/cocor.htm. Pat Terry's textbook
"Compilers and Compiler Generators" that uses Coco/R is now online at
http://www.scifac.ru.ac.za/compilers

A2. A copy of the EBNF for ISO Modula-2 can be found in Appendix 3 of
the shareware text at:
http://www.modula-2.com

4.10 Is there an applications framework for Windows programming?
A. Try looking at
ftp://ftp.ifi.uio.no/pub/sjr/m2afx.zip
orftp://ftp.leo.org/pub/comp/platforms/pc/windows/programming/modula/m2...

This software is an application framework that implements a number of
classes that encapsulate the weirdness of the Windows C API and
attempts to present it in a cleaner way to the Modula-2 programmer.

4.11 Does there exist something to convert a C header file to a
Modula-2 DEFINITION MODULE file for me?
A. Try looking at the XDS Ltd site for the H2D freeware product on
some platforms

4.12 Where can I get the C code of a Modula-2 compiler?

A. Most Modula-2 compilers are written in Modula-2. It seems
rather strange to me that one would want to trust the compilation of a
good language to a tool written in a poor one.

4.13 What can I do with  old sources from Modula Corp?

A. From the former president Richard Ohran (ROh...@vinca.com):
"Modula Corp. is dead. Do whatever you like."

4.14 Are there source code examples anywhere for Windows programmers?

A. Translations of Example Programs in Charles Petzold's book
"Programming Windows 95" from Visual C++ to Stony Brook and XDS
Modula-2 by Peter Stadler, Vienna can be found at:
http://www.nhm-wien.ac.at/Petzold/Index.html

4.15 Isn't there a Modula-Prolog project somewhere?

A. Try ABB Corporate Research and Carlo Muller, who may license it to
you for non-commercial purposes. mailto:cadamul...@swissonline.ch

4.16 Is C. Lins SCL library available?

A. Yes, at

http://www.aha.ru/~uranus/download/scl.zip

4.17 Can you help me with my assignments?
A1. Some people may give you hints, but please do not subvert your
professor and your education by submitting work other people do for
you.

A2. Here are two answers submitted to the newsgroup in response to a
desperate student's plea for ANY Modula-2 program. The first is
rather prosaic; the second a little more imaginative:
MODULE homework;

IMPORT STextIO;

BEGIN
   LOOP
     STextIO.WriteString ("I will do my own homework.");
     STextIO.WriteLn;
   END;
END homework.

main()
{
     int i;

     for(i=0; i<!--&#60100; i++) 
         printf("I will do my own homework.\n");

}

  Followup Question: Is that Modula-2? I just finished my first course
in Modula-2 and that don't look at all familiar. I'm not looking
forward to the final exam.
  A. (Pat Terry) Computer Science changes sooo rapidly. Haven't you
discovered Modula-2++ yet?

5. SPECIFIC QUESTIONS ON CODE AND ALGORITHMS

5.0 Where can I get general information on algorithms?
A Try the site  http://www.cs.sunysb.edu/~algorith/

5.1 Where can I get an algorithm for an efficient random number generator?
A1. Pierre L'Ecuyer: Efficient and Portable Combined Random Number
Generators, Communications of the ACM, vol. 31, no. 6, pp. 742-749.
The RNG has a period of approximately 2.3E+18. Generating 1 000 000
numbers per second, that means that it would take over 73 000 years
before it repeated a sequence.

A2.Look in the PMOS library. This one uses the 'Minimal standard
random number generator' described by Park & Miller, CACM 31,10,Oct
88 p1192. The code has been checked for the 10001st random as
specified in Park & Miller p1195. One site is:
ftp://ftp.psg.com/pub/modula-2/code/random/

A3. A pseudo random generator ...

read more »


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google