arithmetic can be done more simply and efficiently, usually with less
round-off error, than arithmetic on non-integers. [Numbers which may
have fractional parts are usually written in the so-called "scientific
-notation", such as 3.1 × 10<superscript>-6</superscript> are
-called floating point numbers.] <indexterm><primary>Constants,
-Floating Point</primary></indexterm> Numbers are assumed to be in the
-floating-point mode unless otherwise declared, as in the INTEGER
-statement in the example. <indexterm><primary>INTEGER
-Statement</primary></indexterm> The WHENEVER statement above is to be
-interpreted in the sense: Whenever the following condition (in this
-case Z < a<subscript>j</subscript>) is satisfied, do the specified
-action (Z = a<subscript>j</subscript>), otherwise just go on.</para>
+notation", <indexterm><primary>Scientific
+Notation</primary></indexterm> such as 3.1 ×
+10<superscript>-6</superscript> are called floating point numbers.]
+<indexterm><primary>Constants, Floating Point</primary></indexterm>
+Numbers are assumed to be in the floating-point mode unless otherwise
+declared, as in the INTEGER statement in the example.
+<indexterm><primary>INTEGER Statement</primary></indexterm> The
+WHENEVER statement above is to be interpreted in the sense: Whenever
+the following condition (in this case Z <
+a<subscript>j</subscript>) is satisfied, do the specified action (Z =
+a<subscript>j</subscript>), otherwise just go on.</para>
<indexterm><primary>Floating Point</primary></indexterm>
The block of statements following (and not including) the THROUGH
statement, up to <emphasis>and including</emphasis> the statement
whose label is &scriptS;, will be called the "scope" of the THROUGH
-statement. Following the word OF appears the name of the iteration
+statement. <indexterm><primary>Scope</primary></indexterm>
+Following the word OF appears the name of the iteration
variable (in
<!-- beginpage II.14 -->
the illustration: V), which may be either an individual variable or
<emphasis>a</emphasis>, then the scope of <emphasis>b</emphasis> must
be entirely within the scope of <emphasis>a</emphasis>. The following
diagrams represent some valid configurations:</para>
+<indexterm><primary>Scope</primary></indexterm>
<!-- beginpage II.18 -->
&scope1;
<listitem>
<para>RESTORE DATA &scriptL;</para>
+<indexterm><primary>RESTORE DATA Statement</primary></indexterm>
+<indexterm><primary>RESTORE RETURN</primary></indexterm>
+
<para>&scriptL; is a list of single or subscripted variable names or
array segments of the type described in (b). If the list designates n
names (not necessarily n items in the list) the values of the last n
<varlistentry>
<term>(h) REWIND TAPE &scriptN;</term>
<listitem>
-<para>Rewinds tape &scriptN;.</para>
+<para>Rewinds tape &scriptN;.
+<indexterm><primary>REWIND TAPE Statement</primary></indexterm>
+</para>
</listitem>
</varlistentry>
<varlistentry>
<para role='centered'>Printed number = Internal number x
10<superscript>Scale factor</superscript></para>
+<indexterm><primary>Scale Factor (Format)</primary></indexterm>
+
<para>(where the scaling is accomplished before the conversion is
done). The "scale factor", followed by the letter
"P"<indexterm><primary>P Prefix (Format)</primary></indexterm> is
<sect2><title>Remark Declaration</title>
+<indexterm><primary>Remark Declaration</primary></indexterm>
+
<para>A remark declaration consists of any string of characters
acceptable to the computer. This statement is completely ignored by
the translator, and furnishes information to the reader of the
<!-- beginpage III.1 -->
<chapter><title>EXAMPLES</title>
+<indexterm><primary>Scientidic Examples</primary></indexterm>
+
<para>Note:The following illustrates how some programs may be writtten
in the MAD language. Since they were written to illustrate as many
features of the language as possible, they are not necessarily the
<indexterm><primary>Iteration Statement</primary></indexterm>
+<indexterm><primary>Scope</primary></indexterm>
+
<para>Here the scope of the iteration lies between the hexagonal box
and diamond box A, and the calculation proceeds from A when the stated
relation is true.</para>
<para><emphasis>The Program:</emphasis></para>
+<indexterm><primary>SAVE DATA</primary></indexterm>
+<indexterm><primary>SAVE RETURN</primary></indexterm>
+
<programlisting>
&jordan;
<!-- beginpage III.23 hust before VECTOR VALUES RESULT -->
<sect2><title><emphasis role='note'>Example 2: Compute the factorial function</emphasis></title>
<para><emphasis>Problem:</emphasis> Evaluate the recursive function,</para>
-<!-- not clear what this is referring to -->
-<indexterm><primary>List Manipulation</primary></indexterm>
<para role='centered'>f(0) = 1</para>
<para role='centered'>f(n) = f(n-1) * n</para>
illustrate</emphasis> how recursive functions can be
handl<emphasis>ed.</emphasis></para>
+<!-- These refer to statements in the example -->
+<indexterm><primary>List Manipulation</primary></indexterm>
+<indexterm><primary>RESTORE DATA Statement</primary></indexterm>
+<indexterm><primary>RESTORE RETURN</primary></indexterm>
+<indexterm><primary>SAVE DATA</primary></indexterm>
+<indexterm><primary>SAVE RETURN</primary></indexterm>
+
<programlisting>
&factfunc;
</programlisting>
<para>Subroutines which are written for use by MAD programsⅆwhether
written in MAD as functions or in SAP<footnote><para>SAP is the SHARE
Assembly Program which permits the writing of actual machine
-instructions in symbolic form.</para></footnote>ⅆmust be relocatable
+instructions in symbolic form.</para></footnote><indexterm>
+<primary>SAP</primary></indexterm> ⅆmust be relocatable
<indexterm><primary>Relocatable Binary Programs</primary></indexterm>
and must operate from the calling sequences the translator produces.
Consider, for example the function call - FN. (A,B,C) - which might