(except for the capital thetas, which were typed capital Os with bars
hand-drawn across them). The script-S used in the original as a base
for subscripted labels has no ISO equivalent and has been transcribed as
-a Greek letter sigma (&statement;).</para>
+a Greek letter sigma (&statement;). The script-N used at some
+places in the original has been replaced by a script M, ℳ.</para>
<para>Footnotes were tagged with asterisks in the original rather than
being numbered. Section references to section numbers have been
<para>In all cases, every reference to an expression
E<subscript>1</subscript> will involve its current value at the time
of reference. Moreover, the variable <!-- beginpage --> V may have
-its value changed at any time during the execution of the
-scope.</para>
+its value changed at any time during the execution of the scope. In a
+statement of the form (a), the value of V will be reset by the value
+of the next E<subscript>1</subscript> for the next computation of the
+scope. In a statement of form (b), the current value of V will be
+used for incrementing, testing, etc.</para>
+
+<para>Examples:</para>
+
+<para>(i) To evaluate the polynomial
+ c<subscript>n</subscript>x<superscript>n</superscript> +
+ c<subscript>n-1</subscript>x<superscript>n+1</superscript> + ...+
+ c<subscript>1</subscript>x + c<subscript>0</subscript> using the
+ formula (...((c<subscript>n</subscript>x +
+ c<subscript>n-1</subscript>)x + c<subscript>n-2</subscript>)x + ...+
+ c<subscript>1</subscript>)x + c<subscript>0</subscript> (nested
+ multiplication), we may write the program:</para>
+
+<programlisting>
+ INTEGER J,N
+ Y = 0
+ THROUGH POLY, FOR J = N, -1, .L. 0
+ POLY Y = X * Y + C(J)
+</programlisting>
+
+<para>(For the meaning of the statement INTEGER J,N see section 3.2).</para>
+
+<para>(ii) A Newton's Method solution (X<subscript>k+1</subscript> =
+x<subscript>k</subscript> -
+f(x<subscript>k</subscript>)/f'(x<subscript>k</subscript>)) of the
+equation f(x) = cos x - x = 0 could be written as a single statement,
+using the criterion "|f(x)| < ε and |x<subscript>k</subscript> -
+x<subscript>k</subscript>+1| =
+|f(x<subscript>k</subscript>)/f'(x<subscript>k</subscript>)| < |
+ε " for stopping the iteration:</para>
+
+<programlisting>
+ NEW THROUGH NEW, FOR X = X0, (COS.(X)-X)/(SIN.(X) + 1.),
+ 1 .ABS.(COS.(X) - (X) .L. EPSLON .AND.
+ 2 .ABS.(COSX.(X) - (X)/(SIN.(X) + 1.) ) .L. EPSLON
+</programlisting>
+
+<para>where X0 is the initial guess.</para>
+
+<para>(iii) If the transformation of the iteration variable is to be
+performed within the scope of the iteration, one may use a zero
+increment. E.g., if J is an integer variable, and the scope of the
+iteration is to be performed for those multiples of 2 which are not
+multiples of 5 and which are less than the value of the integer K, one
+might write the iteration as follows:</para>
+
+<programlisting>
+ THROUGH END, FOR J = 2, .GE. K
+ ...
+ ...
+ J = K J + 2
+END WHENEVER J .E. (J/5) * 5, J = J + 2
+</programlisting>
+
+<para>(iv) A table-look-up procedure using an interation statement.
+Suppose that a string of alphabetic (or numeric) characters (i.e., a
+"sentence") has been decomposed into single characters stored in C(1),
+C(2), ..., C(K), where K is the length of the string. Then the first
+occurrence of a comma could be found as follows:</para>
+
+<programlisting>
+LOOK THROUGH LOOK, FOR I = 1, 1, C(I), .E. $, $ .OR. I .G. K
+ WHENEVER I .G. K, TRANSFER TO NOCOMA
+</programlisting>
+
+</sect2>
+<sect2><title>Nested Iteration Statements</title>
+
+<!--
+In the original, the phrase ", indicated by ... below" was not present.
+Instead, a large open-brace at the left of the diagram pointed at the word
+"scope", indicating the body section filled with ellipses.
+-->
+<para>As indicated in section 2.5, the "scope" of an iteration
+statement is the block of statements designated for repeated
+execution, indicated by ... below:</para>
+
+<programlisting>
+ THROUGH END, FOR V = E<subscript>1</subscript>, E<subscript>2</subscript>, B
+ ...
+ ...
+END ...
+</programlisting>
+
+<para>Some of the statements within the scope of an iteration may,
+themselves, be iteration statements. However, if iteration statement
+<emphasis>b</emphasis> is in the scope of iteration
+<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>
+
+<para>Here, although the scopes of <emphasis>a</emphasis> and
+<emphasis>b</emphasis> both end on statement K, iteration
+<emphasis>b</emphasis> is incremented and tested first. Therefore,
+iteration <emphasis>b</emphasis> is completed before iteration
+<emphasis>a</emphasis> is incremented:</para>
+
+<para>The following diagram represents an invalid configuration:</para>
+
+<para>When iteration statements occur in the scope of other iteration
+statements, they are said to be "nested". The "nesting depth" of an
+iteration statement is the number of iteration statements in whose
+scope it appears. The nesting depth of an iteration may not exceed
+50. For example:</para>
+
+<para>In example (5), iteration <emphasis>a</emphasis> has a nesting
+depth 0, iteration <emphasis>b</emphasis> has nesting depth 1, and
+iteration <emphasis>c</emphasis> has nesting depth 2. In example (3),
+both <emphasis>b</emphasis> and <emphasis>c</emphasis> have nesting
+depths of 1.</para>
+
+<para>There are no restrictions on jumping into or out of the
+statements in the scope of an iteration.</para>
+
+</sect2>
+<sect2><title>Pause Statement</title>
+
+<programlisting>
+PAUSE NO. n
+</programlisting>
+
+<para>This statement indicates a breakpoint in the program, and it
+causes the computer to stop in such a way that the operator can
+manually start it and automatically go on to the next statement in the
+program. The number n is an octal integer containing up to 5 digits,
+which will be displayed on the computer console for the operator to
+note when the computer stops, thus indicating the point in the program
+at which the stop occurred.</para>
+</sect2>
+
+<sect2><title>Function Statement</title>
+
+<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>
+
+<programlisting>
+EXECUTE LSORT.(ARRAY, MAP, N)
+</programlisting>
+
+<para>(See section 3.8 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 statement if the function
+has no arguments.</para>
+
+</sect2>
+<sect2><title>Error Return Statement</title>
+
+<para>Provision is made for including an error return in function
+definition programs (see section 3.8). The form of the statement is
+simply:</para>
+
+<programlisting>
+ERROR RETURN
+</programlisting>
+
+<para>(An example of its use is shown near the end of subsection
+3.8.3).</para>
+
+<para>In order to use it in a function evaluation, the last
+(right-most) argument of the function must be the label of a statement
+or a variable in statement label mode, whose value is the label of a
+statement to which a transfer is made in case the ERROR RETURN
+statement is executed.</para>
+
+<para>Even though an error return has been provided in the definition
+of a function, in the use of the function the last argument may be
+omitted. If it is omitted, execution of the ERROR RETURN statement
+will cause control to be transferred to the operating system in which
+the translated program is imbedded, with an error indication.</para>
+
+</sect2>
+<sect2><title>End of program Statement</title>
+
+<para>This statement has the form: END OF PROGRAM.</para>
+
+<!-- "in which" below is just "which" in the original -->
+<para>This statement must be the last statement in the program, both
+physically (i.e., the last card) and in the sequence of computation.
+Execution of this statement will transfer control to the operating
+system in which the translated program is imbedded. An alternate way
+of terminating a program - i.e., returning to the operating system -
+is to attempt to execute an input statement when the data has been
+exhausted.</para>
</sect2>
+<sect2><title>Function return</title>
+
+<programlisting>
+FUNCTION RETURN ℳ
+</programlisting>
+
+<para>This statement is used in a function definition to indicate a
+return to the calling program. ℳ is an expression whose value is to
+be the output of this function considered as a single valued function.
+ℳ need not be specified if outputs are specified in the argument list
+(see section 3.8).</para>
+
+</sect2>
+<sect2><title>Entry to a function</title>
+
+<para>Entry points to a function being defined are indicated by</para>
+
+<programlisting>
+ENTRY TO ℳ
+</programlisting>
+
+<para>where ℳ is the name of this entry (see section 3.8).</para>
+</sect2>
+
+
+
+
+
+
+
+
+
</sect1>
</chapter>
</book>