Discussion:
Standard Libraries
(too old to reply)
Paul Richards
2021-02-06 00:46:38 UTC
Permalink
Is there anywhere a comparison chart showing the extent to which various
compilers adhere to Wirth's standard (PIM), ISO standard and any
extensions provided?

Am interested in respect of Topspeed Modula, Logitech Modula, XDS Modula
and ADW (Stony Brook) Modula.

Paul
Fruttenboel
2021-02-06 10:02:46 UTC
Permalink
Post by Paul Richards
Is there anywhere a comparison chart showing the extent to which various
compilers adhere to Wirth's standard (PIM), ISO standard and any
extensions provided?
Am interested in respect of Topspeed Modula, Logitech Modula, XDS Modula
and ADW (Stony Brook) Modula.
Paul
Don't count on it. M2 lived long before the american version of internet.

This answers all your questions: https://en.wikipedia.org/wiki/Modula-2

And people used to say, back then : "ISO killed Modula" but that was not entirely true. Wirth killed Modula-2 around 1985 because he moved on towards Oberon and Ceres. Get yourself a copy of "The school of Niklaus Wirth".
To Wirth, Modula-2 and Oberon were just vehicles to teach programming, the same as Minix was for AST.
People used Modula because they liked the language, not for the tons of ready made libraries. Although the language was designed around the portability of modules through code re-usal... Too many people who jumped the C/C++ bandwagons.
Martin Brown
2021-02-06 17:47:54 UTC
Permalink
Post by Paul Richards
Is there anywhere a comparison chart showing the extent to which various
compilers adhere to Wirth's standard (PIM), ISO standard and any
extensions provided?
Am interested in respect of Topspeed Modula, Logitech Modula, XDS Modula
and ADW (Stony Brook) Modula.
Depends what you want to do. If you have the full sourcecode of any of
them then you can compile it for one of the others. The exceptions are
deep levels of SYSTEM and bit twiddling where each had its own way.

Topspeed by default S/InOut/IO/ and S/Read/Rd/, S/Write/Wr/
Capable of inline assembler or DIY ASM modules.
Allowed some structured array constants.

Logitech was pretty close to PIM3. Inline ASM as hex constants!
Hardest one to port to unless PIM3 adherence was very good.

XDS M2 was PIM/ISO with some extensions to compile TopSpeed code.
ISTR you had to download separate ancillary libraries.

SB was I think like Logitech but maybe allowed some extensions where
array constants were concerned. ISTR Came with an M2 Chess program which
played rather badly. I ported it to TS and XDS a long while back.

The only one I still use occasionally now is XDS. I mislaid TS.EXE
somewhere along various changes of computer and international moves.

From recollections of a long time ago so subject to memory errors.
--
Regards,
Martin Brown
Paul Richards
2021-02-07 23:41:04 UTC
Permalink
Post by Martin Brown
Post by Paul Richards
Is there anywhere a comparison chart showing the extent to which
various compilers adhere to Wirth's standard (PIM), ISO standard and
any extensions provided?
Am interested in respect of Topspeed Modula, Logitech Modula, XDS
Modula and ADW (Stony Brook) Modula.
Depends what you want to do. If you have the full sourcecode of any of
them then you can compile it for one of the others. The exceptions are
deep levels of SYSTEM and bit twiddling where each had its own way.
Topspeed by default S/InOut/IO/ and S/Read/Rd/, S/Write/Wr/
Capable of inline assembler or DIY ASM modules.
Allowed some structured array constants.
Logitech was pretty close to PIM3. Inline ASM as hex constants!
Hardest one to port to unless PIM3 adherence was very good.
XDS M2 was PIM/ISO with some extensions to compile TopSpeed code.
ISTR you had to download separate ancillary libraries.
SB was I think like Logitech but maybe allowed some extensions where
array constants were concerned. ISTR Came with an M2 Chess program which
played rather badly. I ported it to TS and XDS a long while back.
The only one I still use occasionally now is XDS. I mislaid TS.EXE
somewhere along various changes of computer and international moves.
From recollections of a long time ago so subject to memory errors.
Thanks Martin. That's a very useful summary.

Paul

Edward De Jong
2021-02-07 22:56:29 UTC
Permalink
As the author one of the largest programs ever written in Modula-2, (Flying Colors paint program, Discus labeler), the differences between ADW Modula-2 (for Win) and the P1 Modula 2 (for Mac), are fairly minor, but still requiring a conversion program to equalize.

The key differences were in whether the SYSTEM name had to be imported or not to use a system function, and most importantly in how the compiler pragmas to turn on and off range checking were notated. Conditional compilation was not in the standard, so that varied between versions as well. Overall it was a 99% match, but in a large enough program you had to use a translator program that would massage the code from one version to the other.

Luckily M2 is a very simple language, and it was quite workable. The ADW compiler with its own auto build system was particularly good, and extremely fast. M2 beats the pants off of C ,and it is a tragedy that so few companies adopted M2, when C is full of hazards.
Loading...