<para>Punched-card input also explains some syntactic features that
will seem strange to modern eyes. MAD statement labels lack a
delimiter like C's trailing colon because they were distinguished by
-position (columns 1 to 7) on the card. The line continuation syntax,
-a digit in column 10, also relies on character position. In the late
+position (columns 1 to 10) on the card. The line continuation syntax,
+a digit in column 11, also relies on character position. In the late
1960s and 1970s, when punched cards coexisted with interactive
timesharing, the term <quote>free-format</quote> was commonly used to
describe languages with the newer-style syntax that used
<para>There are some significant respects in which MAD was actually
rather advanced for its period. The multiline WHENEVER statement
anticipated the free-format syntax of ALGOL 60 and its descendants,
-including Pascal and C.</para>
-
+including Pascal and C. The DEFINE statement, which supports
+syntactic extension of the language, was an interesting experiment
+not emulated in most later designs.</para>
+
+<para>In most of the respects we've described, however, MAD is very
+typical of its time. This will become apparent from a look at the
+Retrocomputing Museum implementation of CORC/CUPL, which is rather
+similar (though less powerful). This entire family of languages
+became extinct in the 1970s, snuffed out like dinosaurs by the
+meteoritic impact of time-shared computing and teletypewriter-like
+interactive terminals.</para>
</sect1>
<sect1><title>How This Implementation Differs From The Original MAD</title>
code into compileable C. It has been tested on the examples in the
manual, which are included with the distribution.</para>
-<para>This implementation simulates the card format of the original by
-reserving the first 8 character positions of each line for a either a label
-field or continuation. Whether or not a label field is empty, it
-must be followed by a tab, and the statement proper begins following the
-tab. Continuation lines must begin with either 8 spaces or 7 spaces
-followed by a digit (which is ignored).</para>
-
<para>Card images are read from standard input and printing is to
standard output. Printer control codes +, 1, 2 and 4 are ignored
(treated as 0 or space). Tape and drum devices are not
fact that typewriters of the period did not have a separate 0 key.
This distinction has been restored.</para>
+<para>Some program listings in the original were missing continuation
+punches required by the language. These have been corrected, and the
+corrections noted in XML coments.</para>
+
<para>In the original, the description of flowcharting conventions
in Chapter 1 include small hand-drawn geometrical shapes after each
of the items A, B, and the words "diamonds" and "rectangles" in item
<para>Special characters like white square (□), back arrow
(←), and the Greek letters were hand-drawn in the original
(except for the capital thetas, which were typed capital Os with bars
-hand-drawn across them). Several other special characters represent
-hand-drawn script characters:</para>
+hand-drawn across them). The original also some contained hand-drawn
+script characters:</para>
<informaltable>
<tgroup cols='2'>
<para>Footnotes were tagged with asterisks in the original rather than
being numbered. Section references to section numbers have been
-replaced with xref tags; as a result, they may render slightly
-differently than in the original. Notably, "section 1.1" becomes
-"Section 1.11" (capitalized) and expressions like "sections 1.1.4 and
-3.2" become "Section 1.1.4 and Section 3.2". We discovered while
-transcribing that Chapter 1 must have been added at the last minute,
-because references to Chapter 2 in the original had the form 1.x rather
-than 2.x.</para>
+replaced with xref tags in order to generate hyperlinks in the HTML
+rendering; as a result, they may render slightly differently than in
+the original. Notably, "section 1.1" becomes "Section 1.11"
+(capitalized) and expressions like "sections 1.1.4 and 3.2" become
+"Section 1.1.4 and Section 3.2". We discovered while transcribing
+that Chapter 1 must have been added at the last minute, because
+references to Chapter 2 in the original had the form 1.x rather than
+2.x.</para>
<para>EPSLON and COMPLX and the like are not typos. As pointed out
earlier, MAD variable names are limited to the 6 characters in a
six-bit character set that would fit in the IBM 709's 36-bit
word.</para>
-<para>A few typos in the original have been fixed. If you're really
-curious, comments in the XML source describe them.</para>
+<para>A few typos in the original have been fixed; if you're really
+curious, comments in the XML source describe them. Variant spellings
+such as <quote>imbedded</wquote> have vbeen preserved.</para>
<para>The original was not continuously page-numbered. Instead the
pages were numbered within each chapter with the chapter number as
a prefix; thus, page 6 of Chapter I was I.6.</para>
+<para>In the Retrocomputing Museum implementation, statement boundaries
+are detected by a preprocessing stage that places a marker before
+every newline and then detects and erases markers that precede
+whitespace followed by a continuation digit punch. This is strictly
+conformant with the manual says in text, but some of the listings in
+the manual lacked continuation punches that would be needed under this
+rule. Either these were transcription error, or the original parser
+had an undocumented capability to detect most continued statements
+automatically. We have assumed the former and restored needed
+continuation punches in several listings.</para>
+
</sect1>
</preface>
<preface><title>The Michigan Algorithm Decoder</title>
</mediaobject>
<!-- beginpage -->
+<!--
+the listing in the original was defective, missing continuation
+punches everywhere but in INTERNAL FUNCTION F.
+-->
<programlisting>
&newton2;
</programlisting>
<sect2><title>Function return</title>
<programlisting>
-FUNCTION RETURN ℳ
+FUNCTION RETURN &scriptN;
</programlisting>
<para>This statement is used in a function definition to indicate a
-return to the calling program. ℳ is an expression whose value is to
+return to the calling program. &scriptN; is an expression whose value is to
be the output of this function considered as a single valued function.
-ℳ need not be specified if outputs are specified in the argument list
+&scriptN; need not be specified if outputs are specified in the argument list
(see section 3.8).</para>
</sect2>
<para>Entry points to a function being defined are indicated by</para>
<programlisting>
-ENTRY TO ℳ
+ENTRY TO &scriptN;
</programlisting>
-<para>where ℳ is the name of this entry (see section 3.8).</para>
+<para>where &scriptN; is the name of this entry (see section 3.8).</para>
</sect2>
<sect2><title>List Manipulation Statements</title>