result into PIC and XML-DocBook markup so both HTML and PostScript can
be generated from it.</para>
+<para>The philosophy of this transcription is that the semantic
+content of the manual is what is essential and is what should be
+presented by rendering into HTML; the accidents of literal content
+have in some cases been changed but should be reconstructable by
+looking at the XML source transcription. Thus, typos have been fixed in the
+visible text, but the XML source includes a note adjacent to each one
+explaining the fix. We have also corrected other minor errors like
+off-by-ones in the indexing, but those fixes too are explained in the
+XML masters.</para>
+
+<para>We have been (necessarily) a little more relaxed about changes
+in whitespace distribution, as DocBook doesn't give us the ability to
+control that exactly. Other notes in the XML source describe the few
+places where we were not able to reproduce the original layout.</para>
+
<note><para>Redactor's comments in the body of the text are
decorated like this.</para></note>
<para>The reference structure of the index has been faithfully
reproduced; that is, for each index reference a DocBook
<indexterm> tag was placed within the span of text defined by
-the original page numbering. However, DocBook renders the index
-differently from the original. The original lacked the canned section
-headings, and references were by page number rather than section
-name.</para>
+the original page numbering (two off-by-one errors were corrected).
+However, DocBook renders the index differently from the original. The
+original lacked the canned section headings, and references were by
+page number rather than section name.</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
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>
+
<para>It is interesting to ask just how complicated a condition can be
used in making decisions. We have seen that such conditions may occur
in iterations statements, and "WHENEVER" statements, etc., for the
in the sense that, given n and a<subscript>0</subscript>, ...,
a<subscript>n</subscript>, this function computes as its value the
largest of a<subscript>0</subscript>, ..., a<subscript>n</subscript>.
+<indexterm><primary>EXTERNAL FUNCTION</primary></indexterm>
In this case we shall call our algorithm an EXTERNAL FUNCTION, and
give it a name, say MAX., since it will be written and translated
externally with respect to the program which will later call upon it.
<sect3><title>Floating Point Constants</title>
<indexterm><primary>Constants, Floating Point</primary></indexterm>
+<indexterm><primary>Floating Point</primary></indexterm>
<para>Floating point constants may be written with or without
-exponents. If written without an exponent, the constant contains from
-one to eight digits and a decimal point ".", which must be written,
-but which may appear anywhere in the number. Thus, 0., 1.5, -0.05,
-+100.0, .1 and -4. are all floating-point constants. If the number is
-written with an exponent, it must contain from one to eight digits
-with or without a decimal point, followed by the letter "E", followed
-by the exponent of the power of 10 that multiplies the number. (If
-the decimal point is omitted, it is assumed to be immediately to the
-left of the letter "E".) The exponent m consists of one or two digits
-preceded by a sign (although a "+" sign may be omitted), and must
-satisfy the condition -38 ≥ m ≥ 38. Examples of floating-point
-constants with exponent are;
+exponents. <indexterm><primary>Exponent</primary></indexterm> If
+written without an exponent, the constant contains from one to eight
+digits and a decimal point ".", which must be written, but which may
+appear anywhere in the number. Thus, 0., 1.5, -0.05, +100.0, .1 and
+-4. are all floating-point constants. If the number is written with
+an exponent, it must contain from one to eight digits with or without
+a decimal point, followed by the letter "E", followed by the exponent
+of the power of 10 that multiplies the number. (If the decimal point
+is omitted, it is assumed to be immediately to the left of the letter
+"E".) The exponent m consists of one or two digits preceded by a sign
+(although a "+" sign may be omitted), and must satisfy the condition
+-38 ≥ m ≥ 38. Examples of floating-point constants with
+exponent are;
<!-- beginpage II.2 -->
<!-- beginpage II.4 -->
<listitem><para>Exponentiation, written as ".P.", e.g., Z5.P.D, and
meaning (Z5)<superscript>D</superscript>, i.e., Z5 raised to the power
-D.</para></listitem>
+D.<indexterm><primary>Exponentiation</primary></indexterm></para></listitem>
<listitem><para>Negation, written as "-", e.g., -ALOHA, meaning the
"negative of ALOHA." Thus -X.P.-.5
<sect2><title>Arithmetic Expressions</title>
+<indexterm><primary>Expression, Arithmetic</primary></indexterm>
+
<para>Arithmetic expressions<indexterm><primary>Arithmetic
Expressions</primary></indexterm> are defined inductively as
follows:</para>
<!-- beginpage II.5 -->
<listitem><para>M.EQV.P has the value 1B if and only if M and P have
-the same values.</para></listitem>
+the same values. <indexterm><primary>.EQV.</primary></indexterm>
+</para></listitem>
</orderedlist>
<para>Thus, .NOT., .OR., .AND., .THEN., AND .EQV. correspond to the
<sect2 id='boolean_expressions'><title>Boolean Expressions</title>
+<indexterm><primary>Expression, Boolean</primary></indexterm>
+
<para>Boolean expressions are defined inductively as follows:
<indexterm><primary>Boolean Expressions</primary></indexterm>
</para>
<!-- beginpage II.7 -->
<para>Examples:</para>
+<indexterm><primary>Expression, Compound</primary></indexterm>
+
<orderedlist>
<listitem><para>A + B - C + D - E means (((A + B) - C) + D) - E.</para></listitem>
<listitem><para>X/Z * Y/R * S means (((X/Z) * Y/R) * S.</para></listitem>
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.</para>
+point before adding to the floating point number.
+<indexterm><primary>Floating Point Subscript</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
<sect1><title>Statements (Executable)</title>
+<indexterm><primary>Executable Statements</primary></indexterm>
+
<sect2 id='substitution'><title>Substitution Statement</title>
<!-- beginpage II.10 -->
</para>
<para>That is, the left side of the "=" sign
-<indexterm><primary>Equals Sign</primary></indexterm> consists
-of the name of a variable (either an individual variable or a
-subscripted array variable), and the right side consists of any
-expression of the same mode. The only exceptions to this mode
-requirement are the cases: (1) If the variable on the left is of
-integer mode then the value of a floating point expression of the
-right will be converted to integer mode.
-<indexterm><primary>Conversion, Floating Point to
-Integer</primary></indexterm> (2) if the variable on the left is of
+<indexterm><primary>Equals Sign</primary></indexterm> consists of the
+name of a variable (either an individual variable or a subscripted
+array variable), and the right side consists of any expression of the
+same mode. The only exceptions to this mode requirement are the
+cases: (1) If the variable on the left is of integer mode then the
+value of a floating point expression of the right will be converted to
+integer mode. <indexterm><primary>Conversion, Floating Point to
+Integer</primary></indexterm> <indexterm><primary>Floating Point
+Conversion</primary></indexterm> (2) if the variable on the left is of
floating point mode then the value of an integer expression on the
right will be converted to floating point mode.
<indexterm><primary>Conversion, Integer to Floating
EXECUTE LSORT.(ARRAY, MAP, N)
</programlisting>
+<indexterm><primary>EXECUTE Statement</primary></indexterm>
+
<para>(See <xref linkend='funcdefs'/> for definition of functions).
Here ARRAY, MAP, N are the "arguments" of the function (subroutine)
LSORT. Arguments and parentheses may be omitted in an EXECUTE
ERROR RETURN
</programlisting>
+<indexterm><primary>ERROR RETURN Statement</primary></indexterm>
+
<para>(An example of its use is shown near the end of <xref
linkend='internal_and_external'/>).</para>
tape check, etc.) occurs during any input-output statement except READ
DRUM or WRITE DRUM, the subroutine ERROR. is automatically entered.
The subroutine ERROR. sets an error flag and returns control to the
-system in which the translated program is imbedded.</para>
+system in which the translated program is imbedded.
+<indexterm><primary>ERROR Subroutine</primary></indexterm></para>
<para>If an end-of-file is encountered while executed a READ FORMAT,
READ BCD TAPE, or READ BINARY TAPE statement the subroutine SYSTEM. (a
<informaltable frame='none' colsep='0' rowsep='0'>
<tgroup cols='2'>
<tbody>
-<row><entry>S</entry> <entry>Skip (or blank information)</entry></row>
-<row><entry>I</entry> <entry>Integer</entry></row>
-<row><entry>F</entry> <entry>Fixed point number (Internally floating point)</entry></row>
+<row>
+ <entry>S
+ <indexterm><primary>S Field (Format)</primary></indexterm>
+ </entry>
+ <entry>Skip (or blank information)</entry>
+</row>
+<row>
+ <entry>I
+ <indexterm><primary>I Field (Format)</primary></indexterm>
+ </entry>
+ <entry>Integer</entry>
+</row>
+<row>
+ <entry>F
+ <indexterm><primary>F Field (Format)</primary></indexterm>
+ </entry>
+ <entry>Fixed point number (Internally floating point)</entry>
+</row>
<row>
<entry>E
<indexterm><primary>E Field (Format)</primary></indexterm>
</entry>
<entry>Floating point number</entry>
</row>
-<row><entry>K</entry> <entry>Octal number</entry></row>
+<row>
+ <entry>K
+ <indexterm><primary>K Field (Format)</primary></indexterm>
+ </entry>
+ <entry>Octal number</entry>
+</row>
<row>
<entry>C
<indexterm><primary>C Field (Format)</primary></indexterm>
<para>There are two main types of functions: The <emphasis> internal
</emphasis> function and the <emphasis> external </emphasis> function.
+<indexterm><primary>EXTERNAL FUNCTION</primary></indexterm>
Since these are quite similar in many ways, that part of the
description which is specific to external functions will be
<!-- beginpage II.42 -->
<sect3 id='external_functions'><title>External Function Definitions</title>
+<indexterm><primary>EXTERNAL FUNCTION</primary></indexterm>
+
<!-- In the original, "variables and functions in the main program"
was typoed as "variables and function in the main program" (incorrect
singular). -->
<para>As indicated above, X, Y, and Z, as they occur here, are dummy
<!-- beginpage II.44 -->
-
variables, and (X, Y, Z) is the dummy
- variable<indexterm><primary>Dummy Arguments</primary></indexterm>
- list. The current value of T, however, will be obtained and used each
- time the value of the function is needed. An example of theuse of
- the function so defined would be:</para>
+variable<indexterm><primary>Dummy Arguments</primary></indexterm>
+list. The current value of T, however, will be obtained and used each
+time the value of the function is needed. An example of theuse of
+the function so defined would be:</para>
<para role='centered'>
A = 1.-SUMSQ. (U, V + 3, W) .P..5
<para>The first statement (INTERNAL FUNCTION (X)) is a function
declaration (i.e., <emphasis>declares</emphasis> that the following
-statements define a function). 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
+statements define a function).
+<!-- erroneously refrred 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
FUNCTION RETURN statement may appear without an accompanying
expression.</para>
<para>An example of a definition for procedures is as follows:</para>
+<indexterm><primary>EXTERNAL FUNCTION</primary></indexterm>
+
<programlisting>
EXTERNAL FUNCTION (M, N, I, P, Q)
STATEMENT LABEL N, I
</programlisting>
<para>is part of a program and Y ≤ 0, then when the ERROR RETURN
-statement is executed control transfers to statement ER (then goes on
-to L), instead of finishing the execution of statement F (and then
-going on to S). Note that the END OF FUNCTION statement will never be
-executed, but must be present in the definition.</para>
+statement is executed <indexterm><primary>ERROR RETURN
+Statement</primary></indexterm> control transfers to statement ER
+(then goes on to L), instead of finishing the execution of statement F
+(and then going on to S). Note that the END OF FUNCTION statement
+will never be executed, but must be present in the definition.</para>
<indexterm><primary>END OF FUNCTION Statement</primary></indexterm>
+
</sect3>
</sect2>
</sect1>
TAPEWR. PUNCH. SETERR.
</programlisting>
<indexterm><primary>COMMNT Subroutine</primary></indexterm>
+<indexterm><primary>ERROR Subroutine</primary></indexterm>
<!-- beginpage II.49 -->
<para>If a block designation
<sect1><title>Scientific Examples</title>
+<indexterm><primary>Examples, Scientific</primary></indexterm>
+
<sect2><title>Example 1<emphasis role='note'>: Compute roots of linear
and quadratic equations</emphasis></title>
<sect1><title>Business Data Processing Examples</title>
<indexterm><primary>Business Data Processing Examples</primary></indexterm>
+<indexterm><primary>Examples, Business Data Processing</primary></indexterm>
<sect2><title>Example 1<emphasis role='note'>: Payroll Processing</emphasis></title>
<sect1><title>Symbol Manipulation and Recursive Function Examples</title>
<sect2><title><emphasis role='note'>Example 1: Find a word in a string</emphasis></title>
+<indexterm><primary>Exammples, Recursive Functions</primary></indexterm>
+<indexterm><primary>Examples, Symbol Manipulation</primary></indexterm>
+
<para><emphasis>Problem:</emphasis> Find the first occurrence of an
arbitrary word in a given text.</para>
<varlistentry>
<term>ERROR</term>
+
<listitem><para>Entry to this routine also causes a return to the
operating system. However, if a dump of storage was requested of the
operating system such a print of storage will be produced before the
return to the system. The ERROR RETURN statement may produce a call
-for this routine.</para></listitem>
+for this routine.<indexterm><primary>ERROR RETURN
+Statement</primary></indexterm> <indexterm><primary>ERROR
+Subroutine</primary></indexterm> </para></listitem>
</varlistentry>
<varlistentry>