home *** CD-ROM | disk | FTP | other *** search
Wrap
Errata for changes to Chapter 4 version 21 4.1.3 Selected Components (paragraph 20)4.1.3 Selected Components (paragraph 20)4.1.3 Selected Components (paragraph 20) The evaluation of a name that is a selected component includes the evaluation of the prefix. 4.1.3 Selected Components (paragraph 24)4.1.3 Selected Components (paragraph 24)4.1.3 Selected Components (paragraph 24) References:___________ accept statement 9.5, access type 3.8, access value 3.8, appropriate for a type 4.1, block statement 5.6, body of a program unit 3.9, character literal 2.5, component of a record 3.7, constraint_error exception 11.1, declaration 3.1, designate 3.8, discriminant 3.3, entity 3.1, entry 9.5, entry family 9.5, function call 6.4, index 3.6, loop statement 5.5, object 3.2.1, occur immediately within 8.1, operator 4.5, operator symbol 6.1, overloading 8.3, package 7, predefined type C, prefix 4.1, procedure body 6.3, program unit 6, raising of exceptions 11, record 3.7, record component 3.7, renaming declaration 8.5, reserved word 2.9, simple name 4.1, subprogram 6, subunit 10.2, task 9, task object 9.2, task unit 9, variable 3.7.3, variant 3.7.3, visibility 8.3, visible part 3.7.3 4.1.4 Attributes (paragraph 3)4.1.4 Attributes (paragraph 3)4.1.4 Attributes (paragraph 3) The applicable attribute designators depend on the prefix. An attribute can be a basic operation delivering a value; alternatively it can be a function, a type, or a range. The meaning of the prefix of an attribute must be determinable independently of the attribute designator and independently of the fact that it is the prefix of an attribute. 4.1.4 Attributes (paragraph 4)4.1.4 Attributes (paragraph 4)4.1.4 Attributes (paragraph 4) The attributes defined by the language are summarized in Annex A. In addition, an implementation may provide implementation-defined attributes; their description must be given in Appendix F. The attribute designator of any implementation-defined attribute must not be the same as that of any language-defined attribute. 4.1.4 (paragraph 6)4.1.4 (paragraph 6)4.1.4 (paragraph 6) The attribute designators DIGITS, DELTA, and RANGE have the same identifier as a reserved word. However, no confusion is possible since an attribute designator is always preceded by an apostrophe. The only predefined attribute designators that have a universal expression are those for certain operations of array types (see 3.6.2). -1 (paragraph 6) 4.1.4 4.2 Literals (paragraphs 1 2 3)4.2 Literals (paragraphs 1 2 3)4.2 Literals (paragraphs 1 2 3) A literal is either a numeric literal, an enumeration literal, the literal nullnullnull, or a string literal. The evaluation of a literal yields the corresponding value. Numeric literals are the literals of the types universal_integer_________________ and universal_real______________. Enumeration literals include character literals and yield values of the corresponding enumeration types. The literal nullnullnull yields a null access value which designates no objects at all. A string literal is a basic operation that combines a sequence of characters into a value of a one-dimensional array of a character type; the bounds of this array are determined according to the rules for positional array aggregates (see 4.3.2). For a null string literal, the upper bound is the predecessor, as given by the PRED attribute, of the lower bound. The evaluation of a null string literal raises the exception CONSTRAINT_ERROR if the lower bound does not have a predecessor (see 3.5.5). 4.2 Literals (paragraph 6)4.2 Literals (paragraph 6)4.2 Literals (paragraph 6) References:___________ access type 3.8, aggregate 4.3, array 3.6, array bound 3.6, array type 3.6, character literal 2.5, character type 3.5.2, component type 3.3, constraint_error exception 11.1, designate 3.8, dimension 3.6, enumeration literal 3.5.1, graphic character 2.1, integer literal 2.4, null access value 3.8, null literal 3.8, numeric literal 2.4, object 3.2.1, real literal 2.4, string literal 2.6, type 3.3, universal_integer type 3.5.4, universal_real type 3.5.6, visibility 8.3 4.3.2 Array Aggregates (paragraph 5 6)4.3.2 Array Aggregates (paragraph 5 6)4.3.2 Array Aggregates (paragraph 5 6) (a) The aggregate is an actual parameter, a generic actual parameter, the result expression of a function, or the expression that follows an assignment compound delimiter. Moreover, the subtype of the corresponding formal parameter, generic formal parameter, function result, or object is a constrained array subtype. For an aggregate that appears in such a context and contains an association with an othersothersothers choice, named associations are allowed for other associations only in the case of a (nongeneric) actual parameter or function result. If the aggregate is a multidimensional array, this restriction also applies to each of its subaggregates. 4.3.2 Array Aggregates (paragraph 8)4.3.2 Array Aggregates (paragraph 8)4.3.2 Array Aggregates (paragraph 8) (c) The aggregate is the expression of the component association of an enclosing (array or record) aggregate. Moreover, if this enclosing aggregate is a multidimensional array aggregate then it is itself in one of these three contexts. 4.3.2 Array Aggregates (paragraph 8) -2 4.3.2 Array Aggregates (paragraph 11)4.3.2 Array Aggregates (paragraph 11)4.3.2 Array Aggregates (paragraph 11) For the evaluation of an aggregate that is not a null array, a check is made that the index values defined by choices belong to the corresponding index subtypes, and also that the value of each subcomponent of the aggregate belongs to the subtype of this subcomponent. For an n-dimensional multidimensional aggregate, a check is made that all (n-1)-dimensional subaggregates have the same bounds. The exception CONSTRAINT_ERROR is raised if any of these checks fails. 4.5 Operators and Expression Evaluation4.5 Operators and Expression Evaluation4.5 Operators and Expression Evaluation The language defines the following six classes of operators. The corresponding operator symbols (except /=), and only those, can be used as designators in declarations of functions for user-defined operators. They are given in the order of increasing precedence. 4.5 Operator and Expression Evaluation (paragraph 9)4.5 Operator and Expression Evaluation (paragraph 9)4.5 Operator and Expression Evaluation (paragraph 9) References:___________ designator 6.1, expression 4.4, factor 4.4, implicit declaration 3.1, in some order 1.6, integer type 3.5.4, membership test 4.5.2, name 4.1, numeric_error exception 11.1, overloading 6.6 8.7, raising of an exception 11, range 3.5, real type 3.5.6, relation 4.4, safe number 3.5.6, short-circuit control form 4.5 4.5.1, simple expression 4.4, term 4.4, type 3.3, type declaration 3.3.1, universal_integer type 3.5.4, universal_real type 3.5.6 4.5.2 Relational Operators and Membership Tests (paragraph 13)4.5.2 Relational Operators and Membership Tests (paragraph 13)4.5.2 Relational Operators and Membership Tests (paragraph 13) If a record type has components that depend on discriminants, two values of this type have matching components if and only if their discriminants are equal. Two nonnull arrays have matching components if and only if the value of the attribute LENGTH(N) for each index position N is the same for both. 4.5.3 Binary Adding Operators (paragraph 8)4.5.3 Binary Adding Operators (paragraph 8)4.5.3 Binary Adding Operators (paragraph 8) References:___________ array type 3.6, character literal 2.5, component type 3.3, constraint_error exception 11.1, dimension 3.6, index subtype 3.6, length of an array 3.6.2, limited type 7.4.4, null array 3.6.1, numeric type 3.5, operation 3.3, operator 4.5, predefined operator 4.5, raising of exceptions 11, range of an index subtype 3.6.1, real type 3.5.6, string literal 2.6, type 3.3 4.5.7 Accuracy of Operations with Real Operands (paragraph 8)4.5.7 Accuracy of Operations with Real Operands (paragraph 8)4.5.7 Accuracy of Operations with Real Operands (paragraph 8) The safe numbers of a real type are defined (see 3.5.6) as a superset of the model numbers, for which error bounds follow the same rules as for model numbers. Any definition given in this section in terms of model intervals can therefore be extended to safe intervals of safe numbers. -3 Accuracy of Operations with Real Operands (paragraph 8) 4.5.7 A consequence of this extension is that an implementation is not allowed to raise the exception NUMERIC_ERROR when the result interval is a safe interval. 4.5.7 Accuracy of Operations with Real Operands (paragraph 13)4.5.7 Accuracy of Operations with Real Operands (paragraph 13)4.5.7 Accuracy of Operations with Real Operands (paragraph 13) References:___________ attribute 4.1.4, basic operation 3.3.3, bound of a range 3.5, error bound 3.5.6, exponentiation operation 4.5.6, false boolean value 3.5.3, floating point type 3.5.9, machine_overflows attribute 13.7.1, membership test 4.5.2, model number 3.5.6, multiplication operation 4.5.5, numeric_error exception 11.1, predefined operation 3.3.3, raising of exceptions 11, range 3.5, real type 3.5.6, relation 4.4, relational operator 4.5.2 4.5, safe number 3.5.6, subtype 3.3, true boolean value 3.5.3, type conversion 4.6, type mark 3.3.2, universal expression 4.10 4.6 Type Conversions (paragraph 3)4.6 Type Conversions (paragraph 3)4.6 Type Conversions (paragraph 3) The target type of a type conversion is the base type of the type mark. The type of the operand of a type conversion must be determinable independently of the context (in particular, independently of the target type). Furthermore, the operand of a type conversion is not allowed to be a literal nullnullnull, an allocator, an aggregate, or a string literal; an expression enclosed by parentheses is allowed as the operand of a type conversion only if the expression alone is allowed. 4.7 Qualified Expressions (paragraph 5)4.7 Qualified Expressions (paragraph 5)4.7 Qualified Expressions (paragraph 5) Whenever the type of an enumeration literal or aggregate is not known from the context, a qualified expression can be used to state the type explicitly. For example, an overloaded enumeration literal must be qualified in the following cases: when given as a parameter in a subprogram call to an overloaded subprogram that cannot otherwise be identified on the basis of remaining parameter or result types, in a relational expression where both operands are overloaded enumeration literals, or in an array or loop parameter range where both bounds are overloaded enumeration literals. Explicit qualification is also used to specify which one of a set of overloaded parameterless functions is meant, or to constrain a value to a given subtype. 4.9 Static Expressions and Static Subtypes (paragraph 14)4.9 Static Expressions and Static Subtypes (paragraph 14)4.9 Static Expressions and Static Subtypes (paragraph 14) References:___________ actual parameter 6.4.1, attribute 4.1.4, base type 3.3, bound of a range 3.5, character literal 2.5, constant 3.2.1, constant declaration 3.2.1, discrete range 3.6, discrete type 3.5, enumeration literal 3.5.1, exception 11, expression 4.4, function 6.5, generic actual parameter 12.3, generic formal type 12.1.2, implicit declaration 3.1, initialize 3.2.1, model number 3.5.6, named number 3.2, numeric literal 2.4, predefined operator 4.5, qualified expression 4.7, raising of exceptions 11, range constraint 3.5, safe number 3.5.6, scalar type 3.5, subtype 3.3, type mark 3.3.2 4.9 Static Expressions and Static Subtypes (paragraph 14) -4