]> thyrsus.com Git - mad.git/commitdiff
Index up to Function Entry.
authorEric S. Raymond <esr@thyrsus,com>
Mon, 28 Jun 2004 02:51:52 +0000 (02:51 +0000)
committerEric S. Raymond <esr@thyrsus,com>
Mon, 28 Jun 2004 02:51:52 +0000 (02:51 +0000)
doc/mad-manual.xml

index c65726d9f5913877d0ffc8691bc52554f4129479..0464fcd3c85d95d0966760d62377f9daea047227 100644 (file)
@@ -614,7 +614,8 @@ a<subscript>j</subscript>; otherwise, go on.</para>
 </step>
 </procedure>
 
-<para>This may be illustrated by following "flow diagram":</para>
+<para>This may be illustrated by following "flow diagram":
+<indexterm><primary>Flow Diagram</primary></indexterm></para>
 
 <mediaobject>
   <imageobject>
@@ -990,7 +991,7 @@ again if |f(x)| &ge; &epsi;.  Otherwise, (i.e., |f(x)| &lt;
 values of a, x and &epsi; to be printed.  The arrangement and form
 of the numbers on the printed page are controlled by the
 format description which is the value of the vector named
-ALPHA.</para></listitem>
+ALPHA.<indexterm><primary>Format</primary></indexterm></para></listitem>
 
 <listitem><para>The TRANSFER statement following causes the statement
 labelled ST to be the next one performed.</para></listitem>
@@ -1575,7 +1576,7 @@ point before adding.  Likewise, in the next step,
 <!-- beginpage II.9 -->
 the integer T<subscript>2</subscript> will be converted to floating
 point before adding to the floating point number.
-<indexterm><primary>Floating Point Subscript</primary></indexterm></para>
+<indexterm><primary>Floating Point Subscripts</primary></indexterm></para>
 
 <para>In other words, although the mode of the expression is floating
 point because of the presence of the floating point variable Y, some
@@ -2195,6 +2196,8 @@ be the output of this function considered as a single valued function.
 </sect2>
 <sect2><title>Entry to a function</title>
 
+<indexterm><primary>Function Entry</primary></indexterm>
+
 <para>Entry points to a function being defined are indicated by</para>
 
 <programlisting>
@@ -2302,6 +2305,8 @@ reference to "TAPE" or "DRUM" it is advisable to read the sections of
 the IBM 704 Reference Manual which describes the operation of these
 units (See <emphasis>Restrictions</emphasis> below).</para>
 
+<indexterm><primary>Format</primary></indexterm>
+
 <variablelist>
 <varlistentry>
 <term>(a) PRINT FORMAT &scriptF;, &scriptL;</term>
@@ -2453,6 +2458,8 @@ cancels the previous one.</para>
 <sect2 id='format_specs'><title>Format Specifications</title>
 <!-- in the original this title, unlike other sect2s, was all-capsed -->
 
+<indexterm><primary>Format</primary></indexterm>
+
 <para>When information is read from (or punched in) a card into (or
 from) a computer, it is necessary to know how this information has
 been allocated among the available columns of the card.  Similarly,
@@ -3392,6 +3399,8 @@ identical in all sections of the program.</para>
 </sect2>
 <sect2 id='funcdefs'><title>Function Definitions</title>
 
+<indexterm><primary>Function Definition</primary></indexterm>
+
 <!-- the xrefs here were in the form "subsection 3.8.x" in the original -->
 
 <para>There are two main types of functions: The <emphasis> internal
@@ -3525,6 +3534,8 @@ ZQ = SIN.(J * Y).P.(M + 1) - Y/XBAR + COS.(J*Z).P.(M-1)-Z/XBAR.
 
 </sect3>
 <sect3 id='internal_and_external'><title>Internal and External Functions</title>
+<indexterm><primary>Function Definition</primary></indexterm>
+
 <para>Each function definition (except single statement definitions
 described in <xref linkend='internal_functions'/>) may define any
 number of functions and/or any number of procedures.  Within one
@@ -3541,7 +3552,8 @@ have exactly the same outputs and the same inputs, they would require
 separate declarations.</para>
 
 <para>In the <emphasis>use</emphasis> of a function (i.e., the
-<emphasis> call </emphasis> for it) the arguments may be constants,
+<emphasis>call</emphasis><indexterm><primary>Function
+Call</primary></indexterm> for it) the arguments may be constants,
 variables, or expressions.  However, if one of the arguments appears
 to the left of an "=" sign <indexterm><primary>Equals
 Sign</primary></indexterm> in a substitution statement in the defining
@@ -3579,27 +3591,30 @@ END OF FUNCTION
 <para>The first statement (INTERNAL FUNCTION (X)) is a function
 declaration (i.e., <emphasis>declares</emphasis> that the following
 statements define a function).  
-<!-- erroneously refrred to II.44  -->
+<!-- erroneously referred to II.44  -->
 <indexterm><primary>EXTERNAL FUNCTION</primary></indexterm>
 If this is defining an external function, the declaration would be
 EXTERNAL FUNCTION (X).  Following the words INTERNAL (or EXTERNAL)
 FUNCTION is the dummy variable list ((X) in this example).  The END OF
 FUNCTION declaration is the last statement in the function definition
-program.  (In an external <!-- beginpage II.46 --> function definition
-this is also the last statement in the program.)  An entry must
-provided for each function being defined, but several functions may
-share any number of FUNCTION RETURN statements.  An entry statement
-merely marks a point of entry, and does not effect the sequence of
-computation in any way.  The expression after the word "RETURN"
-indicates that on this return the value of the function is to be the
-value of that expression. This expression must agree in mode with the
-function whose value it supplies; this agreement is not checked.  The
-definitions of functions whose calls are intended to be included in
-expressions must have an expression following the FUNCTION RETURN
-statement.  If the calls for a function are to appear in an EXECUTE
-STATEMENT (generally such functions have multiple outputs) the
+program.  (In an external 
+
+<!-- beginpage II.46 --> 
+
+function definition this is also the last statement in the program.)
+An entry must provided for each function being defined, but several
+functions may share any number of FUNCTION RETURN statements.  An
+entry statement merely marks a point of entry, and does not effect the
+sequence of computation in any way.  The expression after the word
+"RETURN" indicates that on this return the value of the function is to
+be the value of that expression. This expression must agree in mode
+with the function whose value it supplies; this agreement is not
+checked.  The definitions of functions whose calls are intended to be
+included in expressions must have an expression following the FUNCTION
+RETURN statement.  If the calls for a function are to appear in an
+EXECUTE STATEMENT (generally such functions have multiple outputs) the
 FUNCTION RETURN statement may appear without an accompanying
-expression.</para>
+expression.<indexterm><primary>Function Call</primary></indexterm></para>
 
 <para>An example of a definition for procedures is as follows:</para>
 
@@ -3657,6 +3672,8 @@ itself (the statements between statement A and statement B), a
 function name will usually occur with arguments, and an array variable
 will usually occur with subscripts.</para>
 
+<indexterm><primary>Function Definition</primary></indexterm>
+
 <para>A few comments about the last example.  This definition program
 defines a single-valued function of X, called INVSF..  Since no mode
 declaration is given it is assumed by the translator that X is
@@ -3761,7 +3778,8 @@ They have all been tested on the computer, however, and are
 correct.</para>
 
 <para>The flow chart notation used here varies somewhat from the
-illustrations of Chapter 1.  The variation is consistent with present
+illustrations of Chapter 1.<indexterm><primary>Flow
+Diagram</primary></indexterm> The variation is consistent with present
 computing practice where many individualistic forms are encountered
 and, moreover, causes no difficulty due to the essentially graphic
 nature of charts.  In particular, iterations are present by the
@@ -4104,7 +4122,7 @@ matrix A = (a<subscript>ij</subscript>).</para>
 a<subscript>ji</subscript>.  We shall inter&shy;change
 symmetrically-placed pairs of elements, leaving untouched elements on
 the main diagonal. The program will be in the form of an external
-function.</para>
+function.<indexterm><primary>Function Definition</primary></indexterm></para>
 
 <para><emphasis>Flow diagram:</emphasis></para>
 
@@ -6113,6 +6131,9 @@ example, if A is a 4 x 3 matrix (m = 4, n = 3) and b = 1, then V(1) =
 <indexterm><primary>Conditional, Simple</primary><see>Simple Conditional</see></indexterm>
 <indexterm><primary>Dummy Variables</primary><see>Dummy Arguments</see></indexterm>
 <indexterm><primary>Error Detection</primary><see>Diagnostics</see></indexterm>
+<indexterm><primary>FOR</primary><see>Iteration Statement</see></indexterm>
+<indexterm><primary>FOR VALUES OF</primary><see>Iteration Statement</see></indexterm>
+<indexterm><primary>Function Arguments</primary><see>Arguments of Functions</see></indexterm>
 
 <index/>
 </appendix>