<p>An array variable name which is not followed by a subscript behaves as if its zero-indexed element is referenced.</p>
<p>An array variable name which is not followed by a subscript behaves as if its zero-indexed element is referenced.</p>
</div>
</div>
<divclass="paragraph">
<p>A variable used for indexing an array must not be an array.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -870,16 +873,16 @@ <h3 id="string-constants"><a class="anchor" href="#string-constants"></a>6.1. St
<p>A <em>string constant</em> is a name associated with an integer value. Such association is known in the translation environment.</p>
<p>A <em>string constant</em> is a name associated with an integer value. Such association is known in the translation environment.</p>
</div>
</div>
<divclass="paragraph">
<divclass="paragraph">
<p>An <em>enumeration</em> is a collection of string constants.</p>
<p>An <em>enumeration</em> is a collection of string constants. A parameter definition can have an associated enumeration.</p>
</div>
</div>
<divclass="paragraph">
<divclass="paragraph">
<p>A parameter definition can have an associated enumeration. A string constant is said to be a match if an identifier in an argument refers to a name in its parameter’s enumeration.</p>
<p>There is a special enumeration called the <em>global string constants enumeration</em>.</p>
</div>
</div>
<divclass="paragraph">
<divclass="paragraph">
<p>There is an special enumeration called the <em>global string constants enumeration</em> which semantics are defined along this specification. Other enumerations can be defined by an implementation.</p>
<p>An identifier is said to match a string constant in certain enumeration if there exists a name in the enumeration with the same name as the identifier.</p>
</div>
</div>
<divclass="paragraph">
<divclass="paragraph">
<p>If a parameter definition specifies an enumeration, the global string constants enumeration cannot be matched in the said parameter.</p>
<p>Further semantics for string constants are defined along this specification.</p>
</div>
</div>
</div>
</div>
<divclass="sect2">
<divclass="sect2">
@@ -902,7 +905,7 @@ <h3 id="parameter-types"><a class="anchor" href="#parameter-types"></a>6.3. Para
<p>An <em>INPUT_INT parameter</em> accepts an argument only if it is an integer literal or an identifier either matching a string constant, global string constant or referencing a variable of integer type (in this order).</p>
<p>An <em>INPUT_INT parameter</em> accepts an argument only if it is an integer literal or an identifier either matching a string constant or referencing a variable of integer type (in this order).</p>
</div>
<divclass="paragraph">
<p>If the parameter has an associated enumeration, the said enumeration shall be used for matching string constants. Otherwise, the global constant enumeration shall be used.</p>
<p>An <em>INPUT_FLOAT parameter</em> accepts an argument only if it is a floating-point literal or an identifier referencing a variable of floating-point type.</p>
<p>An <em>INPUT_FLOAT parameter</em> accepts an argument only if it is a floating-point literal or an identifier referencing a variable of floating-point type.</p>
</div>
</div>
<divclass="paragraph">
<p>If the argument matches a global string constant, even if a variable of same name exists, the program is ill-formed.</p>
<p>If an entity type is associated with the parameter, the variable must have the same entity type as the parameter, unless there is no entity type associated with the variable. In the latter case, the parameter’s entity type is assigned to the variable.</p>
<p>If an entity type is associated with the parameter, the variable must have the same entity type as the parameter, unless there is no entity type associated with the variable. In the latter case, the parameter’s entity type is assigned to the variable.</p>
</div>
</div>
<divclass="paragraph">
<p>If the argument matches a global string constant, even if a variable of same name exists, the program is ill-formed.</p>
<p>A <em>TEXT_LABEL parameter</em> accepts an argument only if it is an identifier. If the identifier begins with a dollar character, its suffix must reference a variable of text label type and such a variable is the actual argument. Otherwise, the identifier is a text label.</p>
<p>A <em>TEXT_LABEL parameter</em> accepts an argument only if it is an identifier. If the identifier begins with a dollar character, its suffix must reference a variable of text label type and such a variable is the actual argument. Otherwise, the identifier is a text label.</p>
</div>
</div>
<divclass="paragraph">
<p>If the identifier matches a global string constant, the program is ill-formed.</p>
<p>Such parameters are always trailing parameters.</p>
<p>Such parameters are always trailing parameters.</p>
</div>
</div>
<divclass="paragraph">
<divclass="paragraph">
<p><aid="parameter-type-input-opt"></a> The <em>INPUT_OPT parameter</em> accepts an argument only if it is an integer literal, floating-point literal, or identifier referencing a variable of integer or floating-point type. A variable of text label type may be accepted by an INPUT_OPT parameter.</p>
<p><aid="parameter-type-input-opt"></a> The <em>INPUT_OPT parameter</em> accepts an argument only if it is an integer literal, floating-point literal, or identifier matching a global string constant or referencing a variable of integer or floating-point type (in this order). A variable of text label type may be accepted by an INPUT_OPT parameter.</p>
<p>A command selector consists of a name and a finite sequence of commands which are alternatives for replacement.</p>
<p>A command selector consists of a name and a finite sequence of commands which are alternatives for replacement.</p>
</div>
</div>
<divclass="paragraph">
<divclass="paragraph">
<p>A command name which is the name of a selector shall behave as if its command name is rewritten as a matching alternative before any parameter checking takes place.</p>
<p>An actual command named after a selector shall behave as if its command name is rewritten as a matching alternative before any parameter checking takes place.</p>
</div>
</div>
<divclass="paragraph">
<divclass="paragraph">
<p>A <em>matching alternative</em> is the first command in the alternative sequence to have the same amount of parameters as arguments in the actual command, and to obey the following rules for every argument and its corresponding parameter:</p>
<p>A <em>matching alternative</em> is the first command in the alternative sequence to have the same amount of parameters as arguments in the actual command, and to obey the following rules for every argument and its corresponding parameter:</p>
<p>If the identifier matches a global string constant, the parameter type must be <em>INT</em>.</p>
<p>If the identifier matches a global string constant, the parameter type must be INT and the argument shall behave as if rewritten as an integer literal corresponding to the string constant value.</p>
</li>
</li>
<li>
<li>
<p>If the identifier references a global variable, the parameter type must be either (depending on the type of the said variable) <em>VAR_INT</em>, <em>VAR_FLOAT</em> or <em>VAR_TEXT_LABEL</em>.</p>
<p>If the identifier references a global variable, the parameter type must be either (depending on the type of the said variable) <em>VAR_INT</em>, <em>VAR_FLOAT</em> or <em>VAR_TEXT_LABEL</em>.</p>
<p>If the identifier references a local variable, the same rule as above applies, except by using <em>LVAR_INT</em>, <em>LVAR_FLOAT</em> and <em>LVAR_TEXT_LABEL</em>.</p>
<p>If the identifier references a local variable, the same rule as above applies, except by using <em>LVAR_INT</em>, <em>LVAR_FLOAT</em> and <em>LVAR_TEXT_LABEL</em>.</p>
</li>
</li>
<li>
<li>
<p>If the identifier matches any string constant in any enumeration, the parameter type must be <em>INPUT_INT</em> and the argument shall behave as if rewritten as an integer literal corresponding to the string constant’s value.</p>
<p>If the identifier matches any string constant in any enumeration (except the global enumeration), the parameter type must be <em>INPUT_INT</em> and the argument shall behave as if rewritten as an integer literal corresponding to the string constant value.</p>
</li>
</li>
<li>
<li>
<p>Otherwise, the parameter type must be <em>TEXT_LABEL</em>.</p>
<p>Otherwise, the parameter type must be <em>TEXT_LABEL</em>.</p>