home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / lrm / chap04.err < prev    next >
Encoding:
Text File  |  1988-05-03  |  14.1 KB  |  266 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                             Errata for changes to Chapter 4 version 21
  7.  
  8.  
  9.  
  10. 4.1.3  Selected Components (paragraph 20)4.1.3  Selected Components (paragraph 20)4.1.3  Selected Components (paragraph 20)
  11.  
  12.  
  13. The evaluation of a name that is a selected component includes the evaluation of the prefix.
  14.  
  15.  
  16.  
  17.  
  18. 4.1.3  Selected Components (paragraph 24)4.1.3  Selected Components (paragraph 24)4.1.3  Selected Components (paragraph 24)
  19.  
  20.  
  21. References:___________ accept statement 9.5, access type 3.8, access value 3.8, appropriate for a  type  4.1,
  22. block statement 5.6, body of a program unit 3.9, character literal 2.5, component of a record 3.7,
  23. constraint_error  exception  11.1,  declaration  3.1, designate 3.8, discriminant 3.3, entity 3.1,
  24. entry 9.5, entry family 9.5, function call 6.4, index 3.6, loop statement 5.5, object 3.2.1, occur
  25. immediately within 8.1, operator 4.5, operator symbol 6.1, overloading 8.3, package 7,  predefined
  26. type  C,  prefix  4.1,  procedure  body 6.3, program unit 6, raising of exceptions 11, record 3.7,
  27. record component 3.7, renaming declaration 8.5, reserved word 2.9, simple name 4.1, subprogram  6,
  28. subunit 10.2, task 9, task object 9.2, task unit 9, variable 3.7.3, variant 3.7.3, visibility 8.3,
  29. visible part 3.7.3
  30.  
  31.  
  32.  
  33. 4.1.4  Attributes (paragraph 3)4.1.4  Attributes (paragraph 3)4.1.4  Attributes (paragraph 3)
  34.  
  35.  
  36. The  applicable attribute designators depend on the prefix.  An attribute can be a basic operation
  37. delivering a value;  alternatively it can be a function, a type, or a range.  The meaning  of  the
  38. prefix  of  an  attribute  must  be  determinable  independently  of  the attribute designator and
  39. independently of the fact that it is the prefix of an attribute.
  40.  
  41.  
  42.  
  43.  
  44. 4.1.4  Attributes (paragraph 4)4.1.4  Attributes (paragraph 4)4.1.4  Attributes (paragraph 4)
  45.  
  46.  
  47. The attributes defined by the language are summarized in Annex A.  In addition, an  implementation
  48. may  provide  implementation-defined  attributes;   their description must be given in Appendix F.
  49. The attribute designator of any implementation-defined attribute must not be the same as  that  of
  50. any language-defined attribute.
  51.  
  52.  
  53.  
  54. 4.1.4  (paragraph 6)4.1.4  (paragraph 6)4.1.4  (paragraph 6)
  55.  
  56.  
  57. The  attribute  designators  DIGITS, DELTA, and RANGE have the same identifier as a reserved word.
  58. However, no confusion is  possible  since  an  attribute  designator  is  always  preceded  by  an
  59. apostrophe.   The only predefined attribute designators that have a universal expression are those
  60. for certain operations of array types (see 3.6.2).
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. -1                                                                             (paragraph 6) 4.1.4
  68.  
  69.  
  70.  
  71.  
  72. 4.2  Literals (paragraphs 1 2 3)4.2  Literals (paragraphs 1 2 3)4.2  Literals (paragraphs 1 2 3)
  73.  
  74.  
  75. A literal is either a numeric literal, an enumeration literal,  the  literal  nullnullnull,  or  a  string
  76. literal.  The evaluation of a literal yields the corresponding value.
  77.  
  78. Numeric  literals are the literals of the types universal_integer_________________ and universal_real______________.  Enumeration
  79. literals include character literals and yield values of the corresponding enumeration types.   The
  80. literal nullnullnull yields a null access value which designates no objects at all.
  81.  
  82. A  string  literal  is  a basic operation that combines a sequence of characters into a value of a
  83. one-dimensional array of a character type;  the bounds of this array are determined  according  to
  84. the rules for positional array aggregates (see 4.3.2).  For a null string literal, the upper bound
  85. is  the predecessor, as given by the PRED attribute, of the lower bound.  The evaluation of a null
  86. string literal raises  the  exception  CONSTRAINT_ERROR  if  the  lower  bound  does  not  have  a
  87. predecessor (see 3.5.5).
  88.  
  89.  
  90.  
  91.  
  92. 4.2  Literals (paragraph 6)4.2  Literals (paragraph 6)4.2  Literals (paragraph 6)
  93.  
  94.  
  95. References:___________  access type 3.8, aggregate 4.3, array 3.6, array bound 3.6, array type 3.6, character
  96. literal 2.5, character type 3.5.2, component type 3.3, constraint_error exception 11.1,  designate
  97. 3.8,  dimension  3.6,  enumeration literal 3.5.1, graphic character 2.1, integer literal 2.4, null
  98. access value 3.8, null literal 3.8, numeric literal 2.4, object 3.2.1, real  literal  2.4,  string
  99. literal 2.6, type 3.3, universal_integer type 3.5.4, universal_real type 3.5.6, visibility 8.3
  100.  
  101.  
  102.  
  103. 4.3.2  Array Aggregates (paragraph 5 6)4.3.2  Array Aggregates (paragraph 5 6)4.3.2  Array Aggregates (paragraph 5 6)
  104.  
  105.  
  106.  
  107. (a)  The aggregate is an actual parameter, a generic actual parameter, the result expression of  a
  108.      function,  or  the  expression  that follows an assignment compound delimiter.  Moreover, the
  109.      subtype of the corresponding formal parameter, generic formal parameter, function result,  or
  110.      object is a constrained array subtype.
  111.  
  112.      For  an  aggregate  that appears in such a context and contains an association with an othersothersothers
  113.      choice, named associations are  allowed  for  other  associations  only  in  the  case  of  a
  114.      (nongeneric)  actual  parameter  or  function result.  If the aggregate is a multidimensional
  115.      array, this restriction also applies to each of its subaggregates.
  116.  
  117.  
  118.  
  119.  
  120. 4.3.2  Array Aggregates (paragraph 8)4.3.2  Array Aggregates (paragraph 8)4.3.2  Array Aggregates (paragraph 8)
  121.  
  122.  
  123.  
  124. (c)  The aggregate is the expression of the  component  association  of  an  enclosing  (array  or
  125.      record)  aggregate.   Moreover,  if  this  enclosing  aggregate  is  a multidimensional array
  126.      aggregate then it is itself in one of these three contexts.
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. 4.3.2 Array Aggregates (paragraph 8)                                                            -2
  134.  
  135.  
  136.  
  137.  
  138. 4.3.2  Array Aggregates (paragraph 11)4.3.2  Array Aggregates (paragraph 11)4.3.2  Array Aggregates (paragraph 11)
  139.  
  140.  
  141. For the evaluation of an aggregate that is not a null array, a check is made that the index values
  142. defined by choices belong to the corresponding index subtypes, and also that  the  value  of  each
  143. subcomponent  of  the aggregate belongs to the subtype of this subcomponent.  For an n-dimensional
  144. multidimensional aggregate, a check is made that all (n-1)-dimensional subaggregates have the same
  145. bounds.  The exception CONSTRAINT_ERROR is raised if any of these checks fails.
  146.  
  147.  
  148.  
  149. 4.5  Operators and Expression Evaluation4.5  Operators and Expression Evaluation4.5  Operators and Expression Evaluation
  150.  
  151.  
  152. The language defines the following six classes of operators.  The corresponding  operator  symbols
  153. (except  /=),  and  only  those,  can  be  used  as  designators  in declarations of functions for
  154. user-defined operators.  They are given in the order of increasing precedence.
  155.  
  156.  
  157.  
  158. 4.5  Operator and Expression Evaluation (paragraph 9)4.5  Operator and Expression Evaluation (paragraph 9)4.5  Operator and Expression Evaluation (paragraph 9)
  159.  
  160.  
  161. References:___________ designator 6.1, expression 4.4, factor 4.4, implicit declaration 3.1,  in  some  order
  162. 1.6,  integer  type  3.5.4,  membership  test  4.5.2,  name  4.1,  numeric_error  exception  11.1,
  163. overloading 6.6 8.7, raising of an exception 11, range 3.5, real type 3.5.6,  relation  4.4,  safe
  164. number  3.5.6,  short-circuit  control  form 4.5 4.5.1, simple expression 4.4, term 4.4, type 3.3,
  165. type declaration 3.3.1, universal_integer type 3.5.4, universal_real type 3.5.6
  166.  
  167.  
  168.  
  169. 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)
  170.  
  171.  
  172. If a record type has components that depend  on  discriminants,  two  values  of  this  type  have
  173. matching  components  if  and  only  if  their  discriminants  are equal.  Two nonnull arrays have
  174. matching components if and only if the value of the attribute LENGTH(N) for each index position  N
  175. is the same for both.
  176.  
  177.  
  178.  
  179. 4.5.3  Binary Adding Operators (paragraph 8)4.5.3  Binary Adding Operators (paragraph 8)4.5.3  Binary Adding Operators (paragraph 8)
  180.  
  181.  
  182. References:___________  array type 3.6, character literal 2.5, component type 3.3, constraint_error exception
  183. 11.1, dimension 3.6, index subtype 3.6, length of an array 3.6.2, limited type 7.4.4,  null  array
  184. 3.6.1,  numeric  type  3.5,  operation  3.3,  operator  4.5,  predefined  operator 4.5, raising of
  185. exceptions 11, range of an index subtype 3.6.1, real type 3.5.6, string literal 2.6, type 3.3
  186.  
  187.  
  188.  
  189.  
  190. 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)
  191.  
  192.  
  193. The safe numbers of a real type are defined (see 3.5.6) as a superset of the  model  numbers,  for
  194. which  error  bounds  follow  the  same  rules as for model numbers.  Any definition given in this
  195. section in terms of model intervals can therefore be extended to safe intervals of  safe  numbers.
  196.  
  197.  
  198.  
  199. -3                                   Accuracy of Operations with Real Operands (paragraph 8) 4.5.7
  200.  
  201.  
  202.  
  203.  
  204. A  consequence  of  this extension is that an implementation is not allowed to raise the exception
  205. NUMERIC_ERROR when the result interval is a safe interval.
  206.  
  207.  
  208.  
  209. 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)
  210.  
  211.  
  212. References:___________ attribute 4.1.4, basic operation 3.3.3, bound of  a  range  3.5,  error  bound  3.5.6,
  213. exponentiation   operation   4.5.6,   false  boolean  value  3.5.3,  floating  point  type  3.5.9,
  214. machine_overflows attribute 13.7.1, membership test  4.5.2,  model  number  3.5.6,  multiplication
  215. operation  4.5.5,  numeric_error exception 11.1, predefined operation 3.3.3, raising of exceptions
  216. 11, range 3.5, real type 3.5.6, relation 4.4, relational operator 4.5.2 4.5,  safe  number  3.5.6,
  217. subtype  3.3, true boolean value 3.5.3, type conversion 4.6, type mark 3.3.2, universal expression
  218. 4.10
  219.  
  220.  
  221.  
  222.  
  223. 4.6  Type Conversions (paragraph 3)4.6  Type Conversions (paragraph 3)4.6  Type Conversions (paragraph 3)
  224.  
  225.  
  226. The target type of a type conversion is the base type of the type mark.  The type of  the  operand
  227. of  a  type  conversion  must  be  determinable  independently  of  the  context  (in  particular,
  228. independently of the target type).  Furthermore, the operand of a type conversion is  not  allowed
  229. to  be a literal nullnullnull, an allocator, an aggregate, or a string literal;  an expression enclosed by
  230. parentheses is allowed as the operand of a  type  conversion  only  if  the  expression  alone  is
  231. allowed.
  232.  
  233.  
  234.  
  235. 4.7  Qualified Expressions (paragraph 5)4.7  Qualified Expressions (paragraph 5)4.7  Qualified Expressions (paragraph 5)
  236.  
  237.  
  238. Whenever  the  type  of  an  enumeration  literal  or  aggregate  is not known from the context, a
  239. qualified expression can be used to  state  the  type  explicitly.   For  example,  an  overloaded
  240. enumeration  literal  must  be  qualified in the following cases:  when given as a parameter  in a
  241. subprogram call to an overloaded subprogram that cannot otherwise be identified on  the  basis  of
  242. remaining parameter or result types, in a relational expression where both operands are overloaded
  243. enumeration  literals,  or  in  an  array or loop parameter range where both bounds are overloaded
  244. enumeration literals.  Explicit qualification is also used to  specify  which  one  of  a  set  of
  245. overloaded parameterless functions is meant, or to constrain a value to a given subtype.
  246.  
  247.  
  248.  
  249. 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)
  250.  
  251.  
  252. References:___________  actual  parameter  6.4.1,  attribute  4.1.4,  base  type  3.3,  bound of a range 3.5,
  253. character literal 2.5, constant 3.2.1, constant declaration 3.2.1, discrete  range  3.6,  discrete
  254. type  3.5,  enumeration  literal 3.5.1, exception 11, expression 4.4, function 6.5, generic actual
  255. parameter 12.3, generic formal type 12.1.2, implicit  declaration  3.1,  initialize  3.2.1,  model
  256. number 3.5.6, named number 3.2, numeric literal 2.4, predefined operator 4.5, qualified expression
  257. 4.7,  raising  of exceptions 11, range constraint 3.5, safe number 3.5.6, scalar type 3.5, subtype
  258. 3.3, type mark 3.3.2
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265. 4.9 Static Expressions and Static Subtypes (paragraph 14)                                       -4
  266.