Mad

From Rosetta Code
Mad is an implementation of MAD. Other implementations of MAD.

mad is a modern-day implementation of MAD written by Eric S. Raymond. It transpiles the MAD code into C, and then uses the local C compiler to compile it into an executable.

It is not entirely faithful to the original: it does not enforce the strict punch card format of the original in either the code or the program I/O, nor does it enforce the 6-character limit on variable names or the 72-character limit on source code lines. Floating point variables use the modern system's native floating point format, not the IBM 704's format. Furthermore, some advanced features (such as multiple entry points to subroutines) are missing. However, the implementation is sufficiently close to the original to compile and run all the examples given in the manual.

The distribution also contains the original MAD manual, as well as a couple of test programs and an old version of RUNOFF.