]> thyrsus.com Git - mad.git/commitdiff
Stop trying to use fancy characters.
authorEric S. Raymond <esr@thyrsus,com>
Thu, 5 Feb 2004 22:43:50 +0000 (22:43 +0000)
committerEric S. Raymond <esr@thyrsus,com>
Thu, 5 Feb 2004 22:43:50 +0000 (22:43 +0000)
doc/mad-manual.xml

index 7f14057b4aef89eb705150db982efb24c8ade5a3..73548fe51cc9e817f93a79538f6af01a85490a23 100644 (file)
 <!ENTITY scope3 SYSTEM "scope3.xml">
 <!ENTITY scope4 SYSTEM "scope4.xml">
 
-<!ENTITY scriptA "&real;">   <!-- mapped to script R -->
-<!ENTITY scriptF "&bernou;"> <!-- mapped to script B -->
-<!ENTITY scriptL "&lagran;"> <!-- this is a script L -->
-<!ENTITY scriptN "&phmmat;"> <!-- mapped to script M -->
-<!ENTITY scriptS "&sgr;">    <!-- mapped to sigma -->
+<!ENTITY scriptA "<emphasis>A</emphasis>">
+<!ENTITY scriptF "<emphasis>B</emphasis>">
+<!ENTITY scriptL "<emphasis>L</emphasis>">
+<!ENTITY scriptN "<emphasis>M</emphasis>">
+<!ENTITY scriptS "<emphasis>S</emphasis>">
 <!-- also available; script H is &hamilt; -->
 ]>
 <book>
@@ -342,9 +342,9 @@ a<subscript>j</subscript>; otherwise, go on.</para>
 <para>Z is the answer.</para>
 </step>
 </procedure>
-       
+
 <para>This may be illustrated by following "flow diagram":</para>
-       
+
 <mediaobject>
   <imageobject>
     <imagedata fileref='fig1.png'/>
@@ -419,7 +419,7 @@ increasing it by the amount 3 after each time until either &alpha; >
 
 <para>We shall abbreviate this by the form:</para>
 
-<programlisting>       
+<programlisting>
 THROUGH BACK, FOR ALPHA = 12, 3 ALPHA .G. 90 .OR. .ABS. (X+Y) .LE. EPSLON
 </programlisting>
 
@@ -486,7 +486,7 @@ such as the loop, etc.  The input form of our example would be:</para>
 <programlisting>
 &min;
 </programlisting>
-       
+
 <para>The DIMENSION statement assigns a block of storage in the
 computer large enough to handle a<subscript>0</subscript>,
 a<subscript>1</subscript>, a<subscript>2</subscript>,
@@ -519,9 +519,9 @@ shorter expressions involving &lt;, &le;, =, &ne;, &gt;, and &ge;.
 For example, the following is a Boolean expression:</para>
 
 <programlisting>
-       ((x - 3)<superscript>3</superscript> &lt; y and i &le; j) or x &ge; 3
+((x - 3)<superscript>3</superscript> &lt; y and i &le; j) or x &ge; 3
 </programlisting>
-       
+
 <para>This will be "true" for some values of x and y, and "false" for
 others.  It might then occur in statements such as:</para>
 
@@ -529,7 +529,7 @@ others.  It might then occur in statements such as:</para>
 WHENEVER ((X - 3) .P. 3 .L. Y .AND. I .LE. J) .OR. X .GE. 3,
 TRANSFER TO AGAIN
 </programlisting>
-       
+
 <para>or in the iteration statement</para>
 
 <programlisting>
@@ -570,7 +570,7 @@ the function now need only call upon it by name, as in the statement:</para>
 <programlisting>
 LARGEQ = 1. + MAX. (6,Q)/3.
 </programlisting>
-       
+
 <para>Note that the set (in this use of MAX.) hose largest element is
 desired is called Q, and N has the value 6.  No DIMENSION statement is
 needed for A is the EXTERNAL FUNCTION definition program above, since
@@ -749,7 +749,7 @@ using the iterative formula:</para>
     <imagedata fileref='equation3.png'/>
   </imageobject>
 </mediaobject>
-               
+
 <para>which is obtained from the standard Newton's Method formula</para>
 
 <!-- Yes, this is repeated from earlier -->
@@ -758,7 +758,7 @@ using the iterative formula:</para>
     <imagedata fileref='equation1.png'/>
   </imageobject>
 </mediaobject>
-               
+
 <!-- in the original, "problem" here was "probelm" -->
 <para>for the problem f(x) = 0.  (Here f(x) =
 x<superscript>3</superscript> + ax<superscript>2</superscript> + bx +
@@ -958,7 +958,7 @@ are values of functions.</para>
 
 <orderedlist numeration='loweralpha'>
 <listitem><para>Addition, written as "+", e.g., Z5 + D.</para></listitem>
-       
+
 <listitem><para>Subtraction, written as "-", e.g., Z5 - D.  (Note,
 both the minus sign and the dash are accepted.)</para></listitem>
 
@@ -989,7 +989,7 @@ means-(X<superscript>-.5</superscript>).
 <sect2><title>Arithmetic Expressions</title>
 
 <para>Arithmetic expressions are defined inductively as follows:</para>
-       
+
 <orderedlist numeration='loweralpha'>
 <listitem><para>All integer, floating point, and alphabetic constants,
 integer and floating point individual variables, subscripted integer
@@ -1077,37 +1077,37 @@ otherwise indicated by parentheses, is:</para>
 
 <!-- beginpage -->
 <literallayout>
-        .ABS., + (as unary operations)
-        .P.
-        - (as a unary operator)
-        *, /
-        +, - (as binary operations, i.e., addition and subtraction)
-
-        .E., .NE., .G., .GE., .L., .LE.
-        .NOT.
-        .AND.
-        .OR.
-        .THEN.
-        .EQV.
-        , (as used to separate function arguments)
-        =
+.ABS., + (as unary operations)
+.P.
+- (as a unary operator)
+*, /
++, - (as binary operations, i.e., addition and subtraction)
+
+.E., .NE., .G., .GE., .L., .LE.
+.NOT.
+.AND.
+.OR.
+.THEN.
+.EQV.
+, (as used to separate function arguments)
+=
 </literallayout>
 
 <para>Examples:</para>
 
 <literallayout>
-        (1) .ABS.(B - C) means |B - C|, while .ABS.B - C means |B| - C.
-        (2) -B + C means (-B) + (C), while -(B + C) means the negation of
-        the sum.
-        (3) B.P. - X + Y  means B<superscript>-X</superscript> + Y, while B.P.(-X + Y) means B<superscript>-X</superscript>+Y.
-        (4) K2/Z - 3 (K2/Z) - 3, while K2/(Z - 3) implies that Z - 3 is
-        the denominator.
-        (5) A * B + C means (A * B) + C.
-        (6) A.P.3/J means (A<superscript>3</superscript>)/J
-        (7) X.L. Y + 3 means (X) .L. (Y + 3).
-        (8) P.AND..NOT.P .EQV.Q means (P.AND.(.NOT.P)).EQV.Q.
-        (9) Z = X + Y /QA means Z = (X + Y/QA))
-        (10) A = -B.P.X means A = -(B<superscript>X</superscript>).
+(1) .ABS.(B - C) means |B - C|, while .ABS.B - C means |B| - C.
+(2) -B + C means (-B) + (C), while -(B + C) means the negation of
+the sum.
+(3) B.P. - X + Y  means B<superscript>-X</superscript> + Y, while B.P.(-X + Y) means B<superscript>-X</superscript>+Y.
+(4) K2/Z - 3 (K2/Z) - 3, while K2/(Z - 3) implies that Z - 3 is
+the denominator.
+(5) A * B + C means (A * B) + C.
+(6) A.P.3/J means (A<superscript>3</superscript>)/J
+(7) X.L. Y + 3 means (X) .L. (Y + 3).
+(8) P.AND..NOT.P .EQV.Q means (P.AND.(.NOT.P)).EQV.Q.
+(9) Z = X + Y /QA means Z = (X + Y/QA))
+(10) A = -B.P.X means A = -(B<superscript>X</superscript>).
 </literallayout>
 
 <para>(B) Within an expression operations appearing on the same line
@@ -1118,8 +1118,8 @@ otherwise indicated by parentheses.</para>
 <para>Examples:</para>
 
 <literallayout>
-        (1) A + B - C + D - E means (((A + B) - C) + D) - E.
-        (2) X/Z * Y/R * S means (((X/Z) * Y/R) * S.
+(1) A + B - C + D - E means (((A + B) - C) + D) - E.
+(2) X/Z * Y/R * S means (((X/Z) * Y/R) * S.
 </literallayout>
 </sect2>
 
@@ -1153,19 +1153,19 @@ function GCD. and the variables I and J are in the integer mode, then
 the expressions</para>
 
 <literallayout>
-        Y = GCD.(I, J)
-        Y + Z - I
-        I + 1.
-        GCD. (I, J)/Z
+Y = GCD.(I, J)
+Y + Z - I
+I + 1.
+GCD. (I, J)/Z
 </literallayout>
 
 <para>are all floating point expressions while the expressions</para>
 
 <literallayout>
-        I + GCD.(I, J)
-        (I + J)/3
-        I + 1
-        GCD.(I, J)/I
+I + GCD.(I, J)
+(I + J)/3
+I + 1
+GCD.(I, J)/I
 </literallayout>
 <!-- beginpage -->
 <para>are all integer expressions.</para>
@@ -1175,7 +1175,7 @@ may be necessary before some of the operations can be performed.
 Thus, in the expression</para>
 
 <literallayout>
-       Y + 3
+Y + 3
 </literallayout>
 
 <para>if Y is in the floating point mode it cannot be added directly
@@ -1191,7 +1191,7 @@ improper conversion will take place.</para>
 which the conversions will be made.  Consider the expression</para>
 
 <literallayout>
-       ( Y + 7/3) + (I * J/K)
+( Y + 7/3) + (I * J/K)
 </literallayout>
 
 <para>where Y is in the floating point mode, and I, J, and K are in the
@@ -1200,13 +1200,13 @@ computation will proceed in the following order (where the T's are
 temporary locations):</para>
 
 <literallayout>
-       T<subscript>1</subscript> = I * J
-       T<subscript>2</subscript> = T<subscript>1</subscript>/K
-       T<subscript>3</subscript> = 7/3
-       T<subscript>4</subscript> = Y + T<subscript>3</subscript>
-       T<subscript>5</subscript> = T<subscript>4</subscript> + T<subscript>2</subscript>
+T<subscript>1</subscript> = I * J
+T<subscript>2</subscript> = T<subscript>1</subscript>/K
+T<subscript>3</subscript> = 7/3
+T<subscript>4</subscript> = Y + T<subscript>3</subscript>
+T<subscript>5</subscript> = T<subscript>4</subscript> + T<subscript>2</subscript>
 </literallayout>
-       
+
 <para>and T<subscript>5</subscript> will be the value of the
 expression.</para>
 
@@ -1234,9 +1234,9 @@ different from the value one might expect from a different analysis.</para>
 floating point mode if the expression were written:</para>
 
 <literallayout>
-       (Y + 7./3) + (I * J)/(K + 0.)
+(Y + 7./3) + (I * J)/(K + 0.)
 </literallayout>
-       
+
 <para>Of course, many times the expression will be written as
 originally stated just to achieve the "truncation" effect.</para>
 
@@ -1278,7 +1278,7 @@ MP(A, B + 6 * J, I * 6/TDX), MA(K(Z + 5) + T(1) + 6).</para>
 <para>This statement has the form illustrated by</para>
 
 <programlisting>
-               ALPHA = Y + Z + F.(X, Y, Z)
+ALPHA = Y + Z + F.(X, Y, Z)
 </programlisting>
 
 <para>That is, the left side of the "=" sign consists of the name of a
@@ -1298,19 +1298,19 @@ variable on the left the value which results from steps (1) and (2)."
 (See <xref linkend='expression_modes'/> for mode of expressions.)</para>
 
 <para>Thus, if Y is a floating point variable, then the statement</para>
-       
+
 <programlisting>
-               Y = 1
+Y = 1
 </programlisting>
-               
+
 <para>will cause the integer 1 to be converted to floating point and then
 stored in the location called "Y"; i.e., Y will now have the value 1.
 (as a floating point number).  If the statement were written</para>
 
 <programlisting>
-               Y = 1.
+Y = 1.
 </programlisting>
-               
+
 <para>then the floating point number 1. would be stored in the
 location "Y"; i.e., Y would again have the floating point value 1.,
 but in this case the conversation of the integer is unnecessary, thus
@@ -1322,20 +1322,20 @@ fractional part, and then the fractional part is truncated.  Thus, the
 following floating point numbers:</para>
 
 <programlisting>
-               3E5, .3E0, .34568127E2, - .345681E10
+3E5, .3E0, .34568127E2, - .345681E10
 </programlisting>
 
 <para>would convert to the following integers, respectively:</para>
 
 <programlisting>
-               300000, 0, 34, -3456810000.
+300000, 0, 34, -3456810000.
 </programlisting>
 </sect2>
 
 <sect2><title>Transfer Statement</title>
 
 <para>This statement has the form:  TRANSFER TO &scriptS;</para>
-       
+
 <para>Here &scriptS; may be any statement label or any expression in
 <!-- beginpage -->
 statement label mode which labels an executable statement.  Execution
@@ -1349,11 +1349,11 @@ is SWTCH(6)).</para>
 <sect2><title>Conditional Statements</title>
 
 <para>There are two types of conditional statements.</para>
-       
+
 <para>(a) Simple Conditional</para>
 
 <programlisting>
-       WHENEVER B,Q
+WHENEVER B,Q
 </programlisting>
 
 <para>Here B is a Boolean expression and Q any executable statement
@@ -1367,46 +1367,46 @@ statements containing punctuation, must be written.</para>
 <para>Examples:</para>
 
 <programlisting>
-       WHENEVER XM.LE.1, TRANSFER TO END
-       WHENEVER I.GE.N.AND.J.NE.I-1, I=0
+WHENEVER XM.LE.1, TRANSFER TO END
+WHENEVER I.GE.N.AND.J.NE.I-1, I=0
 </programlisting>
-       
+
 
 <para>(b) Compound Conditional</para>
 
 <!-- Original has hand-drawn large right curly braces pointing at each -->
 <!-- theta from the left, indicating the scope of the conditional body -->
 <programlisting>
-       &scriptS;<subscript>1</subscript>       WHENEVER B<subscript>1</subscript>
-       
-               ...
-               ...     &THgr;<subscript>1</subscript>
-               
-       &scriptS;<subscript>2</subscript>       OR WHENEVER B<subscript>2</subscript>
-               ...
-               ...     &THgr;<subscript>2</subscript>
-               ...
-               ...
-       &scriptS;<subscript>k</subscript>       OR WHENEVER B<subscript>k</subscript>
-               ...
-               ...     &THgr;<subscript>k</subscript>
-       &scriptS;<subscript>k</subscript>+1     END OF CONDITIONAL
+        &scriptS;<subscript>1</subscript>        WHENEVER B<subscript>1</subscript>
+        
+                ...
+                ...        &THgr;<subscript>1</subscript>
+                
+        &scriptS;<subscript>2</subscript>        OR WHENEVER B<subscript>2</subscript>
+                ...
+                ...        &THgr;<subscript>2</subscript>
+                ...
+                ...
+        &scriptS;<subscript>k</subscript>        OR WHENEVER B<subscript>k</subscript>
+                ...
+                ...        &THgr;<subscript>k</subscript>
+        &scriptS;<subscript>k</subscript>+1        END OF CONDITIONAL
 </programlisting>
-       
+        
 <para>Often the last condition B<subscript>k</subscript> is always
 true.  This may be expressed by the statement</para>
 <!-- beginpage -->
 
 <programlisting>
-       OR WHENEVER 1B
+OR WHENEVER 1B
 </programlisting>
 
 <para>or alternately the statement</para>
 
 <programlisting>
-       OTHERWISE
+OTHERWISE
 </programlisting>
-       
+
 <para>The &scriptS;<subscript>i</subscript> are statement labels which
 need not be used unless desired.  k may equal one (if no "OR
 WHENEVER..." statements are used). Here B<subscript>1</subscript>,
@@ -1441,26 +1441,26 @@ is performed.</para>
 <para>might be given by the section of the program:</para>
 
 <programlisting>
-       WHENEVER X .LE. 0. .OR. 1. .LE. X .AND. X .L. 2. .OR. X .GE.3
-        Y = 0.
-       OR WHENEVER 0 .LE. X .AND. X. .L. 3.
-        Y = 1.
-       END OF CONDITIONAL
+WHENEVER X .LE. 0. .OR. 1. .LE. X .AND. X .L. 2. .OR. X .GE.3
+ Y = 0.
+OR WHENEVER 0 .LE. X .AND. X. .L. 3.
+ Y = 1.
+END OF CONDITIONAL
 </programlisting>
-       
+
 <para>This section of program could be rewritten in another way.</para>
-       
+
 <!-- beginpage after "Y = X" -->
 <programlisting>
-       WHENEVER 0. .LE. X .AND. X .L. 1.
-       Y = X
-       OR WHENEVER 2. .LE. X .AND. X .L. 3.
-       Y = 1.
-       OTHERWISE
-       Y = 0.
-       END OF CONDITIONAL
+WHENEVER 0. .LE. X .AND. X .L. 1.
+Y = X
+OR WHENEVER 2. .LE. X .AND. X .L. 3.
+Y = 1.
+OTHERWISE
+Y = 0.
+END OF CONDITIONAL
 </programlisting>
-       
+
 <para>The indentation of the statements between the conditional statements
 is not required but contributes to the readability.</para>
 </sect2>
@@ -1468,11 +1468,11 @@ is not required but contributes to the readability.</para>
 <sect2><title>CONTINUE Statement</title>
 
 <para>This statement has the simple form:</para>
-       
+
 <programlisting>
-       CONTINUE
+CONTINUE
 </programlisting>
-       
+
 <para>It serves as an entry point in the program, and causes no computation
 to be performed by its presence or absence.</para>
 </sect2>
@@ -1481,21 +1481,21 @@ to be performed by its presence or absence.</para>
 
 <para>The following program segment illustrates the use of this
 statement.</para>
-       
+
 <programlisting>
-          .
-          .
-          .
-       A = D(1, 1)
-       THROUGH ST1, FOR I = 1, I .G. 10
-       THROUGH ST1, FOR J = 1, J .G. 10
-       WHENEVER A .LE. D(I, J), TRANSFER TO ST1
-       K = I
-       L = J
+   .
+   .
+   .
+A = D(1, 1)
+THROUGH ST1, FOR I = 1, I .G. 10
+THROUGH ST1, FOR J = 1, J .G. 10
+WHENEVER A .LE. D(I, J), TRANSFER TO ST1
+K = I
+L = J
     ST1 CONTINUE
-          .
-          .
-          .
+       .
+   .
+   .
 </programlisting>
 
 <para>This statement casues the block of statements which follows
@@ -1727,10 +1727,10 @@ at which the stop occurred.</para>
 
 <para>Normally, the value of a function will occur as part of an expression, as in the statement:</para>
 
-<programlisting>       
+<programlisting>
 Z = COS.(X)/SIN.(X + 2.)
 </programlisting>
-       
+
 <para>Certain functions, however, may stand alone as separate
 statements, as a statement calling for the sorting of a list, etc.
 This would appear as:</para>
@@ -1791,7 +1791,7 @@ exhausted.</para>
 <programlisting>
 FUNCTION RETURN &phmmat;
 </programlisting>
-       
+
 <para>This statement is used in a function definition to indicate a
 return to the calling program.  &phmmat; is an expression whose value is to
 be the output of this function considered as a single valued function.
@@ -1986,7 +1986,7 @@ TRANSFER TO &scriptS;" (including the comma) is omitted no transfer is
 made even if at load point.</para>
 </listitem>
 </varlistentry>
-</variablelist>            
+</variablelist>    
 
 <sect3><title>End of File and End of Tape</title>