Compilers Tutorials/Papers Libs/Sources Newsgroups FAQ Forums/Lists
GNU Modula-2 Modula-2 CGI Tutorial Howto Setup a Fine Modula-2 Environment Programming with Modula-2 Misc. Modula-2 Related Pages Not-English Modula-2 Pages Downloads Please Sign My Guestbook Code Search
Instead of writing a Modula-2 tutorial I decided to write this getting-started-guide - the turorial I started to write did not get closer to the thing I wanted it to be: simple and illustrated by good examples (as I'm not a programmer I haven't reached the necessary knowledge and "abstract thinking"). So here is a result of stepping back...
One of the Modula-2-problems is the lack of interfaces provided for common programming tasks. The compilers implemented in the 80s and 90s are in most cases somehow "minimal" tools for the commandline. But some people wrote stuff that makes Modula-2 a really usable language. If you are searching for information on some special 'problem-field' read on.
No matter if we like it or not, Windows in all its more or less weak implementations is the most used operating system. So the main problem of every language available is an interface to the API of Windows. There are two commercially sold compilers providing this interface (XDS and StonyBrook), the only free one I know of is the personal edition of XDS-Modula-2 (free for non-commercial use!). Download the package from Excelsior and have a look at the examples for getting started. If this is not enough information, have a look at the Translations of Example Programs in Charles Petzold's book "Programming Windows 95" from Visual C++ to Modula-2. This helps a lot and it is almost all the information you can get. For german-speaking people there is another great resource that can be found at the University of Graz (Austria): this is a tutorial on programming Windows with Modula-2 containing simple examples and a basic introduction to the concepts of Windows. Used compiler is XDS-Modula-2. For more complex examples have a look at the Sources Store for Modula-2 and Oberon. You may download a RichEdit-package, an ODBC-interface and some other really interesting material there.
Mister Shigeo Hayashi also translated some example programs from a Windows-book to Modula-2. Useful.
The Modula-2 FAQ contains the following information in section 4:
4.11 Is there an applications framework for Windows programming?
A. Try looking at
ftp://ftp.ifi.uio.no/pub/sjr/m2afx.zip or
ftp://ftp.leo.org/pub/comp/os/windows/win3.11/programming/modula/m2afx.zip
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.
But "this software will only work on the TopSpeed Modula-2 compiler version 3.00 and later" as it uses the object-oriented extensions of this compiler. maybe the code is interesting / helps with understanding.
BSD-sockets (and the winsock-api) are something like a standard for programming the internet (not only: the concept is to standardize interprocess communication). nearly every modern programming language gives you the possibility to use sockets, where opening a socket is like opening something like an endpoint for an abstract communications-channel. There are some good introductions related to this subject available - for a start have a look at the quick and dirty primer for bsd-sockets and the winsock-primer by Jim Frost. These short introductions also provide links to get in deeper. Best tutorial (basics and some advanced topics) I found is Beej's Guide to Network Programming Using Internet Sockets.
Sockets and Modula-2:
This paragraph is under construction. It will concentrate on Modula-2 and GNAT (ftp). Please tell me if you've ever used these compilers together.
If you are searching for information on how to migrate from Modula-2 to Ada95, you may want to have a look at section compilers -> translators. You can find some information on translating M-2 to Ada when following the link provided there.