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

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                             Errata for changes to Chapter 3 version 21
  7.  
  8.  
  9.  
  10.  
  11. 3.1  Declarations (paragraph 8)3.1  Declarations (paragraph 8)3.1  Declarations (paragraph 8)
  12.  
  13.  
  14. The process by which  a  declaration  achieves  its  effect  is  called  the  elaboration___________  of  the
  15. declaration;  this process happens during program execution.
  16.  
  17.  
  18.  
  19. 3.1  Declarations (paragraph 9)3.1  Declarations (paragraph 9)3.1  Declarations (paragraph 9)
  20.  
  21.  
  22. After  its  elaboration,  a  declaration is said to be elaborated__________.  Prior to the completion of its
  23. elaboration (including before the elaboration),  the  declaration  is  not  yet  elaborated.   The
  24. elaboration  of  any  declaration has always at least the effect of achieving this change of state
  25. (from not yet elaborated to elaborated).  The phrase "the___ elaboration___________ has___ no__ other_____ effect______" is used
  26. in this manual whenever this change of state is the only effect of elaboration for  some  form  of
  27. declaration.  An elaboration process is also defined for declarative parts, declarative items, and
  28. compilation units (see 3.9 and 10.5).
  29.  
  30.  
  31.  
  32. 3.2  Objects and Named Numbers (paragraph 14)3.2  Objects and Named Numbers (paragraph 14)3.2  Objects and Named Numbers (paragraph 14)
  33.  
  34.  
  35. References:___________  access  type  3.8,  constrained array definition 3.6, component 3.3, declaration 3.1,
  36. deferred constant declaration 7.4, designate 3.8, discriminant  specification  3.7.1,  entry  9.5,
  37. exception  declaration  11.1,  expression 4.4, formal parameter 6.1, generic formal object 12.1.1,
  38. generic parameter declaration 12.1, generic unit 12, generic subprogram 12.1, identifier 2.3, loop
  39. parameter 5.5, numeric type 3.5, parameter specification 6.1, scope 8.2, simple name  4.1,  single
  40. task  declaration 9.1, slice 4.1.2, static expression 4.9, subprogram 6, subtype indication 3.3.2,
  41. type 3.3, universal_integer type 3.5.4, universal_real type 3.5.6
  42.  
  43.  
  44.  
  45.  
  46. 3.2.1  Object Declarations (paragraph 2)3.2.1  Object Declarations (paragraph 2)3.2.1  Object Declarations (paragraph 2)
  47.  
  48.  
  49. The declared object is a constant________ if the reserved word constantconstantconstant appears in the object declaration;
  50. the declaration must then include an explicit initialization.  The value of a constant  cannot  be
  51. modified  after  initialization.   Formal  parameters  of  mode ininin of subprograms and entries, and
  52. generic formal parameters of mode ininin, are also constants;  a loop parameter is a  constant  within
  53. the corresponding loop;  a subcomponent or slice of a constant is a constant.
  54.  
  55.  
  56.  
  57. 3.2.1  Object Declarations (paragraph 18)3.2.1  Object Declarations (paragraph 18)3.2.1  Object Declarations (paragraph 18)
  58.  
  59.  
  60. If  the  operand  of  a  type  conversion  or  qualified  expression is a variable that has scalar
  61. subcomponents with undefined values, then the values of the  corresponding  subcomponents  of  the
  62. result  are  undefined.   The  execution  of  a program is erroneous if it attempts to evaluate  a
  63. scalar variable with an undefined value.  Similarly, the execution of a program is erroneous if it
  64.  
  65.  
  66.  
  67. -1                                                        Object Declarations (paragraph 18) 3.2.1
  68.  
  69.  
  70.  
  71.  
  72. attempts to apply a predefined operator to a variable that  has  a  scalar  subcomponent  with  an
  73. undefined value.
  74.  
  75.  
  76.  
  77.  
  78. 3.2.1  Object Declarations (paragraph 22)3.2.1  Object Declarations (paragraph 22)3.2.1  Object Declarations (paragraph 22)
  79.  
  80.  
  81. References:___________  access  type  3.8,  assignment 5.2, assignment compound delimiter 5.2, component 3.3,
  82. composite type 3.3, constrained array definition 3.6, constrained  subtype  3.3,  constraint_error
  83. exception  11.1,  conversion  4.6,  declaration  3.1,  default  expression for a discriminant 3.7,
  84. default initial value for an access type 3.8, depend  on  a  discriminant  3.7.1,  designate  3.8,
  85. discriminant  3.3,  elaboration  3.9,  entry 9.5, evaluation 4.5, expression 4.4, formal parameter
  86. 6.1, generic formal parameter 12.1 12.3, generic unit 12, in some order 1.6, limited  type  7.4.4,
  87. mode  in  6.1,  package  7,  predefined  operator  4.5,  primary  4.4, private type 7.4, qualified
  88. expression 4.7, reserved word 2.9, scalar type 3.5, slice 4.1.2, subcomponent 3.3,  subprogram  6,
  89. subtype 3.3, subtype indication 3.3.2, task 9, task type 9.2, type 3.3, visible part 7.2
  90.  
  91.  
  92.  
  93. 3.3  Types and Subtypes (paragraph 2)3.3  Types and Subtypes (paragraph 2)3.3  Types and Subtypes (paragraph 2)
  94.  
  95.  
  96. There  exist  several  classes_______  of  types.   Scalar______ types are integer types, real types, and types
  97. defined by enumeration of their values;  values of these types have  no  components.    Array_____  and
  98. record______  types are composite;  a value of a composite type consists of component_________ values.  An access______
  99. type is a type whose values provide access to objects.  Private_______ types are types for which the  set
  100. of  possible  values  is  well  defined,  but  not  directly available to the users of such types.
  101. Finally, there are task____ types.  (Private  types  are  described  in  chapter  7,  task  types  are
  102. described in chapter 9, the other classes of types are described in this chapter.)
  103.  
  104.  
  105.  
  106. 3.3  Types and Subtypes (paragraph 10)3.3  Types and Subtypes (paragraph 10)3.3  Types and Subtypes (paragraph 10)
  107.  
  108.  
  109. The  set  of values of a subtype is a subset of the values of the base type.  This subset need not
  110. be a proper subset;  it can be an empty subset.
  111.  
  112.  
  113.  
  114. 3.3  Types and Subtypes (paragraph 11)3.3  Types and Subtypes (paragraph 11)3.3  Types and Subtypes (paragraph 11)
  115.  
  116.  
  117. References:___________ access type 3.8, array type 3.6, assignment 5.2,  attribute  4.1.4,  component  of  an
  118. array  3.6,  component  of  a  record  3.7, discriminant constraint 3.7.2, enumeration type 3.5.1,
  119. integer type 3.5.4, object 3.2.1, private type 7.4, qualified expression  4.7,  real  type  3.5.6,
  120. record type 3.7, subtype declaration 3.3.2, task type 9.1, type declaration 3.3.1
  121.  
  122.  
  123.  
  124. 3.3.1  Type Declarations (paragraph 11)3.3.1  Type Declarations (paragraph 11)3.3.1  Type Declarations (paragraph 11)
  125.  
  126.  
  127. References:___________  access  type  definition  3.8,  array type definition 3.6, base type 3.3, constrained
  128. array definition 3.6, constrained subtype 3.3, declaration 3.1, derived  type  3.4,  derived  type
  129. definition  3.4,  discriminant  part  3.7.1,  elaboration  3.9, enumeration type definition 3.5.1,
  130.  
  131.  
  132.  
  133. 3.3.1 Type Declarations (paragraph 11)                                                          -2
  134.  
  135.  
  136.  
  137.  
  138. identifier 2.3, incomplete type declaration 3.8.1, integer type definition 3.5.4, multiple  object
  139. declaration  3.2,  numeric  type  3.5,  private  type declaration 7.4, real type definition 3.5.6,
  140. reserved word 2.9, type 3.3
  141.  
  142.  
  143.  
  144. 3.3.2  Subtype Declarations (paragraph 12)3.3.2  Subtype Declarations (paragraph 12)3.3.2  Subtype Declarations (paragraph 12)
  145.  
  146.  
  147. References:___________ base type 3.3, compatibility of discriminant constraints 3.7.2, compatibility of fixed
  148. point constraints 3.5.9, compatibility of floating point constraints 3.5.7, compatibility of index
  149. constraints 3.6.1, compatibility  of  range  constraints  3.5,  constraint_error  exception  11.1,
  150. declaration 3.1, discriminant 3.3, discriminant constraint 3.7.2, elaboration 3.9, evaluation 4.5,
  151. expression  4.4,  floating  point constraint 3.5.7, fixed point constraint 3.5.9, index constraint
  152. 3.6.1, range constraint  3.5,  reserved  word  2.9,  subtype  3.3,  type  3.3,  type  name  3.3.1,
  153. unconstrained subtype 3.3
  154.  
  155.  
  156.  
  157. 3.3.3  Classification of Operations (paragraph 2)3.3.3  Classification of Operations (paragraph 2)3.3.3  Classification of Operations (paragraph 2)
  158.  
  159.  
  160. The  remaining  operations  are  each  implicitly  declared  for  a given type declaration.  These
  161. implicitly declared operations comprise the basic_____ operations, the predefined operators (see  4.5),
  162. and  enumeration  literals.   In  the  case of a derived type declaration, the implicitly declared
  163. operations include any derived subprograms.  The operations implicitly declared for a  given  type
  164. declaration  occur  after  the  type declaration and before the next explicit declaration, if any.
  165. The implicit declarations of derived subprograms occur last.
  166.  
  167.  
  168.  
  169.  
  170. 3.4  Derived Types (paragraph 10)3.4  Derived Types (paragraph 10)3.4  Derived Types (paragraph 10)
  171.  
  172.  
  173.  
  174.   -  If an explicit representation clause exists for the parent type and if  this  clause  appears
  175.      before  the  derived type definition, then there is a corresponding representation clause (an
  176.      implicit one) for the derived type.
  177.  
  178.  
  179.  
  180. 3.4  Derived Types (paragraph 24)3.4  Derived Types (paragraph 24)3.4  Derived Types (paragraph 24)
  181.  
  182.  
  183. References:___________ access value 3.8, actual parameter 6.4.1, aggregate 4.3, attribute  4.1.4,  base  type
  184. 3.3,  basic  operation  3.3.3,  boolean  type  3.5.3,  bound  of  a  range 3.5, class of type 3.3,
  185. collection 3.8, component 3.3, composite type 3.3, constraint  3.3,  conversion  4.6,  declaration
  186. 3.1,  declarative  region  8.1, default expression 3.2.1, default initial value for an access type
  187. 3.8, discriminant 3.3, elaboration 3.9, entry  9.5,  enumeration  literal  3.5.1,  floating  point
  188. constraint  3.5.7,  fixed point constraint 3.5.9, formal parameter 6.1, function call 6.4, generic
  189. declaration 12.1, immediately within  8.1,  implicit  declaration  3.1,  literal  4.2,  mode  6.1,
  190. overloading  6.6  8.7, package 7, package specification 7.1, parameter association 6.4, predefined
  191. operator 4.5, private type 7.4, procedure 6, procedure call statement 6.4, range  constraint  3.5,
  192. representation clause 13.1, reserved word 2.9, slice 4.1.2, subprogram 6, subprogram specification
  193. 6.1, subtype indication 3.3.2, subtype 3.3, type 3.3, type definition 3.3.1, visible part 7.2
  194.  
  195.  
  196.  
  197.  
  198.  
  199. -3                                                                Derived Types (paragraph 24) 3.4
  200.  
  201.  
  202.  
  203.  
  204. 3.5.1  Enumeration Types (paragraph 8)3.5.1  Enumeration Types (paragraph 8)3.5.1  Enumeration Types (paragraph 8)
  205.  
  206.  
  207. References:___________ character literal 2.5, declaration 3.1, designator 6.1, elaboration 3.9, 6.1, function
  208. 6.5, identifier 2.3, name 4.1, overloading 6.6 8.7, position number 3.5, qualified expression 4.7,
  209. relational operator 4.5 4.5.2, type 3.3, type definition 3.3.1
  210.  
  211.  
  212.  
  213. 3.5.5  Operations of Discrete Types 3.5.5 (paragraph 10)3.5.5  Operations of Discrete Types 3.5.5 (paragraph 10)3.5.5  Operations of Discrete Types 3.5.5 (paragraph 10)
  214.  
  215.  
  216.  
  217. T'IMAGE     This attribute is a function.  The parameter X must be a value of the base type of  T.
  218.             The  result  type is the predefined type STRING.  The result is the image_____ of the value
  219.             of X, that is, a sequence of characters representing the value in display  form.   The
  220.             image  of  an integer value is the corresponding decimal literal;  without underlines,
  221.             leading zeros, exponent, or trailing spaces;  but with a single leading character that
  222.             is either a minus sign or a space.  The lower bound of the image is one.
  223.  
  224.  
  225.  
  226. 3.5.5  Operations of Discrete Types 3.5.5 (paragraph 11)3.5.5  Operations of Discrete Types 3.5.5 (paragraph 11)3.5.5  Operations of Discrete Types 3.5.5 (paragraph 11)
  227.  
  228.  
  229. The image of an enumeration value is either the corresponding identifier  in  upper  case  or  the
  230. corresponding  character  literal  (including  the two apostrophes);  neither leading nor trailing
  231. spaces  are  included.   The  image  of  a  character  C,  other  than  a  graphic  character,  is
  232. implementation-defined;   the  only  requirement  is  that  the  image  must be such that C equals
  233. CHARACTER'VALUE(CHARACTER'IMAGE(C)).
  234.  
  235.  
  236.  
  237.  
  238. 3.5.5  Operations of Discrete Types (paragraph 19)3.5.5  Operations of Discrete Types (paragraph 19)3.5.5  Operations of Discrete Types (paragraph 19)
  239.  
  240.  
  241. References:___________ abs operator 4.5  4.5.6,  assignment  5.2,  attribute  4.1.4,  base  type  3.3,  basic
  242. operation  3.3.3,  binary  adding  operator  4.5  4.5.3, boolean type 3.5.3, bound of a range 3.5,
  243. character literal 2.5, constraint 3.3, constraint_error exception 11.1, conversion  4.6,  discrete
  244. type  3.5,  enumeration  literal  3.5.1,  exponentiating operator 4.5 4.5.6, function 6.5, graphic
  245. character 2.1, identifier 2.3, integer type 3.5.4, logical operator 4.5 4.5.1, membership test 4.5
  246. 4.5.2, multiplying operator 4.5 4.5.5, not operator 4.5 4.5.6, numeric literal 2.4,  numeric  type
  247. 3.5,  object  3.2, operation 3.3, position number 3.5, predefined operator 4.5, predefined type C,
  248. qualified expression 4.7, relational operator 4.5 4.5.2, short-circuit  control  form  4.5  4.5.1,
  249. string  type 3.6.3, subtype 3.3, type 3.3, unary adding operator 4.5 4.5.4, universal_integer type
  250. 3.5.4, universal type 4.10
  251.  
  252.  
  253.  
  254. 3.5.7  Floating Point Types (paragraph 18)3.5.7  Floating Point Types (paragraph 18)3.5.7  Floating Point Types (paragraph 18)
  255.  
  256.  
  257. type MASS is digits 7 range 0.0 .. 1.0E35;
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265. 3.5.7 Floating Point Types (paragraph 18)                                                       -4
  266.  
  267.  
  268.  
  269.  
  270. 3.5.7  Floating Point Types (paragraph 19)3.5.7  Floating Point Types (paragraph 19)3.5.7  Floating Point Types (paragraph 19)
  271.  
  272.  
  273. The implemented accuracy for COEFFICIENT is that of a predefined type having at least 10 digits of
  274. precision.  Consequently the specification of 5 digits of precision for the subtype SHORT_COEFF is
  275. allowed.  The largest model number for the type MASS is approximately 1.27E30 and hence less  than
  276. the  specified  upper  bound (1.0E35).  Consequently the declaration of this type is legal only if
  277. this upper bound is in the range of the safe numbers of a predefined floating point type having at
  278. least 7 digits of precision.
  279.  
  280.  
  281.  
  282. 3.5.9  Fixed Point Types (paragraph 11)3.5.9  Fixed Point Types (paragraph 11)3.5.9  Fixed Point Types (paragraph 11)
  283.  
  284.  
  285. The fixed point declaration is illegal if no predefined type satisfies  these  requirements.   The
  286. safe numbers of a fixed point type are the model numbers of its base type.
  287.  
  288.  
  289.  
  290. 3.6  Array Types (paragraph 11)3.6  Array Types (paragraph 11)3.6  Array Types (paragraph 11)
  291.  
  292.  
  293.  
  294. Examples of type declarations with constrained array definitions:_________________________________________________________________
  295.  
  296.     typetypetype TABLE    isisis arrayarrayarray(1 .. 10) ofofof INTEGER;
  297.     typetypetype SCHEDULE isisis arrayarrayarray(DAY) ofofof BOOLEAN;
  298.     typetypetype LINE     isisis arrayarrayarray(1 .. MAX_LINE_SIZE) ofofof CHARACTER;
  299.  
  300.  
  301.  
  302.  
  303.  
  304. 3.6.1  Index Constraints and Discrete Ranges (paragraph 4)3.6.1  Index Constraints and Discrete Ranges (paragraph 4)3.6.1  Index Constraints and Discrete Ranges (paragraph 4)
  305.  
  306.  
  307. An  index  constraint  is  compatible__________  with  the  type denoted by the type mark if and only if the
  308. constraint defined by each discrete range is compatible with the corresponding index subtype.   If
  309. any  of  the  discrete  ranges  defines  a null range, any array thus constrained is a null____ array_____,
  310. having no components.  An array value satisfies_________ an index constraint if at each index position  the
  311. array value and the index constraint have the same index bounds.  (Note,  however, that assignment
  312. and certain other operations on arrays involve an implicit subtype conversion.)
  313.  
  314.  
  315.  
  316.  
  317. 3.6.2  Operations of Array Types (paragraph 16)3.6.2  Operations of Array Types (paragraph 16)3.6.2  Operations of Array Types (paragraph 16)
  318.  
  319.  
  320. References:___________ aggregate 4.3, array type 3.6, assignment 5.2, attribute 4.1.4, basic operation 3.3.3,
  321. bound  of  a  range  3.5,  catenation  operator 4.5 4.5.3, character type 3.5.2, constrained array
  322. subtype 3.6, conversion 4.6, designator 6.1, dimension 3.6, index 3.6,  indexed  component  4.1.1,
  323. limited type 7.4.4, logical operator 4.5 4.5.1, membership test 4.5 4.5.2, not operator 4.5 4.5.6,
  324. null  range  3.5,  object  3.2,  operation 3.3, predefined operator 4.5, qualified expression 4.7,
  325. relational  operator  4.5  4.5.2,  slice  4.1.2,  static  expression  4.9,  string  literal   2.6,
  326. subcomponent  3.3,  type 3.3, unconstrained array type 3.6, universal type 4.10, universal_integer
  327. type 3.5.4
  328.  
  329.  
  330.  
  331. -5                                                  Operations of Array Types (paragraph 16) 3.6.2
  332.  
  333.  
  334.  
  335.  
  336. 3.7  Record Types (paragraph 13)3.7  Record Types (paragraph 13)3.7  Record Types (paragraph 13)
  337.  
  338.  
  339. References:___________ assignment compound delimiter 2.2, component 3.3, composite value 3.3, constraint 3.3,
  340. declaration 3.1, depend on a discriminant 3.7.1, discriminant 3.3, discriminant  part  3.7  3.7.1,
  341. elaboration  3.9,  expression  4.4,  identifier 2.3, identifier list 3.2, limited type 7.4.4, name
  342. 4.1, object 3.2, subtype 3.3, type 3.3, type mark 3.3.2, variant part 3.7.3
  343.  
  344.  
  345.  
  346. 3.8.2  Operations of Access Types (paragraphs 2 3)3.8.2  Operations of Access Types (paragraphs 2 3)3.8.2  Operations of Access Types (paragraphs 2 3)
  347.  
  348.  
  349. If the designated type is an array type, the basic operations include the attributes that have the
  350. attribute designators FIRST, LAST, RANGE, and LENGTH (likewise, the attribute designators  of  the
  351. N-th  dimension).   The  prefix  of  each  of these attributes must be a value of the access type.
  352. These attributes yield the corresponding characteristics of the designated object (see 3.6.2).
  353.  
  354. If the designated type is a task type, the basic operations include the attributes that  have  the
  355. attribute  designators  TERMINATED and CALLABLE (see 9.9).  The prefix of each of these attributes
  356. must be a value of the access type.  These attributes yield the corresponding  characteristics  of
  357. the designated task objects.
  358.  
  359.  
  360.  
  361. 3.8.2  Operations of Access Types (paragraph 6)3.8.2  Operations of Access Types (paragraph 6)3.8.2  Operations of Access Types (paragraph 6)
  362.  
  363.  
  364. References:___________  access  type  3.8,  allocator  4.8,  array type 3.6, assignment 5.2, attribute 4.1.4,
  365. attribute designator 4.1.4, base type 3.3, basic  operation  3.3.3,  collection  3.8,  constrained
  366. array  subtype  3.6,  conversion  4.6, designate 3.8, designated subtype 3.8, designated type 3.8,
  367. discriminant 3.3, indexed component 4.1.1, literal 4.2, membership test 4.5 4.5.2,  object  3.2.1,
  368. operation  3.3,  private  type  7.4, qualified expression 4.7, record type 3.7, selected component
  369. 4.1.3, slice 4.1.2, subtype 3.3, task type 9.1, type 3.3
  370.  
  371.  
  372.  
  373. 3.9  Declarative Parts (paragraph 11)3.9  Declarative Parts (paragraph 11)3.9  Declarative Parts (paragraph 11)
  374.  
  375.  
  376. Elaboration___________ of__ declarations____________:  3.1, component declaration 3.7, deferred constant declaration 7.4.3,
  377. discriminant specification 3.7.1, entry declaration 9.5, enumeration literal specification  3.5.1,
  378. generic  declaration  12.1,  generic  instantiation  12.3, incomplete type declaration 3.8.1, loop
  379. parameter  specification  5.5,  number  declaration  3.2.2,  object  declaration  3.2.1,   package
  380. declaration 7.2, parameter specification 6.1, private type declaration 7.4.1, renaming declaration
  381. 8.5, subprogram declaration 6.1, subtype declaration 3.3.2, task declaration 9.1, type declaration
  382. 3.3.1
  383.  
  384.  
  385.  
  386. 3.9  Declarative Parts (paragraph 13)3.9  Declarative Parts (paragraph 13)3.9  Declarative Parts (paragraph 13)
  387.  
  388.  
  389. Elaboration___________  of__  other_____  constructs__________:   context  clause 10.1, body stub 10.2, compilation unit 10.1,
  390. discriminant part 3.7.1, generic body 12.2, generic formal parameter 12.1 12.3, library unit 10.5,
  391. package body 7.1, representation clause 13.1, subprogram body 6.3, subunit 10.2,  task  body  9.1,
  392. task object 9.2, task specification 9.1, use clause 8.4, with clause 10.1.1
  393.  
  394.  
  395.  
  396.  
  397. 3.9 Declarative Parts (paragraph 13)                                                            -6
  398.