<!ENTITY scriptA "<emphasis>A</emphasis>">
<!ENTITY scriptF "<emphasis>B</emphasis>">
<!ENTITY scriptL "<emphasis>L</emphasis>">
-<!ENTITY scriptN "<emphasis>M</emphasis>">
+<!ENTITY scriptM "<emphasis>M</emphasis>">
+<!ENTITY scriptN "<emphasis>N</emphasis>">
<!ENTITY scriptS "<emphasis>S</emphasis>">
]>
<book>
Hollerith characters.</para>
<para>If a specification contains a Hollerith string of the form
-nHa_1a_2...a_n, certain conventions are observed. (1) If the list is
+nHa<subscript>1a</subscript><subscript>2</subscript>...a<subscript>n</subscript>, certain conventions are observed. (1) If the list is
satisifed, but the next field specification is a Hollerith string, the
string is transmitted, anyway. (2) On input, i.e., reading from
cards, when a Hollerith string is encountered in the specification,
program. Every card of the remark declaration must have an "R" in
column 11.</para>
+</sect2>
+<sect2><title>Mode Declaration</title>
+
+<para>All variables and function values are assumed to have the normal mode
+unless declared otherwise. Any of the other modes may be specified as
+the normal mode by writing the following declarations:</para>
+
+<para role='centered'>
+NORMAL MODE IS &scriptM;
+</para>
+
+<para>where &scriptM; is one of the following phrases; INTEGER, BOOLEAN, STATEMENT
+LABEL, FUNCTION NAME, or FLOATING POINT. Only one such declaration
+may appear in a program and it is in effect for the whole program, no
+matter where it occurs in the program. If a variable or function
+value is to have a mode different from the normal mode then its modes
+must be declared in a declaration of the following form:</para>
+
+<para role='centered'>
+&scriptM; V, L, ..., F., ..., BFN.
+</para>
+
+<para>where &scriptM; is one of the phrases; INTEGER, BOOLEAN, STATEMENT LABEL,
+FUNCTION NAME, or FLOATING POINT; for example, BOOLEAN
+P,Q,DIGIT.TRUTH. Following &scriptM; is the list of variables and functions
+whose values are to be of mode &scriptM;. A program may contain any number
+of such mode declarations but a name may not be declared to be of two
+different modes.</para>
+
+<para>All constants are automatically assigned modes by the translator
+(see section 1.1). Other automatic assignments of modes are:</para>
+
+<orderedlist numeration='loweralpha'>
+<listitem><para>A name appearing in the statement label field is assigned
+statement label mode (see section 1.3).</para></listitem>
+
+<listitem><para>A function name constant is assigned function name mode (see
+section 1.4).</para></listitem>
+
+<listitem><para>A vector appearing as the dimension vector of some
+array in a dimension declaration is assigned integer mode (see section
+3.3).</para></listitem>
+
+<listitem><para>A vector which is preset by a vector values declaration is
+assigned a mode consistent with the assigned values (see section 3.7).
+</para></listitem>
+</orderedlist>
+
+</sect2>
+<sect2><title>Dimension Declaration</title>
+
+<para>Variables may be declared to be array variables, such as vectors or
+matrices of various dimensions, rather than individual variables.</para>
+
+<para>Each array is stored in a region whose elements may be referred to by
+means of a single subscript, such as A(0), A(1), B(16), etc. Even
+elements of higher dimensional arrays may be referred to in this way
+at any time. We shall call the subscript thus associated with each
+element of an array its "linear subscript." If A is an array then the
+name A is equivalent to A(0), e.e., the name A written without a
+subscript is assumed to have a subscript of zero.</para>
+
+<para>Two dimensional matrices are stored internally by rows, i.e., an
+m x n matrix will be stored in the order: a<subscript>11</subscript>,
+a<subscript>12</subscript>, a<subscript>13</subscript>, ...,
+a<subscript>1n</subscript>, a<subscript>21</subscript>, ...,
+a<subscript>2n</subscript>, ... a<subscript>mn</subscript>. In
+general, matrices are stroed in the order determined by varying the
+right-most subscript first, then the next right-most, etc. Thus, an m
+x n x p x q matrix would be stored in the order:
+a<subscript>1111</subscript>, a<subscript>1112</subscript>, ...,
+a<subscript>111q</subscript>, a<subscript>1121</subscript>,
+a<subscript>1122</subscript>, ... a<subscript>112q</subscript>, ...,
+a<subscript>11pq</subscript>, a<subscript>1211</subscript>,...,
+a<subscript>1npq</subscript>, ... a<subscript>mnpq</subscript>.</para>
+
+<para>Elements of higher dimensional arrays may be referred to not only by
+their linear subscripts but also by the usual matrix notation, such as
+A(1,1), A(I,J), B(I+6,J/3+3).</para>
+
+<para>Although any number of dimension declarations may be used in a
+program, as many variables as desired may be "declared" in any
+dimension declaration. The declaration consists of the word
+DIMENSION, followed by the variables to be declared. Each variable is
+immediately followed by one or two arguments (separated by a comma)
+enclosed in parentheses, as follows:</para>
+
+<para>The first argument is a positive integer constant, specifying the
+largest linear subscript which an element of the array is expected to
+assume during the execution of the program. The size of the region
+allocated is this number plus one, regardless of whether the program
+actually makes use of this amount or not.</para>
+
+<para>The second argument, given only for arrays with dimension n > 1, is
+the name of the first element in the "dimension vector" for this
+array. If this name is D(k) (k must be an integer constant), the
+vactor D is automatically assigned integer mode. D may not be
+declared to be other than integer. In addition, D must itself be
+dimensioned, either by declaration or by presetting its values
+(section 3.7) to have its largest linear subscript # k+n. Assuming
+that elements of the array to be dimensioned are to be referred to as
+A(I<subscript>1</subscript>, I<subscript>2</subscript>, I<subscript>n</subscript>), the elements of the linear array D, i.e. D(k), D(k +
+1), ...D(k + n), must be preset (or set during computation) to the
+values</para>
+
+<literallayout>
+ D(k) = n
+ D(k + 1) = the linear subscript which corresponds to A(1,1, ...1) - commonly set to 1
+ D(k + 2) = current upper bound of I<subscript>2</subscript> (i.e., the current highest value of I<subscript>2</subscript> during the computation)
+ D(k + 3) = current upper bound of I<subscript>3</subscript>
+ D(k + 4) = current upper bound of I<subscript>4</subscript>
+</literallayout>
+
+<para>The lower bound of each subscript is assumed to be unity.</para>
+
+<para>Thus, in the statement: DIMENSION XA(400, V), YT(300, K(3)) where V(0)
+=2,V(1) =6, v(2) =13, K(3) =3, K(4) =4, K(5) =8, and K(6) =9, the
+variables XA and YT are designated as 2-dimensional and 3-dimensional
+arrays respectively. Considering the array element XA(I,J), the range
+of J may be expressed by 1 ≤ J ≤ 8 and 1 ≤ K ≤ 9. The
+array XA will have a storage region of length 401 set aside for it,
+e.g., XA(0), ...XA(400), and the 395 elements XA(6), XA(7), ...,
+XA(400) may also be referred to as XA(1,1), XA(1,2), ...XA(31,5)
+respectively. The matrix will be located at various places in the XA
+region depending on the value of V(1) at the time a reference is made
+ot a matrix element during execution of the program. Observe that
+this ability to vary the location of the initial array element (i.e.,
+the array element with unit indices) within the linear array allows
+the effective use of negative subscripts - in spite of the fact that
+the defined ranges of the subscripts are positive.</para>
+
+<para>Similarly, the matrix YT will have 301 locations set aside for it,
+although these do not all have to be used. The base element of YT,
+i.e., YT(1,1, 1) will correspond to the element YT(4) since K(4) = 4.</para>
+
+<para>If the array is a vector, i.e., one-dimensional, a special convention
+is adopted. Only the first argument is given to the DIMENSION
+declaration. Thus, in the statement</para>
+
+<para role='centered'>
+DIMENSION V(10)
+</para>
+
+<para>the array V is specified as consisting of the eleven elements V(0),
+..., V(10). If a variable appears in more than one dimension
+declaration, the highest linear subscript will be used; however, the
+dimension vector must be the same in all occurrences. Negative
+subscripts are not available for vectors.</para>
+
+<para>Dimensioning is automatic in two situations</para>
+
+<para>(a) In case a statement label vector, say L, is used (see section 1.3)
+and n is the highest subscript used on L in the statement label field
+(i.e., if L(m) appears then m # n), then n + 1 locations are reserved
+for L. L may also appear in a dimension declaration in which case the
+highest linear subscript is used.</para>
+
+<para>(b) If part of all of a linear array is set by a VECTOR VALUES
+declaration the array need not appear in a dimension statement unless
+the maximum linear subscript implied by the initial values is not
+sufficiently high.</para>
</sect2>
</sect1>
</chapter>