]> thyrsus.com Git - mad.git/commitdiff
Index up to "Scope".
authorEric S. Raymond <esr@thyrsus,com>
Tue, 29 Jun 2004 05:25:56 +0000 (05:25 +0000)
committerEric S. Raymond <esr@thyrsus,com>
Tue, 29 Jun 2004 05:25:56 +0000 (05:25 +0000)
doc/mad-manual.xml

index 330bfeb39e431cd4803601892e3376767718f99b..e2f69baaad2a282e6f93c07c8303853e4a771b17 100644 (file)
@@ -787,15 +787,17 @@ modification and counting.  The reason for this is that integer
 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 &times; 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 &lt; 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 &times;
+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 &lt;
+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>
 
@@ -1935,7 +1937,8 @@ label of the last executable statement in the block to be repeated.
 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
@@ -2103,6 +2106,7 @@ themselves, be iteration statements.  However, if iteration statement
 <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;
@@ -2319,6 +2323,9 @@ the currently designated temporary storage vector.</para>
 <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
@@ -2444,7 +2451,9 @@ address &scriptA; (where &scriptA; is an integer expression).</para>
 <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>
@@ -2855,6 +2864,8 @@ fields.  A "scale factor" may be applied to an <emphasis> F number
 <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
@@ -3118,6 +3129,8 @@ other statements.</para>
 
 <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
@@ -3896,6 +3909,8 @@ A(i<subscript>1</subscript>,...,i<subscript>n</subscript>).</para>
 <!-- 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
@@ -3919,6 +3934,8 @@ form:</para> <!-- yes, that's "present", not "represented" -->
 
 <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>
@@ -4419,6 +4436,9 @@ only as an example problem.</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 -->
@@ -4910,8 +4930,6 @@ character per word in W(1)...W(L).</para>
 <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>
@@ -4928,6 +4946,13 @@ using a THROUGH statement, <emphasis>instead the function will
 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>
@@ -5139,7 +5164,8 @@ MAD.</para>
 <para>Subroutines which are written for use by MAD programs&dd;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>&dd;must be relocatable
+instructions in symbolic form.</para></footnote><indexterm>
+<primary>SAP</primary></indexterm> &dd;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