home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adav313.zip / gnat-3_13p-docs.zip / arm95.INF (.txt) next >
OS/2 Help File  |  2001-09-16  |  1MB  |  47,215 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. -Preface- ΓòÉΓòÉΓòÉ
  3.  
  4. ADA REFERENCE MANUAL
  5.  
  6. Language and Standard Libraries
  7.  
  8. Version 6.0
  9.  
  10. 21 December 1994
  11.  
  12. Copyright (C) 1992,1993,1994,1995  Intermetrics, Inc.
  13.  
  14. This copyright is assigned to the U.S. Government.
  15.  
  16. All rights reserved.
  17. This document may be copied, in whole or in part, in any form or by any means, 
  18. as is or with alterations, provided that (1) alterations are clearly marked as 
  19. alterations and (2) this copyright notice is included unmodified in any copy. 
  20. Compiled copies of standard library units and examples need not contain this 
  21. copyright notice so long as the notice is included in all copies of source code 
  22. and documentation. 
  23.  
  24. ADA REFERENCE MANUAL
  25.  
  26. Language and Standard Libraries
  27.  
  28. Version 6.0
  29.  
  30.  Foreword                      Information about this standard 
  31.  Introduction                  Introduction to the standard 
  32.  1                             General 
  33.  2                             Lexical Elements 
  34.  3                             Declarations and Types 
  35.  4                             Names and Expressions 
  36.  5                             Statements 
  37.  6                             Subprograms 
  38.  7                             Packages 
  39.  8                             Visibility Rules 
  40.  9                             Tasks and Synchronization 
  41.  10                            Program Structure and Compilation Issues 
  42.  11                            Exceptions 
  43.  12                            Generic Units 
  44.  13                            Representation Issues ANNEXES 
  45.  A                             Predefined Language Environment 
  46.  B                             Interface to Other Languages 
  47.  C                             Systems Programming 
  48.  D                             Real-Time Systems 
  49.  E                             Distributed Systems 
  50.  F                             Information Systems 
  51.  G                             Numerics 
  52.  H                             Safety and Security 
  53.  J                             Obsolescent Features 
  54.  K                             Language-Defined Attributes 
  55.  L                             Language-Defined Pragmas 
  56.  M                             Implementation-Defined Characteristics 
  57.  N                             Glossary 
  58.  P                             Syntax Summary 
  59.  Index                         --- The Detailed Node Listing --- 
  60.  Foreword                      Foreword 
  61.  Introduction                  Introduction 
  62.  Design Goals                  Design Goals 
  63.  Language Summary              Language Summary 
  64.  Program Units                 Program Units 
  65.  Declarations and Statements   Declarations and Statements 
  66.  Data Types                    Data Types 
  67.  Other Facilities              Other Facilities 
  68.  Language Changes              Language Changes 
  69.  Instructions for Comment SubmissionInstructions for Comment Submission 
  70.  Acknowledgements              Acknowledgements 
  71.  1                             General 
  72.  1.1                           Scope 
  73.  1.1.1                         Extent 
  74.  1.1.2                         Structure 
  75.  1.1.3                         Conformity of an Implementation with the 
  76.                                Standard 
  77.  1.1.4                         Method of Description and Syntax Notation 
  78.  1.1.5                         Classification of Errors 
  79.  1.2                           Normative References 
  80.  1.3                           Definitions 
  81.  2                             Lexical Elements 
  82.  2.1                           Character Set 
  83.  2.2                           Lexical Elements, Separators, and Delimiters 
  84.  2.3                           Identifiers 
  85.  2.4                           Numeric Literals 
  86.  2.4.1                         Decimal Literals 
  87.  2.4.2                         Based Literals 
  88.  2.5                           Character Literals 
  89.  2.6                           String Literals 
  90.  2.7                           Comments 
  91.  2.8                           Pragmas 
  92.  2.9                           Reserved Words 
  93.  3                             Declarations and Types 
  94.  3.1                           Declarations 
  95.  3.2                           Types and Subtypes 
  96.  3.2.1                         Type Declarations 
  97.  3.2.2                         Subtype Declarations 
  98.  3.2.3                         Classification of Operations 
  99.  3.3                           Objects and Named Numbers 
  100.  3.3.1                         Object Declarations 
  101.  3.3.2                         Number Declarations 
  102.  3.4                           Derived Types and Classes 
  103.  3.4.1                         Derivation Classes 
  104.  3.5                           Scalar Types 
  105.  3.5.1                         Enumeration Types 
  106.  3.5.2                         Character Types 
  107.  3.5.3                         Boolean Types 
  108.  3.5.4                         Integer Types 
  109.  3.5.5                         Operations of Discrete Types 
  110.  3.5.6                         Real Types 
  111.  3.5.7                         Floating Point Types 
  112.  3.5.8                         Operations of Floating Point Types 
  113.  3.5.9                         Fixed Point Types 
  114.  3.5.10                        Operations of Fixed Point Types 
  115.  3.6                           Array Types 
  116.  3.6.1                         Index Constraints and Discrete Ranges 
  117.  3.6.2                         Operations of Array Types 
  118.  3.6.3                         String Types 
  119.  3.7                           Discriminants 
  120.  3.7.1                         Discriminant Constraints 
  121.  3.7.2                         Operations of Discriminated Types 
  122.  3.8                           Record Types 
  123.  3.8.1                         Variant Parts and Discrete Choices 
  124.  3.9                           Tagged Types and Type Extensions 
  125.  3.9.1                         Type Extensions 
  126.  3.9.2                         Dispatching Operations of Tagged Types 
  127.  3.9.3                         Abstract Types and Subprograms 
  128.  3.10                          Access Types 
  129.  3.10.1                        Incomplete Type Declarations 
  130.  3.10.2                        Operations of Access Types 
  131.  3.11                          Declarative Parts 
  132.  3.11.1                        Completions of Declarations 
  133.  4                             Names and Expressions 
  134.  4.1                           Names 
  135.  4.1.1                         Indexed Components 
  136.  4.1.2                         Slices 
  137.  4.1.3                         Selected Components 
  138.  4.1.4                         Attributes 
  139.  4.2                           Literals 
  140.  4.3                           Aggregates 
  141.  4.3.1                         Record Aggregates 
  142.  4.3.2                         Extension Aggregates 
  143.  4.3.3                         Array Aggregates 
  144.  4.4                           Expressions 
  145.  4.5                           Operators and Expression Evaluation 
  146.  4.5.1                         Logical Operators and Short-circuit Control 
  147.                                Forms 
  148.  4.5.2                         Relational Operators and Membership Tests 
  149.  4.5.3                         Binary Adding Operators 
  150.  4.5.4                         Unary Adding Operators 
  151.  4.5.5                         Multiplying Operators 
  152.  4.5.6                         Highest Precedence Operators 
  153.  4.6                           Type Conversions 
  154.  4.7                           Qualified Expressions 
  155.  4.8                           Allocators 
  156.  4.9                           Static Expressions and Static Subtypes 
  157.  4.9.1                         Statically Matching Constraints and Subtypes 
  158.  5                             Statements 
  159.  5.1                           Simple and Compound Statements - Sequences of 
  160.                                Statements 
  161.  5.2                           Assignment Statements 
  162.  5.3                           If Statements 
  163.  5.4                           Case Statements 
  164.  5.5                           Loop Statements 
  165.  5.6                           Block Statements 
  166.  5.7                           Exit Statements 
  167.  5.8                           Goto Statements 
  168.  6                             Subprograms 
  169.  6.1                           Subprogram Declarations 
  170.  6.2                           Formal Parameter Modes 
  171.  6.3                           Subprogram Bodies 
  172.  6.3.1                         Conformance Rules 
  173.  6.3.2                         Inline Expansion of Subprograms 
  174.  6.4                           Subprogram Calls 
  175.  6.4.1                         Parameter Associations 
  176.  6.5                           Return Statements 
  177.  6.6                           Overloading of Operators 
  178.  7                             Packages 
  179.  7.1                           Package Specifications and Declarations 
  180.  7.2                           Package Bodies 
  181.  7.3                           Private Types and Private Extensions 
  182.  7.3.1                         Private Operations 
  183.  7.4                           Deferred Constants 
  184.  7.5                           Limited Types 
  185.  7.6                           User-Defined Assignment and Finalization 
  186.  7.6.1                         Completion and Finalization 
  187.  8                             Visibility Rules 
  188.  8.1                           Declarative Region 
  189.  8.2                           Scope of Declarations 
  190.  8.3                           Visibility 
  191.  8.4                           Use Clauses 
  192.  8.5                           Renaming Declarations 
  193.  8.5.1                         Object Renaming Declarations 
  194.  8.5.2                         Exception Renaming Declarations 
  195.  8.5.3                         Package Renaming Declarations 
  196.  8.5.4                         Subprogram Renaming Declarations 
  197.  8.5.5                         Generic Renaming Declarations 
  198.  8.6                           The Context of Overload Resolution 
  199.  9                             Tasks and Synchronization 
  200.  9.1                           Task Units and Task Objects 
  201.  9.2                           Task Execution - Task Activation 
  202.  9.3                           Task Dependence - Termination of Tasks 
  203.  9.4                           Protected Units and Protected Objects 
  204.  9.5                           Intertask Communication 
  205.  9.5.1                         Protected Subprograms and Protected Actions 
  206.  9.5.2                         Entries and Accept Statements 
  207.  9.5.3                         Entry Calls 
  208.  9.5.4                         Requeue Statements 
  209.  9.6                           Delay Statements, Duration, and Time 
  210.  9.7                           Select Statements 
  211.  9.7.1                         Selective Accept 
  212.  9.7.2                         Timed Entry Calls 
  213.  9.7.3                         Conditional Entry Calls 
  214.  9.7.4                         Asynchronous Transfer of Control 
  215.  9.8                           Abort of a Task - Abort of a Sequence of 
  216.                                Statements 
  217.  9.9                           Task and Entry Attributes 
  218.  9.10                          Shared Variables 
  219.  9.11                          Example of Tasking and Synchronization 
  220.  10                            Program Structure and Compilation Issues 
  221.  10.1                          Separate Compilation 
  222.  10.1.1                        Compilation Units - Library Units 
  223.  10.1.2                        Context Clauses - With Clauses 
  224.  10.1.3                        Subunits of Compilation Units 
  225.  10.1.4                        The Compilation Process 
  226.  10.1.5                        Pragmas and Program Units 
  227.  10.1.6                        Environment-Level Visibility Rules 
  228.  10.2                          Program Execution 
  229.  10.2.1                        Elaboration Control 
  230.  11                            Exceptions 
  231.  11.1                          Exception Declarations 
  232.  11.2                          Exception Handlers 
  233.  11.3                          Raise Statements 
  234.  11.4                          Exception Handling 
  235.  11.4.1                        The Package Exceptions 
  236.  11.4.2                        Example of Exception Handling 
  237.  11.5                          Suppressing Checks 
  238.  11.6                          Exceptions and Optimization 
  239.  12                            Generic Units 
  240.  12.1                          Generic Declarations 
  241.  12.2                          Generic Bodies 
  242.  12.3                          Generic Instantiation 
  243.  12.4                          Formal Objects 
  244.  12.5                          Formal Types 
  245.  12.5.1                        Formal Private and Derived Types 
  246.  12.5.2                        Formal Scalar Types 
  247.  12.5.3                        Formal Array Types 
  248.  12.5.4                        Formal Access Types 
  249.  12.6                          Formal Subprograms 
  250.  12.7                          Formal Packages 
  251.  12.8                          Example of a Generic Package 
  252.  13                            Representation Issues 
  253.  13.1                          Representation Items 
  254.  13.2                          Pragma Pack 
  255.  13.3                          Representation Attributes 
  256.  13.4                          Enumeration Representation Clauses 
  257.  13.5                          Record Layout 
  258.  13.5.1                        Record Representation Clauses 
  259.  13.5.2                        Storage Place Attributes 
  260.  13.5.3                        Bit Ordering 
  261.  13.6                          Change of Representation 
  262.  13.7                          The Package System 
  263.  13.7.1                        The Package System.Storage_Elements 
  264.  13.7.2                        The Package System.Address_To_Access_Conversions 
  265.  13.8                          Machine Code Insertions 
  266.  13.9                          Unchecked Type Conversions 
  267.  13.9.1                        Data Validity 
  268.  13.9.2                        The Valid Attribute 
  269.  13.10                         Unchecked Access Value Creation 
  270.  13.11                         Storage Management 
  271.  13.11.1                       The Max_Size_In_Storage_Elements Attribute 
  272.  13.11.2                       Unchecked Storage Deallocation 
  273.  13.11.3                       Pragma Controlled 
  274.  13.12                         Pragma Restrictions 
  275.  13.13                         Streams 
  276.  13.13.1                       The Package Streams 
  277.  13.13.2                       Stream-Oriented Attributes 
  278.  13.14                         Freezing Rules ANNEXES 
  279.  A                             Predefined Language Environment 
  280.  A.1                           The Package Standard 
  281.  A.2                           The Package Ada 
  282.  A.3                           Character Handling 
  283.  A.3.1                         The Package Characters 
  284.  A.3.2                         The Package Characters.Handling 
  285.  A.3.3                         The Package Characters.Latin_1 
  286.  A.4                           String Handling 
  287.  A.4.1                         The Package Strings 
  288.  A.4.2                         The Package Strings.Maps 
  289.  A.4.3                         Fixed-Length String Handling 
  290.  A.4.4                         Bounded-Length String Handling 
  291.  A.4.5                         Unbounded-Length String Handling 
  292.  A.4.6                         String-Handling Sets and Mappings 
  293.  A.4.7                         Wide_String Handling 
  294.  A.5                           The Numerics Packages 
  295.  A.5.1                         Elementary Functions 
  296.  A.5.2                         Random Number Generation 
  297.  A.5.3                         Attributes of Floating Point Types 
  298.  A.5.4                         Attributes of Fixed Point Types 
  299.  A.6                           Input-Output 
  300.  A.7                           External Files and File Objects 
  301.  A.8                           Sequential and Direct Files 
  302.  A.8.1                         The Generic Package Sequential_IO 
  303.  A.8.2                         File Management 
  304.  A.8.3                         Sequential Input-Output Operations 
  305.  A.8.4                         The Generic Package Direct_IO 
  306.  A.8.5                         Direct Input-Output Operations 
  307.  A.9                           The Generic Package Storage_IO 
  308.  A.10                          Text Input-Output 
  309.  A.10.1                        The Package Text_IO 
  310.  A.10.2                        Text File Management 
  311.  A.10.3                        Default Input, Output, and Error Files 
  312.  A.10.4                        Specification of Line and Page Lengths 
  313.  A.10.5                        Operations on Columns, Lines, and Pages 
  314.  A.10.6                        Get and Put Procedures 
  315.  A.10.7                        Input-Output of Characters and Strings 
  316.  A.10.8                        Input-Output for Integer Types 
  317.  A.10.9                        Input-Output for Real Types 
  318.  A.10.10                       Input-Output for Enumeration Types 
  319.  A.11                          Wide Text Input-Output 
  320.  A.12                          Stream Input-Output 
  321.  A.12.1                        The Package Streams.Stream_IO 
  322.  A.12.2                        The Package Text_IO.Text_Streams 
  323.  A.12.3                        The Package Wide_Text_IO.Text_Streams 
  324.  A.13                          Exceptions in Input-Output 
  325.  A.14                          File Sharing 
  326.  A.15                          The Package Command_Line 
  327.  B                             Interface to Other Languages 
  328.  B.1                           Interfacing Pragmas 
  329.  B.2                           The Package Interfaces 
  330.  B.3                           Interfacing with C 
  331.  B.3.1                         The Package Interfaces.C.Strings 
  332.  B.3.2                         The Generic Package Interfaces.C.Pointers 
  333.  B.4                           Interfacing with COBOL 
  334.  B.5                           Interfacing with Fortran 
  335.  C                             Systems Programming 
  336.  C.1                           Access to Machine Operations 
  337.  C.2                           Required Representation Support 
  338.  C.3                           Interrupt Support 
  339.  C.3.1                         Protected Procedure Handlers 
  340.  C.3.2                         The Package Interrupts 
  341.  C.4                           Preelaboration Requirements 
  342.  C.5                           Pragma Discard_Names 
  343.  C.6                           Shared Variable Control 
  344.  C.7                           Task Identification and Attributes 
  345.  C.7.1                         The Package Task_Identification 
  346.  C.7.2                         The Package Task_Attributes 
  347.  D                             Real-Time Systems 
  348.  D.1                           Task Priorities 
  349.  D.2                           Priority Scheduling 
  350.  D.2.1                         The Task Dispatching Model 
  351.  D.2.2                         The Standard Task Dispatching Policy 
  352.  D.3                           Priority Ceiling Locking 
  353.  D.4                           Entry Queuing Policies 
  354.  D.5                           Dynamic Priorities 
  355.  D.6                           Preemptive Abort 
  356.  D.7                           Tasking Restrictions 
  357.  D.8                           Monotonic Time 
  358.  D.9                           Delay Accuracy 
  359.  D.10                          Synchronous Task Control 
  360.  D.11                          Asynchronous Task Control 
  361.  D.12                          Other Optimizations and Determinism Rules 
  362.  E                             Distributed Systems 
  363.  E.1                           Partitions 
  364.  E.2                           Categorization of Library Units 
  365.  E.2.1                         Shared Passive Library Units 
  366.  E.2.2                         Remote Types Library Units 
  367.  E.2.3                         Remote Call Interface Library Units 
  368.  E.3                           Consistency of a Distributed System 
  369.  E.4                           Remote Subprogram Calls 
  370.  E.4.1                         Pragma Asynchronous 
  371.  E.4.2                         Example of Use of a Remote Access-to-Class-Wide 
  372.                                Type 
  373.  E.5                           Partition Communication Subsystem 
  374.  F                             Information Systems 
  375.  F.1                           Machine_Radix Attribute Definition Clause 
  376.  F.2                           The Package Decimal 
  377.  F.3                           Edited Output for Decimal Types 
  378.  F.3.1                         Picture String Formation 
  379.  F.3.2                         Edited Output Generation 
  380.  F.3.3                         The Package Text_IO.Editing 
  381.  F.3.4                         The Package Wide_Text_IO.Editing 
  382.  G                             Numerics 
  383.  G.1                           Complex Arithmetic 
  384.  G.1.1                         Complex Types 
  385.  G.1.2                         Complex Elementary Functions 
  386.  G.1.3                         Complex Input-Output 
  387.  G.1.4                         The Package Wide_Text_IO.Complex_IO 
  388.  G.2                           Numeric Performance Requirements 
  389.  G.2.1                         Model of Floating Point Arithmetic 
  390.  G.2.2                         Model-Oriented Attributes of Floating Point 
  391.                                Types 
  392.  G.2.3                         Model of Fixed Point Arithmetic 
  393.  G.2.4                         Accuracy Requirements for the Elementary 
  394.                                Functions 
  395.  G.2.5                         Performance Requirements for Random Number 
  396.                                Generation 
  397.  G.2.6                         Accuracy Requirements for Complex Arithmetic 
  398.  H                             Safety and Security 
  399.  H.1                           Pragma Normalize_Scalars 
  400.  H.2                           Documentation of Implementation Decisions 
  401.  H.3                           Reviewable Object Code 
  402.  H.3.1                         Pragma Reviewable 
  403.  H.3.2                         Pragma Inspection_Point 
  404.  H.4                           Safety and Security Restrictions 
  405.  J                             Obsolescent Features 
  406.  J.1                           Renamings of Ada 83 Library Units 
  407.  J.2                           Allowed Replacements of Characters 
  408.  J.3                           Reduced Accuracy Subtypes 
  409.  J.4                           The Constrained Attribute 
  410.  J.5                           ASCII 
  411.  J.6                           Numeric_Error 
  412.  J.7                           At Clauses 
  413.  J.7.1                         Interrupt Entries 
  414.  J.8                           Mod Clauses 
  415.  J.9                           The Storage_Size Attribute 
  416.  K                             Language-Defined Attributes 
  417.  L                             Language-Defined Pragmas 
  418.  M                             Implementation-Defined Characteristics 
  419.  N                             Glossary 
  420.  P                             Syntax Summary 
  421.  Index                         Index 
  422.  Index.Operators               Index.Operators 
  423.  Index.Digits                  Index.Digits 
  424.  Index.A                       Index.A 
  425.  Index.B                       Index.B 
  426.  Index.C                       Index.C 
  427.  Index.D                       Index.D 
  428.  Index.E                       Index.E 
  429.  Index.F                       Index.F 
  430.  Index.G                       Index.G 
  431.  Index.H                       Index.H 
  432.  Index.I                       Index.I 
  433.  Index.J                       Index.J 
  434.  Index.K                       Index.K 
  435.  Index.L                       Index.L 
  436.  Index.M                       Index.M 
  437.  Index.N                       Index.N 
  438.  Index.O                       Index.O 
  439.  Index.P                       Index.P 
  440.  Index.Q                       Index.Q 
  441.  Index.R                       Index.R 
  442.  Index.S                       Index.S 
  443.  Index.T                       Index.T 
  444.  Index.U                       Index.U 
  445.  Index.V                       Index.V 
  446.  Index.W                       Index.W 
  447.  Index.X                       Index.X 
  448.  Index.Y                       Index.Y 
  449.  
  450.  
  451. ΓòÉΓòÉΓòÉ 2. Foreword ΓòÉΓòÉΓòÉ
  452.  
  453.    1. ISO (the International Organization for Standardization) and IEC (the 
  454.       International Electrotechnical Commission) form the specialized system 
  455.       for worldwide standardization. National bodies that are members of ISO or 
  456.       IEC participate in the development of International Standards through 
  457.       technical committees established by the respective organization to deal 
  458.       with particular fields of technical activity. ISO and IEC technical 
  459.       committees collaborate in fields of mutual interest. Other international 
  460.       organizations, governmental and non-governmental, in liaison with ISO and 
  461.       IEC, also take part in the work. 
  462.  
  463.    2. In the field of information technology, ISO and IEC have established a 
  464.       joint technical committee, ISO/IEC JTC 1. Draft International Standards 
  465.       adopted by the joint technical committee are circulated to national 
  466.       bodies for voting. Publication as an International Standard requires 
  467.       approval by at least 75 % of the national bodies casting a vote. 
  468.  
  469.    3. International Standard ISO/IEC 8652 was prepared by Joint Technical 
  470.       Committee ISO/IEC JTC 1, Information Technology. 
  471.  
  472.    4. This second edition cancels and replaces the first edition (ISO 
  473.       8652:1987), of which it constitutes a technical revision. 
  474.  
  475.    5. Annexes A to J form an integral part of this International Standard. 
  476.       Annexes K to P are for information only. 
  477.  
  478.  
  479. ΓòÉΓòÉΓòÉ 3. Introduction ΓòÉΓòÉΓòÉ
  480.  
  481.    1. This is the Ada Reference Manual. 
  482.  
  483.    2. Other available Ada documents include: 
  484.  
  485.         a. Rationale for the Ada Programming Language -- 1995 edition, which 
  486.            gives an introduction to the new features of Ada, and explains the 
  487.            rationale behind them. Programmers should read this first. 
  488.  
  489.         b. Changes to Ada -- 1987 to 1995. This document lists in detail the 
  490.            changes made to the 1987 edition of the standard. 
  491.  
  492.         c. The Annotated Ada Reference Manual (AARM). The AARM contains all of 
  493.            the text in the RM95, plus various annotations. It is intended 
  494.            primarily for compiler writers, validation test writers, and others 
  495.            who wish to study the fine details. The annotations include detailed 
  496.            rationale for individual rules and explanations of some of the more 
  497.            arcane interactions among the rules. 
  498.  
  499.  Design Goals                  Design Goals 
  500.  Language Summary              Language Summary 
  501.  Program Units                 Program Units 
  502.  Declarations and Statements   Declarations and Statements 
  503.  Data Types                    Data Types 
  504.  Other Facilities              Other Facilities 
  505.  Language Changes              Language Changes 
  506.  Instructions for Comment SubmissionInstructions for Comment Submission 
  507.  Acknowledgements              Acknowledgements 
  508.  
  509.  
  510. ΓòÉΓòÉΓòÉ 3.1. Design Goals ΓòÉΓòÉΓòÉ
  511.  
  512.    1. Ada was originally designed with three overriding concerns: program 
  513.       reliability and maintenance, programming as a human activity, and 
  514.       efficiency. This revision to the language was designed to provide greater 
  515.       flexibility and extensibility, additional control over storage management 
  516.       and synchronization, and standardized packages oriented toward supporting 
  517.       important application areas, while at the same time retaining the 
  518.       original emphasis on reliability, maintainability, and efficiency. 
  519.  
  520.    2. The need for languages that promote reliability and simplify maintenance 
  521.       is well established. Hence emphasis was placed on program readability 
  522.       over ease of writing. For example, the rules of the language require that 
  523.       program variables be explicitly declared and that their type be 
  524.       specified. Since the type of a variable is invariant, compilers can 
  525.       ensure that operations on variables are compatible with the properties 
  526.       intended for objects of the type. Furthermore, error-prone notations have 
  527.       been avoided, and the syntax of the language avoids the use of encoded 
  528.       forms in favor of more English-like constructs. Finally, the language 
  529.       offers support for separate compilation of program units in a way that 
  530.       facilitates program development and maintenance, and which provides the 
  531.       same degree of checking between units as within a unit. 
  532.  
  533.    3. Concern for the human programmer was also stressed during the design. 
  534.       Above all, an attempt was made to keep to a relatively small number of 
  535.       underlying concepts integrated in a consistent and systematic way while 
  536.       continuing to avoid the pitfalls of excessive involution. The design 
  537.       especially aims to provide language constructs that correspond 
  538.       intuitively to the normal expectations of users. 
  539.  
  540.    4. Like many other human activities, the development of programs is becoming 
  541.       ever more decentralized and distributed. Consequently, the ability to 
  542.       assemble a program from independently produced software components 
  543.       continues to be a central idea in the design. The concepts of packages, 
  544.       of private types, and of generic units are directly related to this idea, 
  545.       which has ramifications in many other aspects of the language. An allied 
  546.       concern is the maintenance of programs to match changing requirements; 
  547.       type extension and the hierarchical library enable a program to be 
  548.       modified while minimizing disturbance to existing tested and trusted 
  549.       components. 
  550.  
  551.    5. No language can avoid the problem of efficiency. Languages that require 
  552.       over-elaborate compilers, or that lead to the inefficient use of storage 
  553.       or execution time, force these inefficiencies on all machines and on all 
  554.       programs. Every construct of the language was examined in the light of 
  555.       present implementation techniques. Any proposed construct whose 
  556.       implementation was unclear or that required excessive machine resources 
  557.       was rejected. 
  558.  
  559.  
  560. ΓòÉΓòÉΓòÉ 3.2. Language Summary ΓòÉΓòÉΓòÉ
  561.  
  562.    1. An Ada program is composed of one or more program units. Program units 
  563.       may be subprograms (which define executable algorithms), packages (which 
  564.       define collections of entities), task units (which define concurrent 
  565.       computations), protected units (which define operations for the 
  566.       coordinated sharing of data between tasks), or generic units (which 
  567.       define parameterized forms of packages and subprograms). Each program 
  568.       unit normally consists of two parts: a specification, containing the 
  569.       information that must be visible to other units, and a body, containing 
  570.       the implementation details, which need not be visible to other units. 
  571.       Most program units can be compiled separately. 
  572.  
  573.    2. This distinction of the specification and body, and the ability to 
  574.       compile units separately, allows a program to be designed, written, and 
  575.       tested as a set of largely independent software components. 
  576.  
  577.    3. An Ada program will normally make use of a library of program units of 
  578.       general utility. The language provides means whereby individual 
  579.       organizations can construct their own libraries. All libraries are 
  580.       structured in a hierarchical manner; this enables the logical 
  581.       decomposition of a subsystem into individual components. The text of a 
  582.       separately compiled program unit must name the library units it requires. 
  583.  
  584.  
  585. ΓòÉΓòÉΓòÉ 3.3. Program Units ΓòÉΓòÉΓòÉ
  586.  
  587.    1. A subprogram is the basic unit for expressing an algorithm. There are two 
  588.       kinds of subprograms: procedures and functions. A procedure is the means 
  589.       of invoking a series of actions. For example, it may read data, update 
  590.       variables, or produce some output. It may have parameters, to provide a 
  591.       controlled means of passing information between the procedure and the 
  592.       point of call. A function is the means of invoking the computation of a 
  593.       value. It is similar to a procedure, but in addition will return a 
  594.       result. 
  595.  
  596.    2. A package is the basic unit for defining a collection of logically 
  597.       related entities. For example, a package can be used to define a set of 
  598.       type declarations and associated operations. Portions of a package can be 
  599.       hidden from the user, thus allowing access only to the logical properties 
  600.       expressed by the package specification. 
  601.  
  602.    3. Subprogram and package units may be compiled separately and arranged in 
  603.       hierarchies of parent and child units giving fine control over visibility 
  604.       of the logical properties and their detailed implementation. 
  605.  
  606.    4. A task unit is the basic unit for defining a task whose sequence of 
  607.       actions may be executed concurrently with those of other tasks. Such 
  608.       tasks may be implemented on multicomputers, multiprocessors, or with 
  609.       interleaved execution on a single processor. A task unit may define 
  610.       either a single executing task or a task type permitting the creation of 
  611.       any number of similar tasks. 
  612.  
  613.    5. A protected unit is the basic unit for defining protected operations for 
  614.       the coordinated use of data shared between tasks. Simple mutual exclusion 
  615.       is provided automatically, and more elaborate sharing protocols can be 
  616.       defined. A protected operation can either be a subprogram or an entry. A 
  617.       protected entry specifies a Boolean expression (an entry barrier) that 
  618.       must be true before the body of the entry is executed. A protected unit 
  619.       may define a single protected object or a protected type permitting the 
  620.       creation of several similar objects. 
  621.  
  622.  
  623. ΓòÉΓòÉΓòÉ 3.4. Declarations and Statements ΓòÉΓòÉΓòÉ
  624.  
  625.    1. The body of a program unit generally contains two parts: a declarative 
  626.       part, which defines the logical entities to be used in the program unit, 
  627.       and a sequence of statements, which defines the execution of the program 
  628.       unit. 
  629.  
  630.    2. The declarative part associates names with declared entities. For 
  631.       example, a name may denote a type, a constant, a variable, or an 
  632.       exception. A declarative part also introduces the names and parameters of 
  633.       other nested subprograms, packages, task units, protected units, and 
  634.       generic units to be used in the program unit. 
  635.  
  636.    3. The sequence of statements describes a sequence of actions that are to be 
  637.       performed. The statements are executed in succession (unless a transfer 
  638.       of control causes execution to continue from another place). 
  639.  
  640.    4. An assignment statement changes the value of a variable. A procedure call 
  641.       invokes execution of a procedure after associating any actual parameters 
  642.       provided at the call with the corresponding formal parameters. 
  643.  
  644.    5. Case statements and if statements allow the selection of an enclosed 
  645.       sequence of statements based on the value of an expression or on the 
  646.       value of a condition. 
  647.  
  648.    6. The loop statement provides the basic iterative mechanism in the 
  649.       language. A loop statement specifies that a sequence of statements is to 
  650.       be executed repeatedly as directed by an iteration scheme, or until an 
  651.       exit statement is encountered. 
  652.  
  653.    7. A block statement comprises a sequence of statements preceded by the 
  654.       declaration of local entities used by the statements. 
  655.  
  656.    8. Certain statements are associated with concurrent execution. A delay 
  657.       statement delays the execution of a task for a specified duration or 
  658.       until a specified time. An entry call statement is written as a procedure 
  659.       call statement; it requests an operation on a task or on a protected 
  660.       object, blocking the caller until the operation can be performed. A 
  661.       called task may accept an entry call by executing a corresponding accept 
  662.       statement, which specifies the actions then to be performed as part of 
  663.       the rendezvous with the calling task. An entry call on a protected object 
  664.       is processed when the corresponding entry barrier evaluates to true, 
  665.       whereupon the body of the entry is executed. The requeue statement 
  666.       permits the provision of a service as a number of related activities with 
  667.       preference control. One form of the select statement allows a selective 
  668.       wait for one of several alternative rendezvous. Other forms of the select 
  669.       statement allow conditional or timed entry calls and the asynchronous 
  670.       transfer of control in response to some triggering event. 
  671.  
  672.    9. Execution of a program unit may encounter error situations in which 
  673.       normal program execution cannot continue. For example, an arithmetic 
  674.       computation may exceed the maximum allowed value of a number, or an 
  675.       attempt may be made to access an array component by using an incorrect 
  676.       index value. To deal with such error situations, the statements of a 
  677.       program unit can be textually followed by exception handlers that specify 
  678.       the actions to be taken when the error situation arises. Exceptions can 
  679.       be raised explicitly by a raise statement. 
  680.  
  681.  
  682. ΓòÉΓòÉΓòÉ 3.5. Data Types ΓòÉΓòÉΓòÉ
  683.  
  684.    1. Every object in the language has a type, which characterizes a set of 
  685.       values and a set of applicable operations. The main classes of types are 
  686.       elementary types (comprising enumeration, numeric, and access types) and 
  687.       composite types (including array and record types). 
  688.  
  689.    2. An enumeration type defines an ordered set of distinct enumeration 
  690.       literals, for example a list of states or an alphabet of characters. The 
  691.       enumeration types Boolean, Character, and Wide_Character are predefined. 
  692.  
  693.    3. Numeric types provide a means of performing exact or approximate 
  694.       numerical computations. Exact computations use integer types, which 
  695.       denote sets of consecutive integers. Approximate computations use either 
  696.       fixed point types, with absolute bounds on the error, or floating point 
  697.       types, with relative bounds on the error. The numeric types Integer, 
  698.       Float, and Duration are predefined. 
  699.  
  700.    4. Composite types allow definitions of structured objects with related 
  701.       components. The composite types in the language include arrays and 
  702.       records. An array is an object with indexed components of the same type. 
  703.       A record is an object with named components of possibly different types. 
  704.       Task and protected types are also forms of composite types. The array 
  705.       types String and Wide_String are predefined. 
  706.  
  707.    5. Record, task, and protected types may have special components called 
  708.       discriminants which parameterize the type. Variant record structures that 
  709.       depend on the values of discriminants can be defined within a record 
  710.       type. 
  711.  
  712.    6. Access types allow the construction of linked data structures. A value of 
  713.       an access type represents a reference to an object declared as aliased or 
  714.       to an object created by the evaluation of an allocator. Several variables 
  715.       of an access type may designate the same object, and components of one 
  716.       object may designate the same or other objects. Both the elements in such 
  717.       linked data structures and their relation to other elements can be 
  718.       altered during program execution. Access types also permit references to 
  719.       subprograms to be stored, passed as parameters, and ultimately 
  720.       dereferenced as part of an indirect call. 
  721.  
  722.    7. Private types permit restricted views of a type. A private type can be 
  723.       defined in a package so that only the logically necessary properties are 
  724.       made visible to the users of the type. The full structural details that 
  725.       are externally irrelevant are then only available within the package and 
  726.       any child units. 
  727.  
  728.    8. From any type a new type may be defined by derivation. A type, together 
  729.       with its derivatives (both direct and indirect) form a derivation class. 
  730.       Class-wide operations may be defined that accept as a parameter an 
  731.       operand of any type in a derivation class. For record and private types, 
  732.       the derivatives may be extensions of the parent type. Types that support 
  733.       these object-oriented capabilities of class-wide operations and type 
  734.       extension must be tagged, so that the specific type of an operand within 
  735.       a derivation class can be identified at run time. When an operation of a 
  736.       tagged type is applied to an operand whose specific type is not known 
  737.       until run time, implicit dispatching is performed based on the tag of the 
  738.       operand. 
  739.  
  740.    9. The concept of a type is further refined by the concept of a subtype, 
  741.       whereby a user can constrain the set of allowed values of a type. 
  742.       Subtypes can be used to define subranges of scalar types, arrays with a 
  743.       limited set of index values, and records and private types with 
  744.       particular discriminant values. 
  745.  
  746.  
  747. ΓòÉΓòÉΓòÉ 3.6. Other Facilities ΓòÉΓòÉΓòÉ
  748.  
  749.    1. Representation clauses can be used to specify the mapping between types 
  750.       and features of an underlying machine. For example, the user can specify 
  751.       that objects of a given type must be represented with a given number of 
  752.       bits, or that the components of a record are to be represented using a 
  753.       given storage layout. Other features allow the controlled use of low 
  754.       level, nonportable, or implementation-dependent aspects, including the 
  755.       direct insertion of machine code. 
  756.  
  757.    2. The predefined environment of the language provides for input-output and 
  758.       other capabilities (such as string manipulation and random number 
  759.       generation) by means of standard library packages. Input-output is 
  760.       supported for values of user-defined as well as of predefined types. 
  761.       Standard means of representing values in display form are also provided. 
  762.       Other standard library packages are defined in annexes of the standard to 
  763.       support systems with specialized requirements. 
  764.  
  765.    3. Finally, the language provides a powerful means of parameterization of 
  766.       program units, called generic program units. The generic parameters can 
  767.       be types and subprograms (as well as objects and packages) and so allow 
  768.       general algorithms and data structures to be defined that are applicable 
  769.       to all types of a given class. 
  770.  
  771.  
  772. ΓòÉΓòÉΓòÉ 3.7. Language Changes ΓòÉΓòÉΓòÉ
  773.  
  774.    1. This International Standard replaces the first edition of 1987. In this 
  775.       edition, the following major language changes have been incorporated: 
  776.  
  777.         a. Support for standard 8-bit and 16-bit character sets. See 2, 3.5.2, 
  778.            3.6.3, A.1, A.3, and A.4. 
  779.  
  780.         b. Object-oriented programming with run-time polymorphism. See the 
  781.            discussions of classes, derived types, tagged types, record 
  782.            extensions, and private extensions in clauses  3.4, 3.9, and 7.3. 
  783.            See also the new forms of generic formal parameters that are allowed 
  784.            by 12.5.1: ``Formal Private and Derived Types'', and 12.7: ``Formal 
  785.            Packages''. 
  786.  
  787.         c. Access types have been extended to allow an access value to 
  788.            designate a subprogram or an object declared by an object 
  789.            declaration (as opposed to just a heap-allocated object) (see 3.10). 
  790.  
  791.         d. Efficient data-oriented synchronization is provided via protected 
  792.            types. See 9. 
  793.  
  794.         e. The library units of a library may be organized into a hierarchy of 
  795.            parent and child units (see 10). 
  796.  
  797.         f. Additional support has been added for interfacing to other 
  798.            languages. See B. 
  799.  
  800.         g. The Specialized Needs Annexes have been added to provide specific 
  801.            support for certain application areas: 
  802.  
  803.              1. Annex C, ``Systems Programming'' 
  804.  
  805.              2. Annex D, ``Real-Time Systems'' 
  806.  
  807.              3. Annex E, ``Distributed Systems'' 
  808.  
  809.              4. Annex F, ``Information Systems'' 
  810.  
  811.              5. Annex G, ``Numerics'' 
  812.  
  813.              6. Annex H, ``Safety and Security'' 
  814.  
  815.  
  816. ΓòÉΓòÉΓòÉ 3.8. Instructions for Comment Submission ΓòÉΓòÉΓòÉ
  817.  
  818.    1. Informal comments on this International Standard may be sent via e-mail 
  819.       to ada-comment@sw-eng.falls-church.va.us. If appropriate, the Project 
  820.       Editor will initiate the defect correction procedure. 
  821.  
  822.    2. Comments should use the following format: 
  823.  
  824.          3.
  825.  
  826.                       !topic Title summarizing comment
  827.                       !reference RM95-ss.ss(pp)
  828.                       !from Author Name yy-mm-dd
  829.                       !keywords keywords related to topic
  830.                       !discussion
  831.                       text of discussion
  832.  
  833.    4. where ss.ss is the section, clause or subclause number, pp is the 
  834.       paragraph number where applicable, and yy-mm-dd is the date the comment 
  835.       was sent. The date is optional, as is the !keywords line. 
  836.  
  837.    5. Multiple comments per e-mail message are acceptable. Please use a 
  838.       descriptive ``Subject'' in your e-mail message. 
  839.  
  840.    6. When correcting typographical errors or making minor wording suggestions, 
  841.       please put the correction directly as the topic of the comment; use 
  842.       square brackets [ ] to indicate text to be omitted and curly braces { } 
  843.       to indicate text to be added, and provide enough context to make the 
  844.       nature of the suggestion self-evident or put additional information in 
  845.       the body of the comment, for example: 
  846.  
  847.          7.
  848.  
  849.                       !topic [c]{C}haracter
  850.                       !topic it[']s meaning is not defined
  851.  
  852.    8. Formal requests for interpretations and for reporting defects in this 
  853.       International Standard may be made in accordance with the ISO/IEC JTC1 
  854.       Directives and the ISO/IEC JTC1/SC22 policy for interpretations. National 
  855.       Bodies may submit a Defect Report to ISO/IEC JTC1/SC22 for resolution 
  856.       under the JTC1 procedures. A response will be provided and, if 
  857.       appropriate, a Technical Corrigendum will be issued in accordance with 
  858.       the procedures. 
  859.  
  860.  
  861. ΓòÉΓòÉΓòÉ 3.9. Acknowledgements ΓòÉΓòÉΓòÉ
  862.  
  863.    1. This International Standard was prepared by the Ada 9X Mapping/Revision 
  864.       Team based at Intermetrics, Inc., which has included: W. Carlson, Program 
  865.       Manager; T. Taft, Technical Director; J. Barnes (consultant); B. Brosgol 
  866.       (consultant); R. Duff (Oak Tree Software); M. Edwards; C. Garrity; R. 
  867.       Hilliard; O. Pazy (consultant); D. Rosenfeld; L. Shafer; W. White; M. 
  868.       Woodger. 
  869.  
  870.    2. The following consultants to the Ada 9X Project contributed to the 
  871.       Specialized Needs Annexes: T. Baker (Real-Time/Systems Programming -- 
  872.       SEI, FSU); K. Dritz (Numerics -- Argonne National Laboratory); A. Gargaro 
  873.       (Distributed Systems -- Computer Sciences); J. Goodenough 
  874.       (Real-Time/Systems Programming -- SEI); J. McHugh (Secure Systems -- 
  875.       consultant); B. Wichmann (Safety-Critical Systems -- NPL: UK). 
  876.  
  877.    3. This work was regularly reviewed by the Ada 9X Distinguished Reviewers 
  878.       and the members of the Ada 9X Rapporteur Group (XRG): E. Ploedereder, 
  879.       Chairman of DRs and XRG (University of Stuttgart: Germany); B. Bardin 
  880.       (Hughes); J. Barnes (consultant: UK); B. Brett (DEC); B. Brosgol 
  881.       (consultant); R. Brukardt (RR Software); N. Cohen (IBM); R. Dewar (NYU); 
  882.       G. Dismukes (TeleSoft); A. Evans (consultant); A. Gargaro (Computer 
  883.       Sciences); M. Gerhardt (ESL); J. Goodenough (SEI); S. Heilbrunner 
  884.       (University of Salzburg: Austria); P. Hilfinger (UC/Berkeley); B. 
  885.       Kaellberg (CelsiusTech: Sweden); M. Kamrad II (Unisys); J. van Katwijk 
  886.       (Delft University of Technology: The Netherlands); V. Kaufman (Russia); 
  887.       P. Kruchten (Rational); R. Landwehr (CCI: Germany); C. Lester (Portsmouth 
  888.       Polytechnic: UK); L. Mansson (TELIA Research: Sweden); S. Michell 
  889.       (Multiprocessor Toolsmiths: Canada); M. Mills (US Air Force); D. Pogge 
  890.       (US Navy); K. Power (Boeing); O. Roubine (Verdix: France); A. Strohmeier 
  891.       (Swiss Fed Inst of Technology: Switzerland); W. Taylor (consultant: UK); 
  892.       J. Tokar (Tartan); E. Vasilescu (Grumman); J. Vladik (Prospeks s.r.o.: 
  893.       Czech Republic); S. Van Vlierberghe (OFFIS: Belgium). 
  894.  
  895.    4. Other valuable feedback influencing the revision process was provided by 
  896.       the Ada 9X Language Precision Team (Odyssey Research Associates), the Ada 
  897.       9X User/Implementer Teams (AETECH, Tartan, TeleSoft), the Ada 9X 
  898.       Implementation Analysis Team (New York University) and the Ada 
  899.       community-at-large. 
  900.  
  901.    5. Special thanks go to R. Mathis, Convenor of ISO/IEC JTC1/SC22 Working 
  902.       Group 9. 
  903.  
  904.    6. The Ada 9X Project was sponsored by the Ada Joint Program Office. 
  905.       Christine M. Anderson at the Air Force Phillips Laboratory (Kirtland AFB, 
  906.       NM) was the project manager. Changes 
  907.  
  908.    7. The International Standard is the same as this version of the Reference 
  909.       Manual, except: 
  910.  
  911.         a. This list of Changes is not included in the International Standard. 
  912.  
  913.         b. The ``Acknowledgements'' page is not included in the International 
  914.            Standard. 
  915.  
  916.         c. The text in the running headers and footers on each page is slightly 
  917.            different in the International Standard. 
  918.  
  919.         d. The title page(s) are different in the International Standard. 
  920.  
  921.         e. This document is formatted for 8.5-by-11-inch paper, whereas the 
  922.            International Standard is formatted for A4 paper (210-by-297mm); 
  923.            thus, the page breaks are in different places. 
  924.  
  925.  
  926. ΓòÉΓòÉΓòÉ 4. General ΓòÉΓòÉΓòÉ
  927.  
  928.    1. Ada is a programming language designed to support the construction of 
  929.       long-lived, highly reliable software systems. The language includes 
  930.       facilities to define packages of related types, objects, and operations. 
  931.       The packages may be parameterized and the types may be extended to 
  932.       support the construction of libraries of reusable, adaptable software 
  933.       components. The operations may be implemented as subprograms using 
  934.       conventional sequential control structures, or as entries that include 
  935.       synchronization of concurrent threads of control as part of their 
  936.       invocation. The language treats modularity in the physical sense as well, 
  937.       with a facility to support separate compilation. 
  938.  
  939.    2. The language includes a complete facility for the support of real-time, 
  940.       concurrent programming. Errors can be signaled as exceptions and handled 
  941.       explicitly. The language also covers systems programming; this requires 
  942.       precise control over the representation of data and access to 
  943.       system-dependent properties. Finally, a predefined environment of 
  944.       standard packages is provided, including facilities for, among others, 
  945.       input-output, string manipulation, numeric elementary functions, and 
  946.       random number generation. 
  947.  
  948.  1.1                           Scope 
  949.  1.2                           Normative References 
  950.  1.3                           Definitions --- The Detailed Node Listing --- 
  951.  1                             General 
  952.  1.1                           Scope 
  953.  1.1.1                         Extent 
  954.  1.1.2                         Structure 
  955.  1.1.3                         Conformity of an Implementation with the 
  956.                                Standard 
  957.  1.1.4                         Method of Description and Syntax Notation 
  958.  1.1.5                         Classification of Errors 
  959.  1.2                           Normative References 
  960.  1.3                           Definitions 
  961.  
  962.  
  963. ΓòÉΓòÉΓòÉ 4.1. Scope ΓòÉΓòÉΓòÉ
  964.  
  965.    1. This International Standard specifies the form and meaning of programs 
  966.       written in Ada. Its purpose is to promote the portability of Ada programs 
  967.       to a variety of data processing systems. 
  968.  
  969.  1.1.1                         Extent 
  970.  1.1.2                         Structure 
  971.  1.1.3                         Conformity of an Implementation with the 
  972.                                Standard 
  973.  1.1.4                         Method of Description and Syntax Notation 
  974.  1.1.5                         Classification of Errors 
  975.  
  976.  
  977. ΓòÉΓòÉΓòÉ 4.1.1. Extent ΓòÉΓòÉΓòÉ
  978.  
  979.    1. This International Standard specifies: 
  980.  
  981.         a. The form of a program written in Ada; 
  982.  
  983.         b. The effect of translating and executing such a program; 
  984.  
  985.         c. The manner in which program units may be combined to form Ada 
  986.            programs; 
  987.  
  988.         d. The language-defined library units that a conforming implementation 
  989.            is required to supply; 
  990.  
  991.         e. The permissible variations within the standard, and the manner in 
  992.            which they are to be documented; 
  993.  
  994.         f. Those violations of the standard that a conforming implementation is 
  995.            required to detect, and the effect of attempting to translate or 
  996.            execute a program containing such violations; 
  997.  
  998.         g. Those violations of the standard that a conforming implementation is 
  999.            not required to detect. 
  1000.  
  1001.    1. This International Standard does not specify: 
  1002.  
  1003.         a. The means whereby a program written in Ada is transformed into 
  1004.            object code executable by a processor; 
  1005.  
  1006.         b. The means whereby translation or execution of programs is invoked 
  1007.            and the executing units are controlled; 
  1008.  
  1009.         c. The size or speed of the object code, or the relative execution 
  1010.            speed of different language constructs; 
  1011.  
  1012.            The form or contents of any listings produced by implementations; in 
  1013.            particular, the form or contents of error or warning messages; 
  1014.  
  1015.         d. The effect of unspecified execution. 
  1016.  
  1017.         e. The size of a program or program unit that will exceed the capacity 
  1018.            of a particular conforming implementation. 
  1019.  
  1020.  
  1021. ΓòÉΓòÉΓòÉ 4.1.2. Structure ΓòÉΓòÉΓòÉ
  1022.  
  1023.    1. This International Standard contains thirteen sections, fourteen annexes, 
  1024.       and an index. 
  1025.  
  1026.    2. The core of the Ada language consists of: 
  1027.  
  1028.         a. Sections 1 through 13 
  1029.  
  1030.         b. Annex A, ``Predefined Language Environment'' 
  1031.  
  1032.         c. Annex B, ``Interface to Other Languages'' 
  1033.  
  1034.         d. Annex J, ``Obsolescent Features'' 
  1035.  
  1036.    1. The following Specialized Needs Annexes define features that are needed 
  1037.       by certain application areas: 
  1038.  
  1039.         a. Annex C, ``Systems Programming'' 
  1040.  
  1041.         b. Annex D, ``Real-Time Systems'' 
  1042.  
  1043.         c. Annex E, ``Distributed Systems'' 
  1044.  
  1045.         d. Annex F, ``Information Systems'' 
  1046.  
  1047.         e. Annex G, ``Numerics'' 
  1048.  
  1049.         f. Annex H, ``Safety and Security'' 
  1050.  
  1051.    1. The core language and the Specialized Needs Annexes are normative, except 
  1052.       that the material in each of the items listed below is informative: 
  1053.  
  1054.         a. Text under a NOTES or Examples heading. 
  1055.  
  1056.         b. Each clause or subclause whose title starts with the word 
  1057.            ``Example'' or ``Examples''. 
  1058.  
  1059.    1. All implementations shall conform to the core language. In addition, an 
  1060.       implementation may conform separately to one or more Specialized Needs 
  1061.       Annexes. 
  1062.  
  1063.    2. The following Annexes are informative: 
  1064.  
  1065.         a. Annex K, ``Language-Defined Attributes'' 
  1066.  
  1067.         b. Annex L, ``Language-Defined Pragmas'' 
  1068.  
  1069.         c. Annex M, ``Implementation-Defined Characteristics'' 
  1070.  
  1071.         d. Annex N, ``Glossary'' 
  1072.  
  1073.         e. Annex P, ``Syntax Summary'' 
  1074.  
  1075.    1. Each section is divided into clauses and subclauses that have a common 
  1076.       structure. Each section, clause, and subclause first introduces its 
  1077.       subject. After the introductory text, text is labeled with the following 
  1078.       headings: 
  1079.  
  1080.             Syntax
  1081.  
  1082.    2. Syntax rules (indented). 
  1083.  
  1084.             Name Resolution Rules
  1085.  
  1086.    3. Compile-time rules that are used in name resolution, including overload 
  1087.       resolution. 
  1088.  
  1089.             Legality Rules
  1090.  
  1091.    4. Rules that are enforced at compile time. A construct is legal if it obeys 
  1092.       all of the Legality Rules. 
  1093.  
  1094.             Static Semantics
  1095.  
  1096.    5. A definition of the compile-time effect of each construct. 
  1097.  
  1098.             Post-Compilation Rules
  1099.  
  1100.    6. Rules that are enforced before running a partition. A partition is legal 
  1101.       if its compilation units are legal and it obeys all of the 
  1102.       Post-Compilation Rules. 
  1103.  
  1104.             Dynamic Semantics
  1105.  
  1106.    7. A definition of the run-time effect of each construct. 
  1107.  
  1108.             Bounded (Run-Time) Errors
  1109.  
  1110.    8. Situations that result in bounded (run-time) errors, see 1.1.5. 
  1111.  
  1112.             Erroneous Execution
  1113.  
  1114.    9. Situations that result in erroneous execution, see 1.1.5. 
  1115.  
  1116.             Implementation Requirements
  1117.  
  1118.   10. Additional requirements for conforming implementations. 
  1119.  
  1120.             Documentation Requirements
  1121.  
  1122.   11. Documentation requirements for conforming implementations. 
  1123.  
  1124.             Metrics
  1125.  
  1126.   12. Metrics that are specified for the time/space properties of the execution 
  1127.       of certain language constructs. 
  1128.  
  1129.             Implementation Permissions
  1130.  
  1131.   13. Additional permissions given to the implementer. 
  1132.  
  1133.             Implementation Advice
  1134.  
  1135.   14. Optional advice given to the implementer. The word ``should'' is used to 
  1136.       indicate that the advice is a recommendation, not a requirement. It is 
  1137.       implementation defined whether or not a given recommendation is obeyed. 
  1138.  
  1139.       NOTES 
  1140.  
  1141.   15. (1) Notes emphasize consequences of the rules described in the 
  1142.       (sub)clause or elsewhere. This material is informative. 
  1143.  
  1144.             Examples
  1145.  
  1146.   16. Examples illustrate the possible forms of the constructs described. This 
  1147.       material is informative. 
  1148.  
  1149.  
  1150. ΓòÉΓòÉΓòÉ 4.1.3. Conformity of an Implementation with the Standard ΓòÉΓòÉΓòÉ
  1151.  
  1152.  
  1153.   Implementation Requirements
  1154.  
  1155.    1. A conforming implementation shall: 
  1156.  
  1157.         a. Translate and correctly execute legal programs written in Ada, 
  1158.            provided that they are not so large as to exceed the capacity of the 
  1159.            implementation; 
  1160.  
  1161.         b. Identify all programs or program units that are so large as to 
  1162.            exceed the capacity of the implementation (or raise an appropriate 
  1163.            exception at run time); 
  1164.  
  1165.         c. Identify all programs or program units that contain errors whose 
  1166.            detection is required by this International Standard; 
  1167.  
  1168.         d. Supply all language-defined library units required by this 
  1169.            International Standard; 
  1170.  
  1171.         e. Contain no variations except those explicitly permitted by this 
  1172.            International Standard, or those that are impossible or impractical 
  1173.            to avoid given the implementation's execution environment; 
  1174.  
  1175.         f. Specify all such variations in the manner prescribed by this 
  1176.            International Standard. 
  1177.  
  1178.    1. The external effect of the execution of an Ada program is defined in 
  1179.       terms of its interactions with its external environment. The following 
  1180.       are defined as external interactions: 
  1181.  
  1182.         a. Any interaction with an external file, see A.7, 
  1183.  
  1184.         b. The execution of certain code_statements, see 13.8, which 
  1185.            code_statements cause external interactions is implementation 
  1186.            defined. 
  1187.  
  1188.         c. Any call on an imported subprogram, see B, including any parameters 
  1189.            passed to it; 
  1190.  
  1191.         d. Any result returned or exception propagated from a main subprogram 
  1192.            (see 10.2) or an exported subprogram, see B, to an external caller; 
  1193.  
  1194.         e. Any read or update of an atomic or volatile object, see C.6, 
  1195.  
  1196.         f. The values of imported and exported objects, see B, at the time of 
  1197.            any other interaction with the external environment. 
  1198.  
  1199.    1. A conforming implementation of this International Standard shall produce 
  1200.       for the execution of a given Ada program a set of interactions with the 
  1201.       external environment whose order and timing are consistent with the 
  1202.       definitions and requirements of this International Standard for the 
  1203.       semantics of the given program. 
  1204.  
  1205.    2. An implementation that conforms to this Standard shall support each 
  1206.       capability required by the core language as specified. In addition, an 
  1207.       implementation that conforms to this Standard may conform to one or more 
  1208.       Specialized Needs Annexes (or to none). Conformance to a Specialized 
  1209.       Needs Annex means that each capability required by the Annex is provided 
  1210.       as specified. 
  1211.  
  1212.    3. An implementation conforming to this International Standard may provide 
  1213.       additional attributes, library units, and pragmas. However, it shall not 
  1214.       provide any attribute, library unit, or pragma having the same name as an 
  1215.       attribute, library unit, or pragma (respectively) specified in a 
  1216.       Specialized Needs Annex unless the provided construct is either as 
  1217.       specified in the Specialized Needs Annex or is more limited in capability 
  1218.       than that required by the Annex. A program that attempts to use an 
  1219.       unsupported capability of an Annex shall either be identified by the 
  1220.       implementation before run time or shall raise an exception at run time. 
  1221.  
  1222.             Documentation Requirements
  1223.  
  1224.    4. Certain aspects of the semantics are defined to be either implementation 
  1225.       defined or unspecified. In such cases, the set of possible effects is 
  1226.       specified, and the implementation may choose any effect in the set. 
  1227.       Implementations shall document their behavior in implementation-defined 
  1228.       situations, but documentation is not required for unspecified situations. 
  1229.       The implementation-defined characteristics are summarized in Annex M. 
  1230.  
  1231.    5. The implementation may choose to document implementation-defined behavior 
  1232.       either by documenting what happens in general, or by providing some 
  1233.       mechanism for the user to determine what happens in a particular case. 
  1234.  
  1235.             Implementation Advice
  1236.  
  1237.    6. If an implementation detects the use of an unsupported Specialized Needs 
  1238.       Annex feature at run time, it should raise Program_Error if feasible. 
  1239.  
  1240.    7. If an implementation wishes to provide implementation-defined extensions 
  1241.       to the functionality of a language-defined library unit, it should 
  1242.       normally do so by adding children to the library unit. 
  1243.  
  1244.       NOTES 
  1245.  
  1246.    8. (2) The above requirements imply that an implementation conforming to 
  1247.       this Standard may support some of the capabilities required by a 
  1248.       Specialized Needs Annex without supporting all required capabilities. 
  1249.  
  1250.  
  1251. ΓòÉΓòÉΓòÉ 4.1.4. Method of Description and Syntax Notation ΓòÉΓòÉΓòÉ
  1252.  
  1253.    1. The form of an Ada program is described by means of a context-free syntax 
  1254.       together with context-dependent requirements expressed by narrative 
  1255.       rules. 
  1256.  
  1257.    2. The meaning of Ada programs is described by means of narrative rules 
  1258.       defining both the effects of each construct and the composition rules for 
  1259.       constructs. 
  1260.  
  1261.    3. The context-free syntax of the language is described using a simple 
  1262.       variant of Backus-Naur Form. In particular: 
  1263.  
  1264.         a. Lower case words in a sans-serif font, some containing embedded 
  1265.            underlines, are used to denote syntactic categories, for example: 
  1266.  
  1267.                    b.
  1268.  
  1269.                       case_statement
  1270.  
  1271.         c. Boldface words are used to denote reserved words, for example: 
  1272.  
  1273.                    d.
  1274.  
  1275.                       array
  1276.  
  1277.         e. Square brackets enclose optional items. Thus the two following rules 
  1278.            are equivalent. 
  1279.  
  1280.                    f.
  1281.  
  1282.                       return_statement ::= return [expression];
  1283.                       return_statement ::= return; | return expression;
  1284.  
  1285.         g. Curly brackets enclose a repeated item. The item may appear zero or 
  1286.            more times; the repetitions occur from left to right as with an 
  1287.            equivalent left-recursive rule. Thus the two following rules are 
  1288.            equivalent. 
  1289.  
  1290.                    h.
  1291.  
  1292.                       term ::= factor {multiplying_operator factor}
  1293.                       term ::= factor | term multiplying_operator factor
  1294.  
  1295.         i. A vertical line separates alternative items unless it occurs 
  1296.            immediately after an opening curly bracket, in which case it stands 
  1297.            for itself: 
  1298.  
  1299.                    j.
  1300.  
  1301.                       constraint ::= scalar_constraint | composite_constraint
  1302.                       discrete_choice_list ::= discrete_choice {| discrete_choice}
  1303.  
  1304.         k. If the name of any syntactic category starts with an italicized 
  1305.            part, it is equivalent to the category name without the italicized 
  1306.            part. The italicized part is intended to convey some semantic 
  1307.            information. For example subtype_name and task_name are both 
  1308.            equivalent to name alone. 
  1309.  
  1310.    1. A syntactic category is a nonterminal in the grammar defined in BNF under 
  1311.       ``Syntax.'' Names of syntactic categories are set in a different font, 
  1312.       like_this. 
  1313.  
  1314.    2. A construct is a piece of text (explicit or implicit) that is an instance 
  1315.       of a syntactic category defined under ``Syntax.'' 
  1316.  
  1317.    3. A constituent of a construct is the construct itself, or any construct 
  1318.       appearing within it. 
  1319.  
  1320.    4. Whenever the run-time semantics defines certain actions to happen in an 
  1321.       arbitrary order, this means that the implementation shall arrange for 
  1322.       these actions to occur in a way that is equivalent to some sequential 
  1323.       order, following the rules that result from that sequential order. When 
  1324.       evaluations are defined to happen in an arbitrary order, with conversion 
  1325.       of the results to some subtypes, or with some run-time checks, the 
  1326.       evaluations, conversions, and checks may be arbitrarily interspersed, so 
  1327.       long as each expression is evaluated before converting or checking its 
  1328.       value. Note that the effect of a program can depend on the order chosen 
  1329.       by the implementation. This can happen, for example, if two actual 
  1330.       parameters of a given call have side effects. 
  1331.  
  1332.       NOTES 
  1333.  
  1334.    5. (3) The syntax rules describing structured constructs are presented in a 
  1335.       form that corresponds to the recommended paragraphing. For example, an 
  1336.       if_statement is defined as: 
  1337.  
  1338.          6.
  1339.  
  1340.                       if_statement ::=
  1341.                         if condition then
  1342.                          sequence_of_statements
  1343.                         {elsif condition then
  1344.                          sequence_of_statements}
  1345.                         [else
  1346.                          sequence_of_statements]
  1347.                         end if;
  1348.  
  1349.    7. (4) The line breaks and indentation in the syntax rules indicate the 
  1350.       recommended line breaks and indentation in the corresponding constructs. 
  1351.       The preferred places for other line breaks are after semicolons. 
  1352.  
  1353.  
  1354. ΓòÉΓòÉΓòÉ 4.1.5. Classification of Errors ΓòÉΓòÉΓòÉ
  1355.  
  1356.  
  1357.   Implementation Requirements
  1358.  
  1359.    1. The language definition classifies errors into several different 
  1360.       categories: 
  1361.  
  1362.         a. Errors that are required to be detected prior to run time by every 
  1363.            Ada implementation; 
  1364.  
  1365.              1. These errors correspond to any violation of a rule given in 
  1366.                 this International Standard, other than those listed below. In 
  1367.                 particular, violation of any rule that uses the terms shall, 
  1368.                 allowed, permitted, legal, or illegal belongs to this category. 
  1369.                 Any program that contains such an error is not a legal Ada 
  1370.                 program; on the other hand, the fact that a program is legal 
  1371.                 does not mean, per se, that the program is free from other 
  1372.                 forms of error. 
  1373.  
  1374.              2. The rules are further classified as either compile time rules, 
  1375.                 or post compilation rules, depending on whether a violation has 
  1376.                 to be detected at the time a compilation unit is submitted to 
  1377.                 the compiler, or may be postponed until the time a compilation 
  1378.                 unit is incorporated into a partition of a program. 
  1379.  
  1380.         a. Errors that are required to be detected at run time by the execution 
  1381.            of an Ada program; 
  1382.  
  1383.              1. The corresponding error situations are associated with the 
  1384.                 names of the predefined exceptions. Every Ada compiler is 
  1385.                 required to generate code that raises the corresponding 
  1386.                 exception if such an error situation arises during program 
  1387.                 execution. If such an error situation is certain to arise in 
  1388.                 every execution of a construct, then an implementation is 
  1389.                 allowed (although not required) to report this fact at 
  1390.                 compilation time. 
  1391.  
  1392.         a. Bounded errors; 
  1393.  
  1394.              1. The language rules define certain kinds of errors that need not 
  1395.                 be detected either prior to or during run time, but if not 
  1396.                 detected, the range of possible effects shall be bounded. The 
  1397.                 errors of this category are called bounded errors. The possible 
  1398.                 effects of a given bounded error are specified for each such 
  1399.                 error, but in any case one possible effect of a bounded error 
  1400.                 is the raising of the exception Program_Error. 
  1401.  
  1402.         a. Erroneous execution. 
  1403.  
  1404.              1. In addition to bounded errors, the language rules define 
  1405.                 certain kinds of errors as leading to erroneous execution. Like 
  1406.                 bounded errors, the implementation need not detect such errors 
  1407.                 either prior to or during run time. Unlike bounded errors, 
  1408.                 there is no language-specified bound on the possible effect of 
  1409.                 erroneous execution; the effect is in general not predictable. 
  1410.  
  1411.   Implementation Permissions
  1412.  
  1413.    1. An implementation may provide nonstandard modes of operation. Typically 
  1414.       these modes would be selected by a pragma or by a command line switch 
  1415.       when the compiler is invoked. When operating in a nonstandard mode, the 
  1416.       implementation may reject compilation_units that do not conform to 
  1417.       additional requirements associated with the mode, such as an excessive 
  1418.       number of warnings or violation of coding style guidelines. Similarly, in 
  1419.       a nonstandard mode, the implementation may apply special optimizations or 
  1420.       alternative algorithms that are only meaningful for programs that satisfy 
  1421.       certain criteria specified by the implementation. In any case, an 
  1422.       implementation shall support a standard mode that conforms to the 
  1423.       requirements of this International Standard; in particular, in the 
  1424.       standard mode, all legal compilation_units shall be accepted. 
  1425.  
  1426.             Implementation Advice
  1427.  
  1428.    2. If an implementation detects a bounded error or erroneous execution, it 
  1429.       should raise Program_Error. 
  1430.  
  1431.  
  1432. ΓòÉΓòÉΓòÉ 4.2. Normative References ΓòÉΓòÉΓòÉ
  1433.  
  1434.    1. The following standards contain provisions which, through reference in 
  1435.       this text, constitute provisions of this International Standard. At the 
  1436.       time of publication, the editions indicated were valid. All standards are 
  1437.       subject to revision, and parties to agreements based on this 
  1438.       International Standard are encouraged to investigate the possibility of 
  1439.       applying the most recent editions of the standards indicated below. 
  1440.       Members of IEC and ISO maintain registers of currently valid 
  1441.       International Standards. 
  1442.  
  1443.    2. ISO/IEC 646:1991, Information technology -- ISO 7-bit coded character set 
  1444.       for information interchange. 
  1445.  
  1446.    3. ISO/IEC 1539:1991, Information technology -- Programming languages -- 
  1447.       FORTRAN. 
  1448.  
  1449.    4. ISO 1989:1985, Programming languages -- COBOL. 
  1450.  
  1451.    5. ISO/IEC 6429:1992, Information technology -- Control functions for coded 
  1452.       graphic character sets. 
  1453.  
  1454.    6. ISO/IEC 8859-1:1987, Information processing -- 8-bit single-byte coded 
  1455.       character sets -- Part 1: Latin alphabet No. 1. 
  1456.  
  1457.    7. ISO/IEC 9899:1990, Programming languages -- C. 
  1458.  
  1459.    8. ISO/IEC 10646-1:1993, Information technology -- Universal Multiple-Octet 
  1460.       Coded Character Set (UCS) -- Part 1: Architecture and Basic Multilingual 
  1461.       Plane. 
  1462.  
  1463.  
  1464. ΓòÉΓòÉΓòÉ 4.3. Definitions ΓòÉΓòÉΓòÉ
  1465.  
  1466.    1. Terms are defined throughout this International Standard, indicated by 
  1467.       italic type. Terms explicitly defined in this International Standard are 
  1468.       not to be presumed to refer implicitly to similar terms defined 
  1469.       elsewhere. Terms not defined in this International Standard are to be 
  1470.       interpreted according to the Webster's Third New International Dictionary 
  1471.       of the English Language. Informal descriptions of some terms are also 
  1472.       given in Annex N, ``Glossary''. 
  1473.  
  1474.  
  1475. ΓòÉΓòÉΓòÉ 5. Lexical Elements ΓòÉΓòÉΓòÉ
  1476.  
  1477.    1. The text of a program consists of the texts of one or more compilations. 
  1478.       The text of a compilation is a sequence of lexical elements, each 
  1479.       composed of characters; the rules of composition are given in this 
  1480.       section. Pragmas, which provide certain information for the compiler, are 
  1481.       also described in this section. 
  1482.  
  1483.  2.1                           Character Set 
  1484.  2.2                           Lexical Elements, Separators, and Delimiters 
  1485.  2.3                           Identifiers 
  1486.  2.4                           Numeric Literals 
  1487.  2.5                           Character Literals 
  1488.  2.6                           String Literals 
  1489.  2.7                           Comments 
  1490.  2.8                           Pragmas 
  1491.  2.9                           Reserved Words --- The Detailed Node Listing --- 
  1492.  2                             Lexical Elements 
  1493.  2.1                           Character Set 
  1494.  2.2                           Lexical Elements, Separators, and Delimiters 
  1495.  2.3                           Identifiers 
  1496.  2.4                           Numeric Literals 
  1497.  2.4.1                         Decimal Literals 
  1498.  2.4.2                         Based Literals 
  1499.  2.5                           Character Literals 
  1500.  2.6                           String Literals 
  1501.  2.7                           Comments 
  1502.  2.8                           Pragmas 
  1503.  2.9                           Reserved Words 
  1504.  
  1505.  
  1506. ΓòÉΓòÉΓòÉ 5.1. Character Set ΓòÉΓòÉΓòÉ
  1507.  
  1508.    1. The only characters allowed outside of comments are the 
  1509.       graphic_characters and format_effectors. 
  1510.  
  1511.             Syntax
  1512.  
  1513.          2.
  1514.  
  1515.                       character ::=
  1516.                          graphic_character
  1517.                         | format_effector
  1518.                         | other_control_function
  1519.  
  1520.          3.
  1521.  
  1522.                       graphic_character ::=
  1523.                          identifier_letter
  1524.                         | digit
  1525.                         | space_character
  1526.                         | special_character
  1527.  
  1528.   Static Semantics
  1529.  
  1530.    4. The character repertoire for the text of an Ada program consists of the 
  1531.       collection of characters called the Basic Multilingual Plane (BMP) of the 
  1532.       ISO 10646 Universal Multiple-Octet Coded Character Set, plus a set of 
  1533.       format_ effectors and, in comments only, a set of 
  1534.       other_control_functions; the coded representation for these characters is 
  1535.       implementation defined (it need not be a representation defined within 
  1536.       ISO-10646-1). 
  1537.  
  1538.    5. The description of the language definition in this International Standard 
  1539.       uses the graphic symbols defined for Row 00: Basic Latin and Row 00: 
  1540.       Latin-1 Supplement of the ISO 10646 BMP; these correspond to the graphic 
  1541.       symbols of ISO 8859-1 (Latin-1); no graphic symbols are used in this 
  1542.       International Standard for characters outside of Row 00 of the BMP. The 
  1543.       actual set of graphic symbols used by an implementation for the visual 
  1544.       representation of the text of an Ada program is not specified. 
  1545.  
  1546.    6. The categories of characters are defined as follows: 
  1547.  
  1548.    7. identifier_letter 
  1549.  
  1550.                       upper_case_identifier_letter | lower_case_identifier_letter
  1551.  
  1552.    8. upper_case_identifier_letter 
  1553.  
  1554.                       Any character of Row 00 of ISO 10646 BMP whose name begins ``Latin
  1555.                       Capital Letter''.
  1556.  
  1557.    9. lower_case_identifier_letter 
  1558.  
  1559.                       Any character of Row 00 of ISO 10646 BMP whose name begins
  1560.                       ``Latin Small Letter''.
  1561.  
  1562.   10. digit 
  1563.  
  1564.                       One of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, or 9.
  1565.  
  1566.   11. space_character 
  1567.  
  1568.                       The character of ISO 10646 BMP named ``Space''.
  1569.  
  1570.   12. special_character 
  1571.  
  1572.                       Any character of the ISO 10646 BMP that is not reserved for a
  1573.                       control function, and is not the space_character, an
  1574.                       identifier_letter, or a digit.
  1575.  
  1576.   13. format_effector 
  1577.  
  1578.                       The control functions of ISO 6429 called character tabulation
  1579.                       (HT), line tabulation (VT), carriage return (CR), line feed (LF),
  1580.                       and form feed (FF).
  1581.  
  1582.   14. other_control_function 
  1583.  
  1584.                       Any control function, other than a format_effector, that is
  1585.                       allowed in a comment; the set of other_control_functions allowed
  1586.                       in comments is implementation defined.
  1587.  
  1588.   15. The following names are used when referring to certain 
  1589.       special_characters: 
  1590.  
  1591.                       symbol  name          symbol  name
  1592.                        "    quotation mark      :    colon
  1593.                        #    number sign        ;    semicolon
  1594.                        &    ampersand         <    less-than sign
  1595.                        '    apostrophe, tick     =    equals sign
  1596.                        (    left parenthesis     >    greater-than sign
  1597.                        )    right parenthesis     _    low line, underline
  1598.                        *    asterisk, multiply    |    vertical line
  1599.                        +    plus sign         [    left square bracket
  1600.                        ,    comma           ]    right square bracket
  1601.                        -    hyphen-minus, minus    {    left curly bracket
  1602.                        .    full stop, dot, point   }    right curly bracket
  1603.                        /    solidus, divide
  1604.  
  1605.   Implementation Permissions
  1606.  
  1607.   16. In a nonstandard mode, the implementation may support a different 
  1608.       character repertoire; in particular, the set of characters that are 
  1609.       considered identifier_letters can be extended or changed to conform to 
  1610.       local conventions. 
  1611.  
  1612.       NOTES 
  1613.  
  1614.   17. (1) Every code position of ISO 10646 BMP that is not reserved for a 
  1615.       control function is defined to be a graphic_character by this 
  1616.       International Standard. This includes all code positions other than 0000 
  1617.       - 001F, 007F - 009F, and FFFE - FFFF. 
  1618.  
  1619.   18. (2) The language does not specify the source representation of programs. 
  1620.  
  1621.  
  1622. ΓòÉΓòÉΓòÉ 5.2. Lexical Elements, Separators, and Delimiters ΓòÉΓòÉΓòÉ
  1623.  
  1624.  
  1625.   Static Semantics
  1626.  
  1627.    1. The text of a program consists of the texts of one or more compilations. 
  1628.       The text of each compilation is a sequence of separate lexical elements. 
  1629.       Each lexical element is formed from a sequence of characters, and is 
  1630.       either a delimiter, an identifier, a reserved word, a numeric_literal, a 
  1631.       character_ literal, a string_literal, or a comment. The meaning of a 
  1632.       program depends only on the particular sequences of lexical elements that 
  1633.       form its compilations, excluding comments. 
  1634.  
  1635.    2. The text of a compilation is divided into lines. In general, the 
  1636.       representation for an end of line is implementation defined. However, a 
  1637.       sequence of one or more format_effectors other than character tabulation 
  1638.       (HT) signifies at least one end of line. 
  1639.  
  1640.    3. In some cases an explicit separator is required to separate adjacent 
  1641.       lexical elements. A separator is any of a space character, a format 
  1642.       effector, or the end of a line, as follows: 
  1643.  
  1644.         a. A space character is a separator except within a comment, a 
  1645.            string_literal, or a character_literal. 
  1646.  
  1647.         b. Character tabulation (HT) is a separator except within a comment. 
  1648.  
  1649.         c. The end of a line is always a separator. 
  1650.  
  1651.    1. One or more separators are allowed between any two adjacent lexical 
  1652.       elements, before the first of each compilation, or after the last. At 
  1653.       least one separator is required between an identifier, a reserved word, 
  1654.       or a numeric_literal and an adjacent identifier, reserved word, or 
  1655.       numeric_literal. 
  1656.  
  1657.    2. A delimiter is either one of the following special characters 
  1658.  
  1659.          3.
  1660.  
  1661.                       &  '   (   )   *   +   ,   -
  1662.                       ┬╖   /   :   ;   <   =   >   |
  1663.  
  1664.    4. or one of the following compound delimiters each composed of two adjacent 
  1665.       special characters 
  1666.  
  1667.          5.
  1668.  
  1669.                       =>   ┬╖┬╖   **   :=   /=   >=   <=   <<   >>   <>
  1670.  
  1671.    6. Each of the special characters listed for single character delimiters is 
  1672.       a single delimiter except if this character is used as a character of a 
  1673.       compound delimiter, or as a character of a comment, string_literal, 
  1674.       character_literal, or numeric_literal. 
  1675.  
  1676.    7. The following names are used when referring to compound delimiters: 
  1677.  
  1678.          8.
  1679.  
  1680.                       delimiter   name
  1681.                         =>            arrow
  1682.                         ┬╖┬╖            double dot
  1683.                         **            double star, exponentiate
  1684.                         :=            assignment (pronounced: ``becomes'')
  1685.                         /=            inequality (pronounced: ``not equal'')
  1686.                         >=            greater than or equal
  1687.                         <=            less than or equal
  1688.                         <<            left label bracket
  1689.                         >>            right label bracket
  1690.                         <>            box
  1691.  
  1692.   Implementation Requirements
  1693.  
  1694.    9. An implementation shall support lines of at least 200 characters in 
  1695.       length, not counting any characters used to signify the end of a line. An 
  1696.       implementation shall support lexical elements of at least 200 characters 
  1697.       in length. The maximum supported line length and lexical element length 
  1698.       are implementation defined. 
  1699.  
  1700.  
  1701. ΓòÉΓòÉΓòÉ 5.3. Identifiers ΓòÉΓòÉΓòÉ
  1702.  
  1703.    1. Identifiers are used as names. 
  1704.  
  1705.             Syntax
  1706.  
  1707.          2.
  1708.  
  1709.                       identifier ::= identifier_letter {[underline] letter_or_digit}
  1710.  
  1711.          3.
  1712.  
  1713.                       letter_or_digit ::= identifier_letter | digit
  1714.  
  1715.         a. An identifier shall not be a reserved word. 
  1716.  
  1717.   Static Semantics
  1718.  
  1719.    1. All characters of an identifier are significant, including any underline 
  1720.       character. Identifiers differing only in the use of corresponding upper 
  1721.       and lower case letters are considered the same. 
  1722.  
  1723.             Implementation Permissions
  1724.  
  1725.    2. In a nonstandard mode, an implementation may support other upper/lower 
  1726.       case equivalence rules for identifiers, to accommodate local conventions. 
  1727.  
  1728.             Examples
  1729.  
  1730.    3. Examples of identifiers: 
  1731.  
  1732.          4.
  1733.  
  1734.                       Count   X   Get_Symbol  Ethelyn  Marion
  1735.                       Snobol_4  X1  Page_Count   Store_Next_Item
  1736.  
  1737.  
  1738. ΓòÉΓòÉΓòÉ 5.4. Numeric Literals ΓòÉΓòÉΓòÉ
  1739.  
  1740.    1. There are two kinds of numeric_literals, real literals and integer 
  1741.       literals. A real literal is a numeric_literal that includes a point; an 
  1742.       integer literal is a numeric_literal without a point. 
  1743.  
  1744.             Syntax
  1745.  
  1746.          2.
  1747.  
  1748.                       numeric_literal ::= decimal_literal | based_literal
  1749.  
  1750.  NOTES 
  1751.  
  1752.    3. (3) The type of an integer literal is universal_integer. The type of a 
  1753.       real literal is universal_real. 
  1754.  
  1755.  2.4.1                         Decimal Literals 
  1756.  2.4.2                         Based Literals 
  1757.  
  1758.  
  1759. ΓòÉΓòÉΓòÉ 5.4.1. Decimal Literals ΓòÉΓòÉΓòÉ
  1760.  
  1761.    1. A decimal_literal is a numeric_literal in the conventional decimal 
  1762.       notation (that is, the base is ten). 
  1763.  
  1764.             Syntax
  1765.  
  1766.          2.
  1767.  
  1768.                       decimal_literal ::= numeral [.numeral] [exponent]
  1769.  
  1770.          3.
  1771.  
  1772.                       numeral ::= digit {[underline] digit}
  1773.  
  1774.          4.
  1775.  
  1776.                       exponent ::= E [+] numeral | E - numeral
  1777.  
  1778.         a. An exponent for an integer literal shall not have a minus sign. 
  1779.  
  1780.   Static Semantics
  1781.  
  1782.    1. An underline character in a numeric_literal does not affect its meaning. 
  1783.       The letter E of an exponent can be written either in lower case or in 
  1784.       upper case, with the same meaning. 
  1785.  
  1786.    2. An exponent indicates the power of ten by which the value of the 
  1787.       decimal_literal without the exponent is to be multiplied to obtain the 
  1788.       value of the decimal_literal with the exponent. 
  1789.  
  1790.             Examples
  1791.  
  1792.    3. Examples of decimal literals: 
  1793.  
  1794.          4.
  1795.  
  1796.                       12    0    1E6   123_456      --  integer literals
  1797.                       12.0    0.0   0.456  3.14159_26     --  real literals
  1798.  
  1799.  
  1800. ΓòÉΓòÉΓòÉ 5.4.2. Based Literals ΓòÉΓòÉΓòÉ
  1801.  
  1802.    1. A based_literal is a numeric_literal expressed in a form that specifies 
  1803.       the base explicitly. 
  1804.  
  1805.             Syntax
  1806.  
  1807.          2.
  1808.  
  1809.                       based_literal ::= base # based_numeral [.based_numeral] # [exponent]
  1810.  
  1811.          3.
  1812.  
  1813.                       base ::= numeral
  1814.  
  1815.          4.
  1816.  
  1817.                       based_numeral ::=
  1818.                         extended_digit {[underline] extended_digit}
  1819.  
  1820.          5.
  1821.  
  1822.                       extended_digit ::= digit | A | B | C | D | E | F
  1823.  
  1824.   Legality Rules
  1825.  
  1826.    6. The base (the numeric value of the decimal numeral preceding the first #) 
  1827.       shall be at least two and at most sixteen. The extended_digits A through 
  1828.       F represent the digits ten through fifteen, respectively. The value of 
  1829.       each extended_digit of a based_literal shall be less than the base. 
  1830.  
  1831.             Static Semantics
  1832.  
  1833.    7. The conventional meaning of based notation is assumed. An exponent 
  1834.       indicates the power of the base by which the value of the based_literal 
  1835.       without the exponent is to be multiplied to obtain the value of the 
  1836.       based_literal with the exponent. The base and the exponent, if any, are 
  1837.       in decimal notation. 
  1838.  
  1839.    8. The extended_digits A through F can be written either in lower case or in 
  1840.       upper case, with the same meaning. 
  1841.  
  1842.             Examples
  1843.  
  1844.    9. Examples of based literals: 
  1845.  
  1846.         10.
  1847.  
  1848.                       2#1111_1111#  16#FF#    016#0ff#
  1849.                       --  integer literals of value 255
  1850.                       16#E#E1     2#1110_0000#
  1851.                       --  integer literals of value 224
  1852.                       16#F.FF#E+2   2#1.1111_1111_1110#E11
  1853.                       --  real literals of value 4095.0
  1854.  
  1855.  
  1856. ΓòÉΓòÉΓòÉ 5.5. Character Literals ΓòÉΓòÉΓòÉ
  1857.  
  1858.    1. A character_literal is formed by enclosing a graphic character between 
  1859.       two apostrophe characters. 
  1860.  
  1861.             Syntax
  1862.  
  1863.          2.
  1864.  
  1865.                       character_literal ::= 'graphic_character'
  1866.  
  1867.  NOTES 
  1868.  
  1869.    3. (4) A character_literal is an enumeration literal of a character type. 
  1870.       (see 3.5.2). 
  1871.  
  1872.             Examples
  1873.  
  1874.    4. Examples of character literals: 
  1875.  
  1876.          5.
  1877.  
  1878.                       'A'   '*'   '''   ' '
  1879.  
  1880.  
  1881. ΓòÉΓòÉΓòÉ 5.6. String Literals ΓòÉΓòÉΓòÉ
  1882.  
  1883.    1. A string_literal is formed by a sequence of graphic characters (possibly 
  1884.       none) enclosed between two quotation marks used as string brackets. They 
  1885.       are used to represent operator_symbols  (see 6.1) values of a string type 
  1886.       (see 4.2) and array subaggregates (see 4.3.3). 
  1887.  
  1888.             Syntax
  1889.  
  1890.          2.
  1891.  
  1892.                       string_literal ::= "{string_element}"
  1893.  
  1894.          3.
  1895.  
  1896.                       string_element ::= "" | non_quotation_mark_graphic_character
  1897.  
  1898.         a. A string_element is either a pair of quotation marks (""), or a 
  1899.            single graphic_character other than a quotation mark. 
  1900.  
  1901.   Static Semantics
  1902.  
  1903.    1. The sequence of characters of a string_literal is formed from the 
  1904.       sequence of string_elements between the bracketing quotation marks, in 
  1905.       the given order, with a string_element that is "" becoming a single 
  1906.       quotation mark in the sequence of characters, and any other 
  1907.       string_element being reproduced in the sequence. 
  1908.  
  1909.    2. A null string literal is a string_literal with no string_elements between 
  1910.       the quotation marks. 
  1911.  
  1912.       NOTES 
  1913.  
  1914.    3. (5) An end of line cannot appear in a string_literal. 
  1915.  
  1916.             Examples
  1917.  
  1918.    4. Examples of string literals: 
  1919.  
  1920.          5.
  1921.  
  1922.                       "Message of the day:"
  1923.                       ""              --  a null string literal
  1924.                       " "  "A"  """"       --  three string literals of length 1
  1925.                       "Characters such as $, %, and } are allowed in string literals"
  1926.  
  1927.  
  1928. ΓòÉΓòÉΓòÉ 5.7. Comments ΓòÉΓòÉΓòÉ
  1929.  
  1930.    1. A comment starts with two adjacent hyphens and extends up to the end of 
  1931.       the line. 
  1932.  
  1933.             Syntax
  1934.  
  1935.          2.
  1936.  
  1937.                       comment ::= --{non_end_of_line_character}
  1938.  
  1939.         a. A comment may appear on any line of a program. 
  1940.  
  1941.   Static Semantics
  1942.  
  1943.    1. The presence or absence of comments has no influence on whether a program 
  1944.       is legal or illegal. Furthermore, comments do not influence the meaning 
  1945.       of a program; their sole purpose is the enlightenment of the human 
  1946.       reader. 
  1947.  
  1948.             Examples
  1949.  
  1950.    2. Examples of comments: 
  1951.  
  1952.          3.
  1953.  
  1954.                       --  the last sentence above echoes the Algol 68 report
  1955.                       end;  --  processing of Line is complete
  1956.                       --  a long comment may be split onto
  1957.                       --  two or more consecutive lines
  1958.                       ----------------  the first two hyphens start the comment
  1959.  
  1960.  
  1961. ΓòÉΓòÉΓòÉ 5.8. Pragmas ΓòÉΓòÉΓòÉ
  1962.  
  1963.    1. A pragma is a compiler directive. There are language-defined pragmas that 
  1964.       give instructions for optimization, listing control, etc. An 
  1965.       implementation may support additional (implementation-defined) pragmas. 
  1966.  
  1967.             Syntax
  1968.  
  1969.          2.
  1970.  
  1971.                       pragma ::=
  1972.                         pragma identifier [(pragma_argument_association
  1973.                          {, pragma_argument_association})];
  1974.  
  1975.          3.
  1976.  
  1977.                       pragma_argument_association ::=
  1978.                          [pragma_argument_identifier =>] name
  1979.                         | [pragma_argument_identifier =>] expression
  1980.  
  1981.         a. In a pragma, any pragma_argument_associations without a 
  1982.            pragma_argument_identifier shall precede any associations with a 
  1983.            pragma_argument_identifier. 
  1984.  
  1985.         b. Pragmas are only allowed at the following places in a program: 
  1986.  
  1987.              1. After a semicolon delimiter, but not within a formal_part or 
  1988.                 discriminant_part. 
  1989.  
  1990.              2. At any place where the syntax rules allow a construct defined 
  1991.                 by a syntactic category whose name ends with "declaration", 
  1992.                 "statement", "clause", or "alternative", or one of the 
  1993.                 syntactic categories variant or exception_handler; but not in 
  1994.                 place of such a construct. Also at any place where a 
  1995.                 compilation_unit would be allowed. 
  1996.  
  1997.         a. Additional syntax rules and placement restrictions exist for 
  1998.            specific pragmas. 
  1999.  
  2000.    1. The name of a pragma is the identifier following the reserved word 
  2001.       pragma. The name or expression of a pragma_argument_association is a 
  2002.       pragma argument. 
  2003.  
  2004.    2. An identifier specific to a pragma is an identifier that is used in a 
  2005.       pragma argument with special meaning for that pragma. 
  2006.  
  2007.             Static Semantics
  2008.  
  2009.    3. If an implementation does not recognize the name of a pragma, then it has 
  2010.       no effect on the semantics of the program. Inside such a pragma, the only 
  2011.       rules that apply are the Syntax Rules. 
  2012.  
  2013.             Dynamic Semantics
  2014.  
  2015.    4. Any pragma that appears at the place of an executable construct is 
  2016.       executed. Unless otherwise specified for a particular pragma, this 
  2017.       execution consists of the evaluation of each evaluable pragma argument in 
  2018.       an arbitrary order. 
  2019.  
  2020.             Implementation Requirements
  2021.  
  2022.    5. The implementation shall give a warning message for an unrecognized 
  2023.       pragma name. 
  2024.  
  2025.             Implementation Permissions
  2026.  
  2027.    6. An implementation may provide implementation-defined pragmas; the name of 
  2028.       an implementation-defined pragma shall differ from those of the 
  2029.       language-defined pragmas. 
  2030.  
  2031.    7. An implementation may ignore an unrecognized pragma even if it violates 
  2032.       some of the Syntax Rules, if detecting the syntax error is too complex. 
  2033.  
  2034.             Implementation Advice
  2035.  
  2036.    8. Normally, implementation-defined pragmas should have no semantic effect 
  2037.       for error-free programs; that is, if the implementation-defined pragmas 
  2038.       are removed from a working program, the program should still be legal, 
  2039.       and should still have the same semantics. 
  2040.  
  2041.    9. Normally, an implementation should not define pragmas that can make an 
  2042.       illegal program legal, except as follows: 
  2043.  
  2044.         a. A pragma used to complete a declaration, such as a pragma Import; 
  2045.  
  2046.         b. A pragma used to configure the environment by adding, removing, or 
  2047.            replacing library_items. 
  2048.  
  2049.   Syntax
  2050.  
  2051.    1. The forms of List, Page, and Optimize pragmas are as follows: 
  2052.  
  2053.    2. pragma List(identifier); 
  2054.  
  2055.    3. pragma Page; 
  2056.  
  2057.    4. pragma Optimize(identifier); 
  2058.  
  2059.         a. Other pragmas are defined throughout this International Standard, 
  2060.            and are summarized in Annex L. 
  2061.  
  2062.   Static Semantics
  2063.  
  2064.    1. A pragma List takes one of the identifiers On or Off as the single 
  2065.       argument. This pragma is allowed anywhere a pragma is allowed. It 
  2066.       specifies that listing of the compilation is to be continued or suspended 
  2067.       until a List pragma with the opposite argument is given within the same 
  2068.       compilation. The pragma itself is always listed if the compiler is 
  2069.       producing a listing. 
  2070.  
  2071.    2. A pragma Page is allowed anywhere a pragma is allowed. It specifies that 
  2072.       the program text which follows the pragma should start on a new page (if 
  2073.       the compiler is currently producing a listing). 
  2074.  
  2075.    3. A pragma Optimize takes one of the identifiers Time, Space, or Off as the 
  2076.       single argument. This pragma is allowed anywhere a pragma is allowed, and 
  2077.       it applies until the end of the immediately enclosing declarative region, 
  2078.       or for a pragma at the place of a compilation_unit, to the end of the 
  2079.       compilation. It gives advice to the implementation as to whether time or 
  2080.       space is the primary optimization criterion, or that optional 
  2081.       optimizations should be turned off. It is implementation defined how this 
  2082.       advice is followed. 
  2083.  
  2084.             Examples
  2085.  
  2086.    4. Examples of pragmas: 
  2087.  
  2088.          5.
  2089.  
  2090.                       pragma List(Off);     -- turn off listing generation
  2091.                       pragma Optimize(Off);   -- turn off optional optimizations
  2092.                       pragma Inline(Set_Mask);  -- generate code for Set_Mask inline
  2093.                       pragma Suppress(Range_Check, On => Index);
  2094.                       -- turn off range checking on Index
  2095.  
  2096.  
  2097. ΓòÉΓòÉΓòÉ 5.9. Reserved Words ΓòÉΓòÉΓòÉ
  2098.  
  2099.  
  2100.   Syntax
  2101.  
  2102.         a. The following are the reserved words (ignoring upper/lower case 
  2103.            distinctions): 
  2104.  
  2105.                       abort      else      new       return
  2106.                       abs       elsif      not       reverse
  2107.                       abstract    end       null
  2108.                       accept     entry             select
  2109.                       access     exception           separate
  2110.                       aliased     exit      of       subtype
  2111.                       all              or
  2112.                       and       for       others     tagged
  2113.                       array      function    out       task
  2114.                       at                      terminate
  2115.                               generic     package     then
  2116.                       begin      goto      pragma     type
  2117.                       body              private
  2118.                               if       procedure
  2119.                       case      in       protected    until
  2120.                       constant    is               use
  2121.                                      raise
  2122.                       declare            range      when
  2123.                       delay      limited     record     while
  2124.                       delta      loop      rem       with
  2125.                       digits             renames
  2126.                       do       mod       requeue     xor
  2127.  
  2128.   NOTES 
  2129.  
  2130.    1. (6) The reserved words appear in lower case boldface in this 
  2131.       International Standard, except when used in the designator of an 
  2132.       attribute (see 4.1.4). Lower case boldface is also used for a reserved 
  2133.       word in a string_literal used as an operator_symbol. This is merely a 
  2134.       convention -- programs may be written in whatever typeface is desired and 
  2135.       available. 
  2136.  
  2137.  
  2138. ΓòÉΓòÉΓòÉ 6. Declarations and Types ΓòÉΓòÉΓòÉ
  2139.  
  2140.    1. This section describes the types in the language and the rules for 
  2141.       declaring constants, variables, and named numbers. 
  2142.  
  2143.  3.1                           Declarations 
  2144.  3.2                           Types and Subtypes 
  2145.  3.3                           Objects and Named Numbers 
  2146.  3.4                           Derived Types and Classes 
  2147.  3.5                           Scalar Types 
  2148.  3.6                           Array Types 
  2149.  3.7                           Discriminants 
  2150.  3.8                           Record Types 
  2151.  3.9                           Tagged Types and Type Extensions 
  2152.  3.10                          Access Types 
  2153.  3.11                          Declarative Parts --- The Detailed Node Listing 
  2154.                                --- 
  2155.  3.1                           Declarations 
  2156.  3.2                           Types and Subtypes 
  2157.  3.2.1                         Type Declarations 
  2158.  3.2.2                         Subtype Declarations 
  2159.  3.2.3                         Classification of Operations 
  2160.  3.3                           Objects and Named Numbers 
  2161.  3.3.1                         Object Declarations 
  2162.  3.3.2                         Number Declarations 
  2163.  3.4                           Derived Types and Classes 
  2164.  3.4.1                         Derivation Classes 
  2165.  3.5                           Scalar Types 
  2166.  3.5.1                         Enumeration Types 
  2167.  3.5.2                         Character Types 
  2168.  3.5.3                         Boolean Types 
  2169.  3.5.4                         Integer Types 
  2170.  3.5.5                         Operations of Discrete Types 
  2171.  3.5.6                         Real Types 
  2172.  3.5.7                         Floating Point Types 
  2173.  3.5.8                         Operations of Floating Point Types 
  2174.  3.5.9                         Fixed Point Types 
  2175.  3.5.10                        Operations of Fixed Point Types 
  2176.  3.6                           Array Types 
  2177.  3.6.1                         Index Constraints and Discrete Ranges 
  2178.  3.6.2                         Operations of Array Types 
  2179.  3.6.3                         String Types 
  2180.  3.7                           Discriminants 
  2181.  3.7.1                         Discriminant Constraints 
  2182.  3.7.2                         Operations of Discriminated Types 
  2183.  3.8                           Record Types 
  2184.  3.8.1                         Variant Parts and Discrete Choices 
  2185.  3.9                           Tagged Types and Type Extensions 
  2186.  3.9.1                         Type Extensions 
  2187.  3.9.2                         Dispatching Operations of Tagged Types 
  2188.  3.9.3                         Abstract Types and Subprograms 
  2189.  3.10                          Access Types 
  2190.  3.10.1                        Incomplete Type Declarations 
  2191.  3.10.2                        Operations of Access Types 
  2192.  3.11                          Declarative Parts 
  2193.  3.11.1                        Completions of Declarations 
  2194.  
  2195.  
  2196. ΓòÉΓòÉΓòÉ 6.1. Declarations ΓòÉΓòÉΓòÉ
  2197.  
  2198.    1. The language defines several kinds of named entities that are declared by 
  2199.       declarations. The entity's name is defined by the declaration, usually by 
  2200.       a defining_identifier, but sometimes by a defining_character_literal or 
  2201.       defining_operator_symbol. 
  2202.  
  2203.    2. There are several forms of declaration. A basic_declaration is a form of 
  2204.       declaration defined as follows. 
  2205.  
  2206.             Syntax
  2207.  
  2208.          3.
  2209.  
  2210.                       basic_declaration ::=
  2211.                          type_declaration     | subtype_declaration
  2212.                         | object_declaration    | number_declaration
  2213.                         | subprogram_declaration  | abstract_subprogram_declaration
  2214.                         | package_declaration    | renaming_declaration
  2215.                         | exception_declaration   | generic_declaration
  2216.                         | generic_instantiation
  2217.  
  2218.          4.
  2219.  
  2220.                       defining_identifier ::= identifier
  2221.  
  2222.   Static Semantics
  2223.  
  2224.    5. A declaration is a language construct that associates a name with (a view 
  2225.       of) an entity. A declaration may appear explicitly in the program text 
  2226.       (an explicit declaration), or may be supposed to occur at a given place 
  2227.       in the text as a consequence of the semantics of another construct (an 
  2228.       implicit declaration). 
  2229.  
  2230.    6. Each of the following is defined to be a declaration: any 
  2231.       basic_declaration; an enumeration_literal_specification; a 
  2232.       discriminant_specification; a component_declaration; a 
  2233.       loop_parameter_specification; a parameter_specification; a 
  2234.       subprogram_body; an entry_declaration; an entry_index_specification; a 
  2235.       choice_parameter_specification; a generic_formal_parameter_declaration. 
  2236.  
  2237.    7. All declarations contain a definition for a view of an entity. A view 
  2238.       consists of an identification of the entity (the entity of the view), 
  2239.       plus view-specific characteristics that affect the use of the entity 
  2240.       through that view (such as mode of access to an object, formal parameter 
  2241.       names and defaults for a subprogram, or visibility to components of a 
  2242.       type). In most cases, a declaration also contains the definition for the 
  2243.       entity itself (a renaming_declaration is an example of a declaration that 
  2244.       does not define a new entity, but instead defines a view of an existing 
  2245.       entity, see 8.5.) 
  2246.  
  2247.    8. For each declaration, the language rules define a certain region of text 
  2248.       called the scope of the declaration (see 8.2). Most declarations 
  2249.       associate an identifier with a declared entity. Within its scope, and 
  2250.       only there, there are places where it is possible to use the identifier 
  2251.       to refer to the declaration, the view it defines, and the associated 
  2252.       entity; these places are defined by the visibility rules (see 8.3). At 
  2253.       such places the identifier is said to be a name of the entity (the 
  2254.       direct_name or selector_name); the name is said to denote the 
  2255.       declaration, the view, and the associated entity (see 8.6). The 
  2256.       declaration is said to declare the name, the view, and in most cases, the 
  2257.       entity itself. 
  2258.  
  2259.    9. As an alternative to an identifier, an enumeration literal can be 
  2260.       declared with a character_literal as its name (see 3.5.1) and a function 
  2261.       can be declared with an operator_symbol as its name (see 6.1). 
  2262.  
  2263.   10. The syntax rules use the terms defining_identifier, 
  2264.       defining_character_literal, and defining_operator_symbol for the defining 
  2265.       occurrence of a name; these are collectively called defining names. The 
  2266.       terms direct_name and selector_name are used for usage occurrences of 
  2267.       identifiers, character_literals, and operator_symbols. These are 
  2268.       collectively called usage names. 
  2269.  
  2270.             Dynamic Semantics
  2271.  
  2272.   11. The process by which a construct achieves its run-time effect is called 
  2273.       execution. This process is also called elaboration for declarations and 
  2274.       evaluation for expressions. One of the terms execution, elaboration, or 
  2275.       evaluation is defined by this International Standard for each construct 
  2276.       that has a run-time effect. 
  2277.  
  2278.       NOTES 
  2279.  
  2280.   12. (1) At compile time, the declaration of an entity declares the entity. At 
  2281.       run time, the elaboration of the declaration creates the entity. 
  2282.  
  2283.  
  2284. ΓòÉΓòÉΓòÉ 6.2. Types and Subtypes ΓòÉΓòÉΓòÉ
  2285.  
  2286.  
  2287.   Static Semantics
  2288.  
  2289.    1. A type is characterized by a set of values, and a set of primitive 
  2290.       operations which implement the fundamental aspects of its semantics. An 
  2291.       object of a given type is a run-time entity that contains (has) a value 
  2292.       of the type. 
  2293.  
  2294.    2. Types are grouped into classes of types, reflecting the similarity of 
  2295.       their values and primitive operations. There exist several 
  2296.       language-defined classes of types (see NOTES below). Elementary types are 
  2297.       those whose values are logically indivisible; composite types are those 
  2298.       whose values are composed of component values. 
  2299.  
  2300.    3. The elementary types are the scalar types (discrete and real) and the 
  2301.       access types (whose values provide access to objects or subprograms). 
  2302.       Discrete types are either integer types or are defined by enumeration of 
  2303.       their values (enumeration types). Real types are either floating point 
  2304.       types or fixed point types. 
  2305.  
  2306.    4. The composite types are the record types, record extensions, array types, 
  2307.       task types, and protected types. A private type or private extension 
  2308.       represents a partial view, see 7.3, of a type, providing support for data 
  2309.       abstraction. A partial view is a composite type. 
  2310.  
  2311.    5. Certain composite types (and partial views thereof) have special 
  2312.       components called discriminants whose values affect the presence, 
  2313.       constraints, or initialization of other components. Discriminants can be 
  2314.       thought of as parameters of the type. 
  2315.  
  2316.    6. The term subcomponent is used in this International Standard in place of 
  2317.       the term component to indicate either a component, or a component of 
  2318.       another subcomponent. Where other subcomponents are excluded, the term 
  2319.       component is used instead. Similarly, a part of an object or value is 
  2320.       used to mean the whole object or value, or any set of its subcomponents. 
  2321.  
  2322.    7. The set of possible values for an object of a given type can be subjected 
  2323.       to a condition that is called a constraint (the case of a null constraint 
  2324.       that specifies no restriction is also included); the rules for which 
  2325.       values satisfy a given kind of constraint are given in 3.5 for 
  2326.       range_constraints, 3.6.1, for index_constraints, and 3.7.1, for 
  2327.       discriminant_constraints. 
  2328.  
  2329.    8. A subtype of a given type is a combination of the type, a constraint on 
  2330.       values of the type, and certain attributes specific to the subtype. The 
  2331.       given type is called the type of the subtype. Similarly, the associated 
  2332.       constraint is called the constraint of the subtype. The set of values of 
  2333.       a subtype consists of the values of its type that satisfy its constraint. 
  2334.       Such values belong to the subtype. 
  2335.  
  2336.    9. A subtype is called an unconstrained subtype if its type has unknown 
  2337.       discriminants, or if its type allows range, index, or discriminant 
  2338.       constraints, but the subtype does not impose such a constraint; 
  2339.       otherwise, the subtype is called a constrained subtype (since it has no 
  2340.       unconstrained characteristics). 
  2341.  
  2342.       NOTES 
  2343.  
  2344.   10. (2) Any set of types that is closed under derivation (see 3.4) can be 
  2345.       called a ``class'' of types. However, only certain classes are used in 
  2346.       the description of the rules of the language -- generally those that have 
  2347.       their own particular set of primitive operations (see 3.2.3) or that 
  2348.       correspond to a set of types that are matched by a given kind of generic 
  2349.       formal type (see 12.5). The following are examples of ``interesting'' 
  2350.       language-defined classes: elementary, scalar, discrete, enumeration, 
  2351.       character, boolean, integer, signed integer, modular, real, floating 
  2352.       point, fixed point, ordinary fixed point, decimal fixed point, numeric, 
  2353.       access, access-to-object, access-to-subprogram, composite, array, string, 
  2354.       (untagged) record, tagged, task, protected, nonlimited. Special syntax is 
  2355.       provided to define types in each of these classes. 
  2356.  
  2357.         a. These language-defined classes are organized like this: 
  2358.  
  2359.                    b.
  2360.  
  2361.                       all types
  2362.                         elementary
  2363.                          scalar
  2364.                            discrete
  2365.                             enumeration
  2366.                               character
  2367.                               boolean
  2368.                               other enumeration
  2369.                             integer
  2370.                               signed integer
  2371.                               modular integer
  2372.                            real
  2373.                             floating point
  2374.                             fixed point
  2375.                               ordinary fixed point
  2376.                               decimal fixed point
  2377.                          access
  2378.                            access-to-object
  2379.                            access-to-subprogram
  2380.                         composite
  2381.                          array
  2382.                            string
  2383.                            other array
  2384.                          untagged record
  2385.                          tagged
  2386.                          task
  2387.                          protected
  2388.  
  2389.         c. The classes ``numeric'' and ``nonlimited'' represent other 
  2390.            classification dimensions and do not fit into the above strictly 
  2391.            hierarchical picture. 
  2392.  
  2393.  3.2.1                         Type Declarations 
  2394.  3.2.2                         Subtype Declarations 
  2395.  3.2.3                         Classification of Operations 
  2396.  
  2397.  
  2398. ΓòÉΓòÉΓòÉ 6.2.1. Type Declarations ΓòÉΓòÉΓòÉ
  2399.  
  2400.    1. A type_declaration declares a type and its first subtype. 
  2401.  
  2402.             Syntax
  2403.  
  2404.          2.
  2405.  
  2406.                       type_declaration ::=
  2407.                          full_type_declaration
  2408.                         | incomplete_type_declaration
  2409.                         | private_type_declaration
  2410.                         | private_extension_declaration
  2411.  
  2412.          3.
  2413.  
  2414.                       full_type_declaration ::=
  2415.                          type defining_identifier [known_discriminant_part]
  2416.                           is type_definition;
  2417.                         | task_type_declaration
  2418.                         | protected_type_declaration
  2419.  
  2420.          4.
  2421.  
  2422.                       type_definition ::=
  2423.                          enumeration_type_definition | integer_type_definition
  2424.                         | real_type_definition     | array_type_definition
  2425.                         | record_type_definition    | access_type_definition
  2426.                         | derived_type_definition
  2427.  
  2428.   Legality Rules
  2429.  
  2430.    5. A given type shall not have a subcomponent whose type is the given type 
  2431.       itself. 
  2432.  
  2433.             Static Semantics
  2434.  
  2435.    6. The defining_identifier of a type_declaration denotes the first subtype 
  2436.       of the type. The known_discriminant_part, if any, defines the 
  2437.       discriminants of the type (see 3.7: ``Discriminants''). The remainder of 
  2438.       the type_ declaration defines the remaining characteristics of (the view 
  2439.       of) the type. 
  2440.  
  2441.    7. A type defined by a type_declaration is a named type; such a type has one 
  2442.       or more nameable subtypes. Certain other forms of declaration also 
  2443.       include type definitions as part of the declaration for an object 
  2444.       (including a parameter or a discriminant). The type defined by such a 
  2445.       declaration is anonymous -- it has no nameable subtypes. For explanatory 
  2446.       purposes, this International Standard sometimes refers to an anonymous 
  2447.       type by a pseudo-name, written in italics, and uses such pseudo-names at 
  2448.       places where the syntax normally requires an identifier. For a named type 
  2449.       whose first subtype is T, this International Standard sometimes refers to 
  2450.       the type of T as simply ``the type T.'' 
  2451.  
  2452.    8. A named type that is declared by a full_type_declaration, or an anonymous 
  2453.       type that is defined as part of declaring an object of the type, is 
  2454.       called a full type. The type_definition, task_definition, 
  2455.       protected_definition, or access_definition that defines a full type is 
  2456.       called a full type definition. Types declared by other forms of 
  2457.       type_declaration are not separate types; they are partial or incomplete 
  2458.       views of some full type. 
  2459.  
  2460.    9. The definition of a type implicitly declares certain predefined operators 
  2461.       that operate on the type, according to what classes the type belongs, as 
  2462.       specified in 4.5: ``Operators and Expression Evaluation''. 
  2463.  
  2464.   10. The predefined types (for example the types Boolean, Wide_Character, 
  2465.       Integer, root_integer, and universal_integer) are the types that are 
  2466.       defined in a predefined library package called Standard; this package 
  2467.       also includes the (implicit) declarations of their predefined operators. 
  2468.       The package Standard is described in A.1. 
  2469.  
  2470.             Dynamic Semantics
  2471.  
  2472.   11. The elaboration of a full_type_declaration consists of the elaboration of 
  2473.       the full type definition. Each elaboration of a full type definition 
  2474.       creates a distinct type and its first subtype. 
  2475.  
  2476.             Examples
  2477.  
  2478.   12. Examples of type definitions: 
  2479.  
  2480.         13.
  2481.  
  2482.                       (White, Red, Yellow, Green, Blue, Brown, Black)
  2483.                       range 1 ┬╖┬╖ 72
  2484.                       array(1 ┬╖┬╖ 10) of Integer
  2485.  
  2486.   14. Examples of type declarations: 
  2487.  
  2488.         15.
  2489.  
  2490.                       type Color  is (White, Red, Yellow, Green, Blue, Brown, Black);
  2491.                       type Column is range 1 ┬╖┬╖ 72;
  2492.                       type Table  is array(1 ┬╖┬╖ 10) of Integer;
  2493.  
  2494.  NOTES 
  2495.  
  2496.   16. (3) Each of the above examples declares a named type. The identifier 
  2497.       given denotes the first subtype of the type. Other named subtypes of the 
  2498.       type can be declared with subtype_declarations (see 3.2.2). Although 
  2499.       names do not directly denote types, a phrase like ``the type Column'' is 
  2500.       sometimes used in this International Standard to refer to the type of 
  2501.       Column, where Column denotes the first subtype of the type. For an 
  2502.       example of the definition of an anonymous type, see the declaration of 
  2503.       the array Color_Table in 3.3.1, its type is anonymous -- it has no 
  2504.       nameable subtypes. 
  2505.  
  2506.  
  2507. ΓòÉΓòÉΓòÉ 6.2.2. Subtype Declarations ΓòÉΓòÉΓòÉ
  2508.  
  2509.    1. A subtype_declaration declares a subtype of some previously declared 
  2510.       type, as defined by a subtype_indication. 
  2511.  
  2512.             Syntax
  2513.  
  2514.          2.
  2515.  
  2516.                       subtype_declaration ::=
  2517.                         subtype defining_identifier is subtype_indication;
  2518.  
  2519.          3.
  2520.  
  2521.                       subtype_indication ::=  subtype_mark [constraint]
  2522.  
  2523.          4.
  2524.  
  2525.                       subtype_mark ::= subtype_name
  2526.  
  2527.          5.
  2528.  
  2529.                       constraint ::= scalar_constraint | composite_constraint
  2530.  
  2531.          6.
  2532.  
  2533.                       scalar_constraint ::=
  2534.                         range_constraint | digits_constraint | delta_constraint
  2535.  
  2536.          7.
  2537.  
  2538.                       composite_constraint ::=
  2539.                         index_constraint | discriminant_constraint
  2540.  
  2541.   Name Resolution Rules
  2542.  
  2543.    8. A subtype_mark shall resolve to denote a subtype. The type determined by 
  2544.       a subtype_mark is the type of the subtype denoted by the subtype_mark. 
  2545.  
  2546.             Dynamic Semantics
  2547.  
  2548.    9. The elaboration of a subtype_declaration consists of the elaboration of 
  2549.       the subtype_indication. The elaboration of a subtype_indication creates a 
  2550.       new subtype. If the subtype_indication does not include a constraint, the 
  2551.       new subtype has the same (possibly null) constraint as that denoted by 
  2552.       the subtype_mark. The elaboration of a subtype_indication that includes a 
  2553.       constraint proceeds as follows: 
  2554.  
  2555.         a. The constraint is first elaborated. 
  2556.  
  2557.         b. A check is then made that the constraint is compatible with the 
  2558.            subtype denoted by the subtype_mark. 
  2559.  
  2560.    1. The condition imposed by a constraint is the condition obtained after 
  2561.       elaboration of the constraint. The rules defining compatibility are given 
  2562.       for each form of constraint in the appropriate subclause. These rules are 
  2563.       such that if a constraint is compatible with a subtype, then the 
  2564.       condition imposed by the constraint cannot contradict any condition 
  2565.       already imposed by the subtype on its values. The exception 
  2566.       Constraint_Error is raised if any check of compatibility fails. 
  2567.  
  2568.       NOTES 
  2569.  
  2570.    2. (4) A scalar_constraint may be applied to a subtype of an appropriate 
  2571.       scalar type, see 3.5, see 3.5.9, and J.3, even if the subtype is already 
  2572.       constrained. On the other hand, a composite_constraint may be applied to 
  2573.       a composite subtype (or an access-to-composite subtype) only if the 
  2574.       composite subtype is unconstrained, see 3.6.1 and 3.7.1. 
  2575.  
  2576.             Examples
  2577.  
  2578.    3. Examples of subtype declarations: 
  2579.  
  2580.          4.
  2581.  
  2582.                       subtype Rainbow  is Color range Red ┬╖┬╖ Blue;  -- see 3.2.1
  2583.                       subtype Red_Blue  is Rainbow;
  2584.                       subtype Int    is Integer;
  2585.                       subtype Small_Int is Integer range -10 ┬╖┬╖ 10;
  2586.                       subtype Up_To_K  is Column range 1 ┬╖┬╖ K;    -- see 3.2.1
  2587.                       subtype Square   is Matrix(1 ┬╖┬╖ 10, 1 ┬╖┬╖ 10); -- see 3.6
  2588.                       subtype Male    is Person(Sex => M);     -- see 3.10.1
  2589.  
  2590.  
  2591. ΓòÉΓòÉΓòÉ 6.2.3. Classification of Operations ΓòÉΓòÉΓòÉ
  2592.  
  2593.  
  2594.   Static Semantics
  2595.  
  2596.    1. An operation operates on a type T if it yields a value of type T, if it 
  2597.       has an operand whose expected type, see 8.6, is T, or if it has an access 
  2598.       parameter, see 6.1 designating T. A predefined operator, or other 
  2599.       language-defined operation such as assignment or a membership test, that 
  2600.       operates on a type, is called a predefined operation of the type. The 
  2601.       primitive operations of a type are the predefined operations of the type, 
  2602.       plus any user-defined primitive subprograms. 
  2603.  
  2604.    2. The primitive subprograms of a specific type are defined as follows: 
  2605.  
  2606.         a. The predefined operators of the type, see 4.5, 
  2607.  
  2608.         b. For a derived type, the inherited, see 3.4, user-defined 
  2609.            subprograms; 
  2610.  
  2611.         c. For an enumeration type, the enumeration literals (which are 
  2612.            considered parameterless functions --  see 3.5.1.); 
  2613.  
  2614.         d. For a specific type declared immediately within a 
  2615.            package_specification, any subprograms (in addition to the 
  2616.            enumeration literals) that are explicitly declared immediately 
  2617.            within the same package_specification and that operate on the type; 
  2618.  
  2619.         e. Any subprograms not covered above that are explicitly declared 
  2620.            immediately within the same declarative region as the type and that 
  2621.            override, see 8.3, other implicitly declared primitive subprograms 
  2622.            of the type. 
  2623.  
  2624.    1. A primitive subprogram whose designator is an operator_symbol is called a 
  2625.       primitive operator. 
  2626.  
  2627.  
  2628. ΓòÉΓòÉΓòÉ 6.3. Objects and Named Numbers ΓòÉΓòÉΓòÉ
  2629.  
  2630.    1. Objects are created at run time and contain a value of a given type. An 
  2631.       object can be created and initialized as part of elaborating a 
  2632.       declaration, evaluating an allocator, aggregate, or function_call, or 
  2633.       passing a parameter by copy. Prior to reclaiming the storage for an 
  2634.       object, it is finalized if necessary, see 7.6.1. 
  2635.  
  2636.             Static Semantics
  2637.  
  2638.    2. All of the following are objects: 
  2639.  
  2640.         a. the entity declared by an object_declaration; 
  2641.  
  2642.         b. a formal parameter of a subprogram, entry, or generic subprogram; 
  2643.  
  2644.         c. a generic formal object; 
  2645.  
  2646.         d. a loop parameter; 
  2647.  
  2648.         e. a choice parameter of an exception_handler; 
  2649.  
  2650.         f. an entry index of an entry_body; 
  2651.  
  2652.         g. the result of dereferencing an access-to-object value, see 4.1, 
  2653.  
  2654.         h. the result of evaluating a function_call (or the equivalent operator 
  2655.            invocation --  see 6.6, 
  2656.  
  2657.         i. the result of evaluating an aggregate; 
  2658.  
  2659.         j. a component, slice, or view conversion of another object. 
  2660.  
  2661.    1. An object is either a constant object or a variable object. The value of 
  2662.       a constant object cannot be changed between its initialization and its 
  2663.       finalization, whereas the value of a variable object can be changed. 
  2664.       Similarly, a view of an object is either a constant or a variable. All 
  2665.       views of a constant object are constant. A constant view of a variable 
  2666.       object cannot be used to modify the value of the variable. The terms 
  2667.       constant and variable by themselves refer to constant and variable views 
  2668.       of objects. 
  2669.  
  2670.    2. The value of an object is read when the value of any part of the object 
  2671.       is evaluated, or when the value of an enclosing object is evaluated. The 
  2672.       value of a variable is updated when an assignment is performed to any 
  2673.       part of the variable, or when an assignment is performed to an enclosing 
  2674.       object. 
  2675.  
  2676.    3. Whether a view of an object is constant or variable is determined by the 
  2677.       definition of the view. The following (and no others) represent 
  2678.       constants: 
  2679.  
  2680.         a. an object declared by an object_declaration with the reserved word 
  2681.            constant; 
  2682.  
  2683.         b. a formal parameter or generic formal object of mode in; 
  2684.  
  2685.         c. a discriminant; 
  2686.  
  2687.         d. a loop parameter, choice parameter, or entry index; 
  2688.  
  2689.         e. the dereference of an access-to-constant value; 
  2690.  
  2691.         f. he result of evaluating a function_call or an aggregate; 
  2692.  
  2693.         g. a selected_component, indexed_component, slice, or view conversion 
  2694.            of a constant. 
  2695.  
  2696.    1. At the place where a view of an object is defined, a nominal subtype is 
  2697.       associated with the view. The object's actual subtype (that is, its 
  2698.       subtype) can be more restrictive than the nominal subtype of the view; it 
  2699.       always is if the nominal subtype is an indefinite subtype. A subtype is 
  2700.       an indefinite subtype if it is an unconstrained array subtype, or if it 
  2701.       has unknown discriminants or unconstrained discriminants without defaults 
  2702.       (see 3.7) otherwise the subtype is a definite subtype (all elementary 
  2703.       subtypes are definite subtypes). A class-wide subtype is defined to have 
  2704.       unknown discriminants, and is therefore an indefinite subtype. An 
  2705.       indefinite subtype does not by itself provide enough information to 
  2706.       create an object; an additional constraint or explicit initialization 
  2707.       expression is necessary (see 3.3.1). A component cannot have an 
  2708.       indefinite nominal subtype. 
  2709.  
  2710.    2. A named number provides a name for a numeric value known at compile time. 
  2711.       It is declared by a number_declaration. 
  2712.  
  2713.       NOTES 
  2714.  
  2715.    3. (5) A constant cannot be the target of an assignment operation, nor be 
  2716.       passed as an in out or out parameter, between its initialization and 
  2717.       finalization, if any. 
  2718.  
  2719.    4. (6) The nominal and actual subtypes of an elementary object are always 
  2720.       the same. For a discriminated or array object, if the nominal subtype is 
  2721.       constrained then so is the actual subtype. 
  2722.  
  2723.  3.3.1                         Object Declarations 
  2724.  3.3.2                         Number Declarations 
  2725.  
  2726.  
  2727. ΓòÉΓòÉΓòÉ 6.3.1. Object Declarations ΓòÉΓòÉΓòÉ
  2728.  
  2729.    1. An object_declaration declares a stand-alone object with a given nominal 
  2730.       subtype and, optionally, an explicit initial value given by an 
  2731.       initialization expression. For an array, task, or protected object, the 
  2732.       object_declaration may include the definition of the (anonymous) type of 
  2733.       the object. 
  2734.  
  2735.             Syntax
  2736.  
  2737.          2.
  2738.  
  2739.                       object_declaration ::=
  2740.                         defining_identifier_list : [aliased] [constant]
  2741.                          subtype_indication [:= expression];
  2742.                        | defining_identifier_list : [aliased] [constant]
  2743.                          array_type_definition [:= expression];
  2744.                        | single_task_declaration
  2745.                        | single_protected_declaration
  2746.  
  2747.          3.
  2748.  
  2749.                       defining_identifier_list ::=
  2750.                         defining_identifier {, defining_identifier}
  2751.  
  2752.   Name Resolution Rules
  2753.  
  2754.    4. For an object_declaration with an expression following the compound 
  2755.       delimiter :=, the type expected for the expression is that of the object. 
  2756.       This expression is called the initialization expression. 
  2757.  
  2758.             Legality Rules
  2759.  
  2760.    5. An object_declaration without the reserved word constant declares a 
  2761.       variable object. If it has a subtype_indication or an 
  2762.       array_type_definition that defines an indefinite subtype, then there 
  2763.       shall be an initialization expression. An initialization expression shall 
  2764.       not be given if the object is of a limited type. 
  2765.  
  2766.             Static Semantics
  2767.  
  2768.    6. An object_declaration with the reserved word constant declares a constant 
  2769.       object. If it has an initialization expression, then it is called a full 
  2770.       constant declaration. Otherwise it is called a deferred constant 
  2771.       declaration. The rules for deferred constant declarations are given in 
  2772.       clause (see 7.4). The rules for full constant declarations are given in 
  2773.       this subclause. 
  2774.  
  2775.    7. Any declaration that includes a defining_identifier_list with more than 
  2776.       one defining_identifier is equivalent to a series of declarations each 
  2777.       containing one defining_identifier from the list, with the rest of the 
  2778.       text of the declaration copied for each declaration in the series, in the 
  2779.       same order as the list. The remainder of this International Standard 
  2780.       relies on this equivalence; explanations are given for declarations with 
  2781.       a single defining_identifier. 
  2782.  
  2783.    8. The subtype_indication or full type definition of an object_declaration 
  2784.       defines the nominal subtype of the object. The object_declaration 
  2785.       declares an object of the type of the nominal subtype. 
  2786.  
  2787.             Dynamic Semantics
  2788.  
  2789.    9. If a composite object declared by an object_declaration has an 
  2790.       unconstrained nominal subtype, then if this subtype is indefinite or the 
  2791.       object is constant or aliased, see 3.10, the actual subtype of this 
  2792.       object is constrained. The constraint is determined by the bounds or 
  2793.       discriminants (if any) of its initial value; the object is said to be 
  2794.       constrained by its initial value. In the case of an aliased object, this 
  2795.       initial value may be either explicit or implicit; in the other cases, an 
  2796.       explicit initial value is required. When not constrained by its initial 
  2797.       value, the actual and nominal subtypes of the object are the same. If its 
  2798.       actual subtype is constrained, the object is called a constrained object. 
  2799.  
  2800.   10. For an object_declaration without an initialization expression, any 
  2801.       initial values for the object or its subcomponents are determined by the 
  2802.       implicit initial values defined for its nominal subtype, as follows: 
  2803.  
  2804.         a. The implicit initial value for an access subtype is the null value 
  2805.            of the access type. 
  2806.  
  2807.         b. The implicit initial (and only) value for each discriminant of a 
  2808.            constrained discriminated subtype is defined by the subtype. 
  2809.  
  2810.         c. For a (definite) composite subtype, the implicit initial value of 
  2811.            each component with a default_expression is obtained by evaluation 
  2812.            of this expression and conversion to the component's nominal subtype 
  2813.            (which might raise Constraint_Error --  see 4.6: ``Type 
  2814.            Conversions''.), unless the component is a discriminant of a 
  2815.            constrained subtype (the previous case), or is in an excluded 
  2816.            variant, see 3.8.1. For each component that does not have a 
  2817.            default_expression, any implicit initial values are those determined 
  2818.            by the component's nominal subtype. 
  2819.  
  2820.         d. For a protected or task subtype, there is an implicit component (an 
  2821.            entry queue) corresponding to each entry, with its implicit initial 
  2822.            value being an empty queue. 
  2823.  
  2824.    1. The elaboration of an object_declaration proceeds in the following 
  2825.       sequence of steps: 
  2826.  
  2827.         a. The subtype_indication, array_type_definition, 
  2828.            single_task_declaration, or single_protected_declaration is first 
  2829.            elaborated. This creates the nominal subtype (and the anonymous type 
  2830.            in the latter three cases). 
  2831.  
  2832.         b. If the object_declaration includes an initialization expression, the 
  2833.            (explicit) initial value is obtained by evaluating the expression 
  2834.            and converting it to the nominal subtype (which might raise 
  2835.            Constraint_Error --  see 4.6.). 
  2836.  
  2837.         c. The object is created, and, if there is not an initialization 
  2838.            expression, any per-object expressions, see 3.8 are evaluated and 
  2839.            any implicit initial values for the object or for its subcomponents 
  2840.            are obtained as determined by the nominal subtype. 
  2841.  
  2842.         d. Any initial values (whether explicit or implicit) are assigned to 
  2843.            the object or to the corresponding subcomponents. As described in 
  2844.            5.2, and 7.6, Initialize and Adjust procedures can be called. 
  2845.  
  2846.    1. For the third step above, the object creation and any elaborations and 
  2847.       evaluations are performed in an arbitrary order, except that if the 
  2848.       default_expression for a discriminant is evaluated to obtain its initial 
  2849.       value, then this evaluation is performed before that of the 
  2850.       default_expression for any component that depends on the discriminant, 
  2851.       and also before that of any default_expression that includes the name of 
  2852.       the discriminant. The evaluations of the third step and the assignments 
  2853.       of the fourth step are performed in an arbitrary order, except that each 
  2854.       evaluation is performed before the resulting value is assigned. 
  2855.  
  2856.    2. There is no implicit initial value defined for a scalar subtype. In the 
  2857.       absence of an explicit initialization, a newly created scalar object 
  2858.       might have a value that does not belong to its subtype (see 13.9.1 and 
  2859.       H.1). 
  2860.  
  2861.       NOTES 
  2862.  
  2863.    3. (7) Implicit initial values are not defined for an indefinite subtype, 
  2864.       because if an object's nominal subtype is indefinite, an explicit initial 
  2865.       value is required. 
  2866.  
  2867.    4. (8) As indicated above, a stand-alone object is an object declared by an 
  2868.       object_declaration. Similar definitions apply to ``stand-alone constant'' 
  2869.       and ``stand-alone variable.'' A subcomponent of an object is not a 
  2870.       stand-alone object, nor is an object that is created by an allocator. An 
  2871.       object declared by a loop_parameter_specification, 
  2872.       parameter_specification, entry_index_specification, 
  2873.       choice_parameter_specification, or a formal_object_declaration is not 
  2874.       called a stand-alone object. 
  2875.  
  2876.    5. (9) The type of a stand-alone object cannot be abstract, see 3.9.3. 
  2877.  
  2878.             Examples
  2879.  
  2880.    6. Example of a multiple object declaration: 
  2881.  
  2882.          7.
  2883.  
  2884.                       --  the multiple object declaration
  2885.  
  2886.          8.
  2887.  
  2888.                       John, Paul : Person_Name := new Person(Sex => M); --  see 3.10.1
  2889.  
  2890.          9.
  2891.  
  2892.                       --  is equivalent to the two single object
  2893.                       --  declarations in the order given
  2894.  
  2895.         10.
  2896.  
  2897.                       John : Person_Name := new Person(Sex => M);
  2898.                       Paul : Person_Name := new Person(Sex => M);
  2899.  
  2900.   11. Examples of variable declarations: 
  2901.  
  2902.         12.
  2903.  
  2904.                       Count, Sum  : Integer;
  2905.                       Size     : Integer range 0 ┬╖┬╖ 10_000 := 0;
  2906.                       Sorted    : Boolean := False;
  2907.                       Color_Table : array(1 ┬╖┬╖ Max) of Color;
  2908.                       Option    : Bit_Vector(1 ┬╖┬╖ 10) := (others => True);
  2909.                       Hello    : constant String := "Hi, world.";
  2910.  
  2911.   13. Examples of constant declarations: 
  2912.  
  2913.         14.
  2914.  
  2915.                       Limit   : constant Integer := 10_000;
  2916.                       Low_Limit : constant Integer := Limit/10;
  2917.                       Tolerance : constant Real := Dispersion(1.15);
  2918.  
  2919.  
  2920. ΓòÉΓòÉΓòÉ 6.3.2. Number Declarations ΓòÉΓòÉΓòÉ
  2921.  
  2922.    1. A number_declaration declares a named number. 
  2923.  
  2924.             Syntax
  2925.  
  2926.          2.
  2927.  
  2928.                       number_declaration ::=
  2929.                         defining_identifier_list : constant := static_expression;
  2930.  
  2931.   Name Resolution Rules
  2932.  
  2933.    3. The static_expression given for a number_declaration is expected to be of 
  2934.       any numeric type. 
  2935.  
  2936.             Legality Rules
  2937.  
  2938.    4. The static_expression given for a number declaration shall be a static 
  2939.       expression, as defined by clause (see 4.9). 
  2940.  
  2941.             Static Semantics
  2942.  
  2943.    5. The named number denotes a value of type universal_integer if the type of 
  2944.       the static_expression is an integer type. The named number denotes a 
  2945.       value of type universal_real if the type of the static_expression is a 
  2946.       real type. 
  2947.  
  2948.    6. The value denoted by the named number is the value of the 
  2949.       static_expression, converted to the corresponding universal type. 
  2950.  
  2951.             Dynamic Semantics
  2952.  
  2953.    7. The elaboration of a number_declaration has no effect. 
  2954.  
  2955.             Examples
  2956.  
  2957.    8. Examples of number declarations: 
  2958.  
  2959.          9.
  2960.  
  2961.                       Two_Pi     : constant := 2.0*Ada.Numerics.Pi;
  2962.                       -- a real number, see A.5
  2963.  
  2964.         10.
  2965.  
  2966.                       Max      : constant := 500;   -- an integer number
  2967.                       Max_Line_Size : constant := Max/6;  -- the integer 83
  2968.                       Power_16    : constant := 2**16;  -- the integer 65_536
  2969.                       One, Un, Eins : constant := 1;    -- three different names for 1
  2970.  
  2971.  
  2972. ΓòÉΓòÉΓòÉ 6.4. Derived Types and Classes ΓòÉΓòÉΓòÉ
  2973.  
  2974.    1. A derived_type_definition defines a new type (and its first subtype) 
  2975.       whose characteristics are derived from those of a parent type. 
  2976.  
  2977.             Syntax
  2978.  
  2979.          2.
  2980.  
  2981.                       derived_type_definition ::= [abstract] new
  2982.                        parent_subtype_indication [record_extension_part]
  2983.  
  2984.   Legality Rules
  2985.  
  2986.    3. The parent_subtype_indication defines the parent subtype; its type is the 
  2987.       parent type. 
  2988.  
  2989.    4. A type shall be completely defined, see 3.11.1, prior to being specified 
  2990.       as the parent type in a derived_type_definition -- the 
  2991.       full_type_declarations for the parent type and any of its subcomponents 
  2992.       have to precede the derived_type_definition. 
  2993.  
  2994.    5. If there is a record_extension_part, the derived type is called a record 
  2995.       extension of the parent type. A record_extension_part shall be provided 
  2996.       if and only if the parent type is a tagged type. 
  2997.  
  2998.             Static Semantics
  2999.  
  3000.    6. The first subtype of the derived type is unconstrained if a 
  3001.       known_discriminant_part is provided in the declaration of the derived 
  3002.       type, or if the parent subtype is unconstrained. Otherwise, the 
  3003.       constraint of the first subtype corresponds to that of the parent subtype 
  3004.       in the following sense: it is the same as that of the parent subtype 
  3005.       except that for a range constraint (implicit or explicit), the value of 
  3006.       each bound of its range is replaced by the corresponding value of the 
  3007.       derived type. 
  3008.  
  3009.    7. The characteristics of the derived type are defined as follows: 
  3010.  
  3011.         a. Each class of types that includes the parent type also includes the 
  3012.            derived type. 
  3013.  
  3014.         b. If the parent type is an elementary type or an array type, then the 
  3015.            set of possible values of the derived type is a copy of the set of 
  3016.            possible values of the parent type. For a scalar type, the base 
  3017.            range of the derived type is the same as that of the parent type. 
  3018.  
  3019.         c. If the parent type is a composite type other than an array type, 
  3020.            then the components, protected subprograms, and entries that are 
  3021.            declared for the derived type are as follows: 
  3022.  
  3023.              1. The discriminants specified by a new known_discriminant_part, 
  3024.                 if there is one; otherwise, each discriminant of the parent 
  3025.                 type (implicitly declared in the same order with the same 
  3026.                 specifications) -- in the latter case, the discriminants are 
  3027.                 said to be inherited, or if unknown in the parent, are also 
  3028.                 unknown in the derived type; 
  3029.  
  3030.              2. Each nondiscriminant component, entry, and protected subprogram 
  3031.                 of the parent type, implicitly declared in the same order with 
  3032.                 the same declarations; these components, entries, and protected 
  3033.                 subprograms are said to be inherited; 
  3034.  
  3035.              3. Each component declared in a record_extension_part, if any. 
  3036.  
  3037.         a. Declarations of components, protected subprograms, and entries, 
  3038.            whether implicit or explicit, occur immediately within the 
  3039.            declarative region of the type, in the order indicated above, 
  3040.            following the parent subtype_indication. 
  3041.  
  3042.         b. The derived type is limited if and only if the parent type is 
  3043.            limited. 
  3044.  
  3045.         c. For each predefined operator of the parent type, there is a 
  3046.            corresponding predefined operator of the derived type. 
  3047.  
  3048.         d. For each user-defined primitive subprogram (other than a 
  3049.            user-defined equality operator -- see below) of the parent type that 
  3050.            already exists at the place of the derived_type_definition, there 
  3051.            exists a corresponding inherited primitive subprogram of the derived 
  3052.            type with the same defining name. Primitive user-defined equality 
  3053.            operators of the parent type are also inherited by the derived type, 
  3054.            except when the derived type is a nonlimited record extension, and 
  3055.            the inherited operator would have a profile that is type conformant 
  3056.            with the profile of the corresponding predefined equality operator; 
  3057.            in this case, the user-defined equality operator is not inherited, 
  3058.            but is rather incorporated into the implementation of the predefined 
  3059.            equality operator of the record extension, see 4.5.2. 
  3060.  
  3061.         e. The profile of an inherited subprogram (including an inherited 
  3062.            enumeration literal) is obtained from the profile of the 
  3063.            corresponding (user-defined) primitive subprogram of the parent 
  3064.            type, after systematic replacement of each subtype of its profile, 
  3065.            see 6.1, that is of the parent type with a corresponding subtype of 
  3066.            the derived type. For a given subtype of the parent type, the 
  3067.            corresponding subtype of the derived type is defined as follows: 
  3068.  
  3069.              1. If the declaration of the derived type has neither a 
  3070.                 known_discriminant_part nor a record_extension_part, then the 
  3071.                 corresponding subtype has a constraint that corresponds (as 
  3072.                 defined above for the first subtype of the derived type) to 
  3073.                 that of the given subtype. 
  3074.  
  3075.              2. If the derived type is a record extension, then the 
  3076.                 corresponding subtype is the first subtype of the derived type. 
  3077.  
  3078.              3. If the derived type has a new known_discriminant_part but is 
  3079.                 not a record extension, then the corresponding subtype is 
  3080.                 constrained to those values that when converted to the parent 
  3081.                 type belong to the given subtype, see 4.6. 
  3082.  
  3083.         a. The same formal parameters have default_expressions in the profile 
  3084.            of the inherited subprogram. Any type mismatch due to the systematic 
  3085.            replacement of the parent type by the derived type is handled as 
  3086.            part of the normal type conversion associated with parameter passing 
  3087.            -- see 6.4.1. 
  3088.  
  3089.    1. If a primitive subprogram of the parent type is visible at the place of 
  3090.       the derived_type_definition, then the corresponding inherited subprogram 
  3091.       is implicitly declared immediately after the derived_type_definition. 
  3092.       Otherwise, the inherited subprogram is implicitly declared later or not 
  3093.       at all, as explained in 7.3.1. 
  3094.  
  3095.    2. A derived type can also be defined by a private_extension_declaration 
  3096.       (see 7.3) or a formal_derived_type_definition, see 12.5.1. Such a derived 
  3097.       type is a partial view of the corresponding full or actual type. 
  3098.  
  3099.    3. All numeric types are derived types, in that they are implicitly derived 
  3100.       from a corresponding root numeric type (see 3.5.4, and 3.5.6). 
  3101.  
  3102.             Dynamic Semantics
  3103.  
  3104.    4. The elaboration of a derived_type_definition creates the derived type and 
  3105.       its first subtype, and consists of the elaboration of the 
  3106.       subtype_indication and the record_extension_part, if any. If the 
  3107.       subtype_indication depends on a discriminant, then only those expressions 
  3108.       that do not depend on a discriminant are evaluated. 
  3109.  
  3110.    5. For the execution of a call on an inherited subprogram, a call on the 
  3111.       corresponding primitive subprogram of the parent type is performed; the 
  3112.       normal conversion of each actual parameter to the subtype of the 
  3113.       corresponding formal parameter, see 6.4.1 performs any necessary type 
  3114.       conversion as well. If the result type of the inherited subprogram is the 
  3115.       derived type, the result of calling the parent's subprogram is converted 
  3116.       to the derived type. 
  3117.  
  3118.       NOTES 
  3119.  
  3120.    6. (10) Classes are closed under derivation -- any class that contains a 
  3121.       type also contains its derivatives. Operations available for a given 
  3122.       class of types are available for the derived types in that class. 
  3123.  
  3124.    7. (11) Evaluating an inherited enumeration literal is equivalent to 
  3125.       evaluating the corresponding enumeration literal of the parent type, and 
  3126.       then converting the result to the derived type. This follows from their 
  3127.       equivalence to parameterless functions. 
  3128.  
  3129.    8. (12) A generic subprogram is not a subprogram, and hence cannot be a 
  3130.       primitive subprogram and cannot be inherited by a derived type. On the 
  3131.       other hand, an instance of a generic subprogram can be a primitive 
  3132.       subprogram, and hence can be inherited. 
  3133.  
  3134.    9. (13) If the parent type is an access type, then the parent and the 
  3135.       derived type share the same storage pool; there is a null access value 
  3136.       for the derived type and it is the implicit initial value for the type 
  3137.       (see 3.10). 
  3138.  
  3139.   10. (14) If the parent type is a boolean type, the predefined relational 
  3140.       operators of the derived type deliver a result of the predefined type 
  3141.       Boolean, see 4.5.2. If the parent type is an integer type, the right 
  3142.       operand of the predefined exponentiation operator is of the predefined 
  3143.       type Integer, see 4.5.6. 
  3144.  
  3145.   11. (15) Any discriminants of the parent type are either all inherited, or 
  3146.       completely replaced with a new set of discriminants. 
  3147.  
  3148.   12. (16) For an inherited subprogram, the subtype of a formal parameter of 
  3149.       the derived type need not have any value in common with the first subtype 
  3150.       of the derived type. 
  3151.  
  3152.   13. (17) If the reserved word abstract is given in the declaration of a type, 
  3153.       the type is abstract, see 3.9.3. 
  3154.  
  3155.             Examples
  3156.  
  3157.   14. Examples of derived type declarations: 
  3158.  
  3159.         15.
  3160.  
  3161.                       type Local_Coordinate is new Coordinate;  --  two different types
  3162.                       type Midweek is new Day range Tue ┬╖┬╖ Thu;  --  see 3.5.1
  3163.                       type Counter is new Positive;        --  same range as Positive
  3164.  
  3165.         16.
  3166.  
  3167.                       type Special_Key is new Key_Manager.Key;  --  see 7.3.1
  3168.                        -- the inherited subprograms have the following specifications:
  3169.                        --     procedure Get_Key(K : out Special_Key);
  3170.                        --     function "<"(X,Y : Special_Key) return Boolean;
  3171.  
  3172.  3.4.1                         Derivation Classes 
  3173.  
  3174.  
  3175. ΓòÉΓòÉΓòÉ 6.4.1. Derivation Classes ΓòÉΓòÉΓòÉ
  3176.  
  3177.    1. In addition to the various language-defined classes of types, types can 
  3178.       be grouped into derivation classes. 
  3179.  
  3180.             Static Semantics
  3181.  
  3182.    2. A derived type is derived from its parent type directly; it is derived 
  3183.       indirectly from any type from which its parent type is derived. The 
  3184.       derivation class of types for a type T (also called the class rooted at 
  3185.       T) is the set consisting of T (the root type of the class) and all types 
  3186.       derived from T (directly or indirectly) plus any associated universal or 
  3187.       class-wide types (defined below). 
  3188.  
  3189.    3. Every type is either a specific type, a class-wide type, or a universal 
  3190.       type. A specific type is one defined by a type_declaration, a 
  3191.       formal_type_declaration, or a full type definition embedded in a 
  3192.       declaration for an object. Class-wide and universal types are implicitly 
  3193.       defined, to act as representatives for an entire class of types, as 
  3194.       follows: 
  3195.  
  3196.    4. Class-wide types  Class-wide types are defined for (and belong to) each 
  3197.       derivation class rooted at a tagged type, see 3.9. Given a subtype S of a 
  3198.       tagged type T, S'Class is the subtype_mark for a corresponding subtype of 
  3199.       the tagged class-wide type T'Class. Such types are called ``class-wide'' 
  3200.       because when a formal parameter is defined to be of a class-wide type 
  3201.       T'Class, an actual parameter of any type in the derivation class rooted 
  3202.       at T is acceptable, see 8.6. 
  3203.  
  3204.         a. The set of values for a class-wide type T'Class is the discriminated 
  3205.            union of the set of values of each specific type in the derivation 
  3206.            class rooted at T (the tag acts as the implicit discriminant --  see 
  3207.            3.9.). Class-wide types have no primitive subprograms of their own. 
  3208.            However, as explained in 3.9.2, operands of a class-wide type 
  3209.            T'Class can be used as part of a dispatching call on a primitive 
  3210.            subprogram of the type T. The only components (including 
  3211.            discriminants) of T'Class that are visible are those of T. If S is a 
  3212.            first subtype, then S'Class is a first subtype. 
  3213.  
  3214.    1. Universal types  Universal types are defined for (and belong to) the 
  3215.       integer, real, and fixed point classes, and are referred to in this 
  3216.       standard as respectively, universal_integer, universal_real, and 
  3217.       universal_fixed. These are analogous to class-wide types for these 
  3218.       language-defined numeric classes. As with class-wide types, if a formal 
  3219.       parameter is of a universal type, then an actual parameter of any type in 
  3220.       the corresponding class is acceptable. In addition, a value of a 
  3221.       universal type (including an integer or real numeric_literal) is 
  3222.       ``universal'' in that it is acceptable where some particular type in the 
  3223.       class is expected, see 8.6. 
  3224.  
  3225.         a. The set of values of a universal type is the undiscriminated union 
  3226.            of the set of values possible for any definable type in the 
  3227.            associated class. Like class-wide types, universal types have no 
  3228.            primitive subprograms of their own. However, their ``universality'' 
  3229.            allows them to be used as operands with the primitive subprograms of 
  3230.            any type in the corresponding class. 
  3231.  
  3232.    1. The integer and real numeric classes each have a specific root type in 
  3233.       addition to their universal type, named respectively root_integer and 
  3234.       root_real. 
  3235.  
  3236.    2. A class-wide or universal type is said to cover all of the types in its 
  3237.       class. A specific type covers only itself. 
  3238.  
  3239.    3. A specific type T2 is defined to be a descendant of a type T1 if T2 is 
  3240.       the same as T1, or if T2 is derived (directly or indirectly) from T1. A 
  3241.       class-wide type T2'Class is defined to be a descendant of type T1 if T2 
  3242.       is a descendant of T1. Similarly, the universal types are defined to be 
  3243.       descendants of the root types of their classes. If a type T2 is a 
  3244.       descendant of a type T1, then T1 is called an ancestor of T2. The 
  3245.       ultimate ancestor of a type is the ancestor of the type that is not a 
  3246.       descendant of any other type. 
  3247.  
  3248.    4. An inherited component (including an inherited discriminant) of a derived 
  3249.       type is inherited from a given ancestor of the type if the corresponding 
  3250.       component was inherited by each derived type in the chain of derivations 
  3251.       going back to the given ancestor. 
  3252.  
  3253.       NOTES 
  3254.  
  3255.    5. (18) Because operands of a universal type are acceptable to the 
  3256.       predefined operators of any type in their class, ambiguity can result. 
  3257.       For universal_integer and universal_real, this potential ambiguity is 
  3258.       resolved by giving a preference, see 8.6 to the predefined operators of 
  3259.       the corresponding root types (root_integer and root_real, respectively). 
  3260.       Hence, in an apparently ambiguous expression like 
  3261.  
  3262.          6.
  3263.  
  3264.                       1 + 4 < 7
  3265.  
  3266.    7. where each of the literals is of type universal_integer, the predefined 
  3267.       operators of root_integer will be preferred over those of other specific 
  3268.       integer types, thereby resolving the ambiguity. 
  3269.  
  3270.  
  3271. ΓòÉΓòÉΓòÉ 6.5. Scalar Types ΓòÉΓòÉΓòÉ
  3272.  
  3273.    1. Scalar types comprise enumeration types, integer types, and real types. 
  3274.       Enumeration types and integer types are called discrete types; each value 
  3275.       of a discrete type has a position number which is an integer value. 
  3276.       Integer types and real types are called numeric types. All scalar types 
  3277.       are ordered, that is, all relational operators are predefined for their 
  3278.       values. 
  3279.  
  3280.             Syntax
  3281.  
  3282.          2.
  3283.  
  3284.                       range_constraint ::= range range
  3285.  
  3286.          3.
  3287.  
  3288.                       range ::=
  3289.                          range_attribute_reference
  3290.                         | simple_expression ┬╖┬╖ simple_expression
  3291.  
  3292.    4. A range has a lower bound and an upper bound and specifies a subset of 
  3293.       the values of some scalar type (the type of the range). A range with 
  3294.       lower bound L and upper bound R is described by ``L ┬╖┬╖ R''. If R is less 
  3295.       than L, then the range is a null range, and specifies an empty set of 
  3296.       values. Otherwise, the range specifies the values of the type from the 
  3297.       lower bound to the upper bound, inclusive. A value belongs to a range if 
  3298.       it is of the type of the range, and is in the subset of values specified 
  3299.       by the range. A value satisfies a range constraint if it belongs to the 
  3300.       associated range. One range is included in another if all values that 
  3301.       belong to the first range also belong to the second. 
  3302.  
  3303.             Name Resolution Rules
  3304.  
  3305.    5. For a subtype_indication containing a range_constraint, either directly 
  3306.       or as part of some other scalar_constraint, the type of the range shall 
  3307.       resolve to that of the type determined by the subtype_mark of the 
  3308.       subtype_indication. For a range of a given type, the simple_expressions 
  3309.       of the range (likewise, the simple_expressions of the equivalent range 
  3310.       for a range_attribute_reference) are expected to be of the type of the 
  3311.       range. 
  3312.  
  3313.             Static Semantics
  3314.  
  3315.    6. The base range of a scalar type is the range of finite values of the type 
  3316.       that can be represented in every unconstrained object of the type; it is 
  3317.       also the range supported at a minimum for intermediate values during the 
  3318.       evaluation of expressions involving predefined operators of the type. 
  3319.  
  3320.    7. A constrained scalar subtype is one to which a range constraint applies. 
  3321.       The range of a constrained scalar subtype is the range associated with 
  3322.       the range constraint of the subtype. The range of an unconstrained scalar 
  3323.       subtype is the base range of its type. 
  3324.  
  3325.             Dynamic Semantics
  3326.  
  3327.    8. A range is compatible with a scalar subtype if and only if it is either a 
  3328.       null range or each bound of the range belongs to the range of the 
  3329.       subtype. A range_constraint is compatible with a scalar subtype if and 
  3330.       only if its range is compatible with the subtype. 
  3331.  
  3332.    9. The elaboration of a range_constraint consists of the evaluation of the 
  3333.       range. The evaluation of a range determines a lower bound and an upper 
  3334.       bound. If simple_expressions are given to specify bounds, the evaluation 
  3335.       of the range evaluates these simple_expressions in an arbitrary order, 
  3336.       and converts them to the type of the range. If a 
  3337.       range_attribute_reference is given, the evaluation of the range consists 
  3338.       of the evaluation of the range_attribute_reference. 
  3339.  
  3340.   10. Attributes 
  3341.  
  3342.   11. For every scalar subtype S, the following attributes are defined: 
  3343.  
  3344.   12. S'First 
  3345.  
  3346.                       S'First denotes the lower bound of the range of S. The value
  3347.                       of this attribute is of the type of S.
  3348.  
  3349.   13. S'Last 
  3350.  
  3351.                       S'Last denotes the upper bound of the range of S. The value
  3352.                       of this attribute is of the type of S.
  3353.  
  3354.   14. S'Range 
  3355.  
  3356.                       S'Range is equivalent to the range S'First ┬╖┬╖ S'Last.
  3357.  
  3358.   15. S'Base 
  3359.  
  3360.                       S'Base denotes an unconstrained subtype of the type of
  3361.                       S. This unconstrained subtype is called the base subtype of
  3362.                       the type.
  3363.  
  3364.   16. S'Min  S'Min denotes a function with the following specification: 
  3365.  
  3366.                    a.
  3367.  
  3368.                       function S'Min(Left, Right : S'Base)
  3369.                        return S'Base
  3370.  
  3371.         b. The function returns the lesser of the values of the two parameters. 
  3372.  
  3373.    1. S'Max  S'Max denotes a function with the following specification: 
  3374.  
  3375.                    a.
  3376.  
  3377.                       function S'Max(Left, Right : S'Base)
  3378.                        return S'Base
  3379.  
  3380.         b. The function returns the greater of the values of the two 
  3381.            parameters. 
  3382.  
  3383.    1. S'Succ  S'Succ denotes a function with the following specification: 
  3384.  
  3385.                    a.
  3386.  
  3387.                       function S'Succ(Arg : S'Base)
  3388.                        return S'Base
  3389.  
  3390.         b. For an enumeration type, the function returns the value whose 
  3391.            position number is one more than that of the value of Arg; 
  3392.            Constraint_Error is raised if there is no such value of the type. 
  3393.            For an integer type, the function returns the result of adding one 
  3394.            to the value of Arg. For a fixed point type, the function returns 
  3395.            the result of adding small to the value of Arg. For a floating point 
  3396.            type, the function returns the machine number (as defined in 3.5.7.) 
  3397.            immediately above the value of Arg; Constraint_Error is raised if 
  3398.            there is no such machine number. 
  3399.  
  3400.    1. S'Pred  S'Pred denotes a function with the following specification: 
  3401.  
  3402.                    a.
  3403.  
  3404.                       function S'Pred(Arg : S'Base)
  3405.                        return S'Base
  3406.  
  3407.         b. For an enumeration type, the function returns the value whose 
  3408.            position number is one less than that of the value of Arg; 
  3409.            Constraint_Error is raised if there is no such value of the type. 
  3410.            For an integer type, the function returns the result of subtracting 
  3411.            one from the value of Arg. For a fixed point type, the function 
  3412.            returns the result of subtracting small from the value of Arg. For a 
  3413.            floating point type, the function returns the machine number (as 
  3414.            defined in 3.5.7.) immediately below the value of Arg; 
  3415.            Constraint_Error is raised if there is no such machine number. 
  3416.  
  3417.    1. S'Wide_Image  S'Wide_Image denotes a function with the following 
  3418.       specification: 
  3419.  
  3420.                    a.
  3421.  
  3422.                       function S'Wide_Image(Arg : S'Base)
  3423.                        return Wide_String
  3424.  
  3425.         b. The function returns an image of the value of Arg, that is, a 
  3426.            sequence of characters representing the value in display form. The 
  3427.            lower bound of the result is one. 
  3428.  
  3429.         c. The image of an integer value is the corresponding decimal literal, 
  3430.            without underlines, leading zeros, exponent, or trailing spaces, but 
  3431.            with a single leading character that is either a minus sign or a 
  3432.            space. 
  3433.  
  3434.         d. The image of an enumeration value is either the corresponding 
  3435.            identifier in upper case or the corresponding character literal 
  3436.            (including the two apostrophes); neither leading nor trailing spaces 
  3437.            are included. For a nongraphic character (a value of a character 
  3438.            type that has no enumeration literal associated with it), the result 
  3439.            is a corresponding language-defined or implementation-defined name 
  3440.            in upper case (for example, the image of the nongraphic character 
  3441.            identified as nul is ``NUL'' -- the quotes are not part of the 
  3442.            image). 
  3443.  
  3444.         e. The image of a floating point value is a decimal real literal best 
  3445.            approximating the value (rounded away from zero if halfway between) 
  3446.            with a single leading character that is either a minus sign or a 
  3447.            space, a single digit (that is nonzero unless the value is zero), a 
  3448.            decimal point, S'Digits-1, see 3.5.8, digits after the decimal point 
  3449.            (but one if S'Digits is one), an upper case E, the sign of the 
  3450.            exponent (either + or -), and two or more digits (with leading zeros 
  3451.            if necessary) representing the exponent. If S'Signed_Zeros is True, 
  3452.            then the leading character is a minus sign for a negatively signed 
  3453.            zero. 
  3454.  
  3455.         f. The image of a fixed point value is a decimal real literal best 
  3456.            approximating the value (rounded away from zero if halfway between) 
  3457.            with a single leading character that is either a minus sign or a 
  3458.            space, one or more digits before the decimal point (with no 
  3459.            redundant leading zeros), a decimal point, and S'Aft, see 3.5.10, 
  3460.            digits after the decimal point. 
  3461.  
  3462.    1. S'Image  S'Image denotes a function with the following specification: 
  3463.  
  3464.                    a.
  3465.  
  3466.                       function S'Image(Arg : S'Base)
  3467.                        return String
  3468.  
  3469.         b. The function returns an image of the value of Arg as a String. The 
  3470.            lower bound of the result is one. The image has the same sequence of 
  3471.            graphic characters as that defined for S'Wide_Image if all the 
  3472.            graphic characters are defined in Character; otherwise the sequence 
  3473.            of characters is implementation defined (but no shorter than that of 
  3474.            S'Wide_Image for the same value of Arg). 
  3475.  
  3476.    1. S'Wide_Width 
  3477.  
  3478.                       S'Wide_Width denotes the maximum length of a Wide_String
  3479.                       returned by S'Wide_Image over all values of the subtype S. It
  3480.                       denotes zero for a subtype that has a null range. Its type
  3481.                       is universal_integer.
  3482.  
  3483.    2. S'Width 
  3484.  
  3485.                       S'Width denotes the maximum length of a String returned by
  3486.                       S'Image over all values of the subtype S. It denotes
  3487.                       zero for a subtype that has a null range. Its type is
  3488.                       universal_integer.
  3489.  
  3490.    3. S'Wide_Value  S'Wide_Value denotes a function with the following 
  3491.       specification: 
  3492.  
  3493.                    a.
  3494.  
  3495.                       function S'Wide_Value(Arg : Wide_String)
  3496.                        return S'Base
  3497.  
  3498.         b. This function returns a value given an image of the value as a 
  3499.            Wide_String, ignoring any leading or trailing spaces. 
  3500.  
  3501.         c. For the evaluation of a call on S'Wide_Value for an enumeration 
  3502.            subtype S, if the sequence of characters of the parameter (ignoring 
  3503.            leading and trailing spaces) has the syntax of an enumeration 
  3504.            literal and if it corresponds to a literal of the type of S (or 
  3505.            corresponds to the result of S'Wide_Image for a nongraphic character 
  3506.            of the type), the result is the corresponding enumeration value; 
  3507.            otherwise Constraint_Error is raised. 
  3508.  
  3509.         d. For the evaluation of a call on S'Wide_Value (or S'Value) for an 
  3510.            integer subtype S, if the sequence of characters of the parameter 
  3511.            (ignoring leading and trailing spaces) has the syntax of an integer 
  3512.            literal, with an optional leading sign character (plus or minus for 
  3513.            a signed type; only plus for a modular type), and the corresponding 
  3514.            numeric value belongs to the base range of the type of S, then that 
  3515.            value is the result; otherwise Constraint_Error is raised. 
  3516.  
  3517.         e. For the evaluation of a call on S'Wide_Value (or S'Value) for a real 
  3518.            subtype S, if the sequence of characters of the parameter (ignoring 
  3519.            leading and trailing spaces) has the syntax of one of the following: 
  3520.  
  3521.              1. numeric_literal 
  3522.  
  3523.              2. numeral.[exponent] 
  3524.  
  3525.              3. ┬╖numeral[exponent] 
  3526.  
  3527.              4. base#based_numeral.#[exponent] 
  3528.  
  3529.              5. base#.based_numeral#[exponent] 
  3530.  
  3531.         a. with an optional leading sign character (plus or minus), and if the 
  3532.            corresponding numeric value belongs to the base range of the type of 
  3533.            S, then that value is the result; otherwise Constraint_Error is 
  3534.            raised. The sign of a zero value is preserved (positive if none has 
  3535.            been specified) if S'Signed_Zeros is True. 
  3536.  
  3537.    1. S'Value  S'Value denotes a function with the following specification: 
  3538.  
  3539.                    a.
  3540.  
  3541.                       function S'Value(Arg : String)
  3542.                        return S'Base
  3543.  
  3544.         b. This function returns a value given an image of the value as a 
  3545.            String, ignoring any leading or trailing spaces. 
  3546.  
  3547.         c. For the evaluation of a call on S'Value for an enumeration subtype 
  3548.            S, if the sequence of characters of the parameter (ignoring leading 
  3549.            and trailing spaces) has the syntax of an enumeration literal and if 
  3550.            it corresponds to a literal of the type of S (or corresponds to the 
  3551.            result of S'Image for a value of the type), the result is the 
  3552.            corresponding enumeration value; otherwise Constraint_Error is 
  3553.            raised. For a numeric subtype S, the evaluation of a call on S'Value 
  3554.            with Arg of type String is equivalent to a call on S'Wide_Value for 
  3555.            a corresponding Arg of type Wide_String. 
  3556.  
  3557.   Implementation Permissions
  3558.  
  3559.    1. An implementation may extend the Wide_Value, Value, Wide_Image, and Image 
  3560.       attributes of a floating point type to support special values such as 
  3561.       infinities and NaNs. 
  3562.  
  3563.       NOTES 
  3564.  
  3565.    2. (19) The evaluation of S'First or S'Last never raises an exception. If a 
  3566.       scalar subtype S has a nonnull range, S'First and S'Last belong to this 
  3567.       range. These values can, for example, always be assigned to a variable of 
  3568.       subtype S. 
  3569.  
  3570.    3. (20) For a subtype of a scalar type, the result delivered by the 
  3571.       attributes Succ, Pred, and Value might not belong to the subtype; 
  3572.       similarly, the actual parameters of the attributes Succ, Pred, and Image 
  3573.       need not belong to the subtype. 
  3574.  
  3575.    4. (21) For any value V (including any nongraphic character) of an 
  3576.       enumeration subtype S, S'Value(S'Image(V)) equals V, as does 
  3577.       S'Wide_Value(S'Wide_Image(V)). Neither expression ever raises 
  3578.       Constraint_Error. 
  3579.  
  3580.             Examples
  3581.  
  3582.    5. Examples of ranges: 
  3583.  
  3584.          6.
  3585.  
  3586.                       -10 ┬╖┬╖ 10
  3587.                       X ┬╖┬╖ X + 1
  3588.                       0.0 ┬╖┬╖ 2.0*Pi
  3589.                       Red ┬╖┬╖ Green   --  see 3.5.1
  3590.                       1 ┬╖┬╖ 0      -- a null range
  3591.                       Table'Range    -- a range attribute reference, see 3.6
  3592.  
  3593.    7. Examples of range constraints: 
  3594.  
  3595.          8.
  3596.  
  3597.                       range -999.0 ┬╖┬╖ +999.0
  3598.                       range S'First+1 ┬╖┬╖ S'Last-1
  3599.  
  3600.  3.5.1                         Enumeration Types 
  3601.  3.5.2                         Character Types 
  3602.  3.5.3                         Boolean Types 
  3603.  3.5.4                         Integer Types 
  3604.  3.5.5                         Operations of Discrete Types 
  3605.  3.5.6                         Real Types 
  3606.  3.5.7                         Floating Point Types 
  3607.  3.5.8                         Operations of Floating Point Types 
  3608.  3.5.9                         Fixed Point Types 
  3609.  3.5.10                        Operations of Fixed Point Types 
  3610.  
  3611.  
  3612. ΓòÉΓòÉΓòÉ 6.5.1. Enumeration Types ΓòÉΓòÉΓòÉ
  3613.  
  3614.    1. An enumeration_type_definition defines an enumeration type. 
  3615.  
  3616.             Syntax
  3617.  
  3618.          2.
  3619.  
  3620.                       enumeration_type_definition ::=
  3621.                         (enumeration_literal_specification
  3622.                          {, enumeration_literal_specification})
  3623.  
  3624.          3.
  3625.  
  3626.                       enumeration_literal_specification ::=
  3627.                         defining_identifier | defining_character_literal
  3628.  
  3629.          4.
  3630.  
  3631.                       defining_character_literal ::= character_literal
  3632.  
  3633.   Legality Rules
  3634.  
  3635.    5. The defining_identifiers and defining_character_literals listed in an 
  3636.       enumeration_type_definition shall be distinct. 
  3637.  
  3638.             Static Semantics
  3639.  
  3640.    6. Each enumeration_literal_specification is the explicit declaration of the 
  3641.       corresponding enumeration literal: it declares a parameterless function, 
  3642.       whose defining name is the defining_identifier or 
  3643.       defining_character_literal, and whose result type is the enumeration 
  3644.       type. 
  3645.  
  3646.    7. Each enumeration literal corresponds to a distinct value of the 
  3647.       enumeration type, and to a distinct position number. The position number 
  3648.       of the value of the first listed enumeration literal is zero; the 
  3649.       position number of the value of each subsequent enumeration literal is 
  3650.       one more than that of its predecessor in the list. 
  3651.  
  3652.    8. The predefined order relations between values of the enumeration type 
  3653.       follow the order of corresponding position numbers. 
  3654.  
  3655.    9. If the same defining_identifier or defining_character_literal is 
  3656.       specified in more than one enumeration_type_definition, the corresponding 
  3657.       enumeration literals are said to be overloaded. At any place where an 
  3658.       overloaded enumeration literal occurs in the text of a program, the type 
  3659.       of the enumeration literal has to be determinable from the context, see 
  3660.       8.6. 
  3661.  
  3662.             Dynamic Semantics
  3663.  
  3664.   10. The elaboration of an enumeration_type_definition creates the enumeration 
  3665.       type and its first subtype, which is constrained to the base range of the 
  3666.       type. 
  3667.  
  3668.   11. When called, the parameterless function associated with an enumeration 
  3669.       literal returns the corresponding value of the enumeration type. 
  3670.  
  3671.       NOTES 
  3672.  
  3673.   12. (22) If an enumeration literal occurs in a context that does not 
  3674.       otherwise suffice to determine the type of the literal, then 
  3675.       qualification by the name of the enumeration type is one way to resolve 
  3676.       the ambiguity, see 4.7. 
  3677.  
  3678.             Examples
  3679.  
  3680.   13. Examples of enumeration types and subtypes: 
  3681.  
  3682.         14.
  3683.  
  3684.                       type Day   is (Mon, Tue, Wed, Thu, Fri, Sat, Sun);
  3685.                       type Suit  is (Clubs, Diamonds, Hearts, Spades);
  3686.                       type Gender is (M, F);
  3687.                       type Level  is (Low, Medium, Urgent);
  3688.                       type Color  is (White, Red, Yellow, Green, Blue, Brown, Black);
  3689.                       type Light  is (Red, Amber, Green); -- Red and Green are overloaded
  3690.  
  3691.         15.
  3692.  
  3693.                       type Hexa  is ('A', 'B', 'C', 'D', 'E', 'F');
  3694.                       type Mixed  is ('A', 'B', '*', B, None, '?', '%');
  3695.  
  3696.         16.
  3697.  
  3698.                       subtype Weekday is Day  range Mon ┬╖┬╖ Fri;
  3699.                       subtype Major  is Suit  range Hearts ┬╖┬╖ Spades;
  3700.                       subtype Rainbow is Color range Red ┬╖┬╖ Blue;
  3701.                       --  the Color Red, not the Light
  3702.  
  3703.  
  3704. ΓòÉΓòÉΓòÉ 6.5.2. Character Types ΓòÉΓòÉΓòÉ
  3705.  
  3706.  
  3707.   Static Semantics
  3708.  
  3709.    1. An enumeration type is said to be a character type if at least one of its 
  3710.       enumeration literals is a character_literal. 
  3711.  
  3712.    2. The predefined type Character is a character type whose values correspond 
  3713.       to the 256 code positions of Row 00 (also known as Latin-1) of the ISO 
  3714.       10646 Basic Multilingual Plane (BMP). Each of the graphic characters of 
  3715.       Row 00 of the BMP has a corresponding character_literal in Character. 
  3716.       Each of the nongraphic positions of Row 00 (0000-001F and 007F-009F) has 
  3717.       a corresponding language-defined name, which is not usable as an 
  3718.       enumeration literal, but which is usable with the attributes (Wide_)Image 
  3719.       and (Wide_)Value; these names are given in the definition of type 
  3720.       Character in A.1: ``The Package Standard'', but are set in italics. 
  3721.  
  3722.    3. The predefined type Wide_Character is a character type whose values 
  3723.       correspond to the 65536 code positions of the ISO 10646 Basic 
  3724.       Multilingual Plane (BMP). Each of the graphic characters of the BMP has a 
  3725.       corresponding character_literal in Wide_Character. The first 256 values 
  3726.       of Wide_Character have the same character_literal or language-defined 
  3727.       name as defined for Character. The last 2 values of Wide_Character 
  3728.       correspond to the nongraphic positions FFFE and FFFF of the BMP, and are 
  3729.       assigned the language-defined names FFFE and FFFF. As with the other 
  3730.       language-defined names for nongraphic characters, the names FFFE and FFFF 
  3731.       are usable only with the attributes (Wide_)Image and (Wide_)Value; they 
  3732.       are not usable as enumeration literals. All other values of 
  3733.       Wide_Character are considered graphic characters, and have a 
  3734.       corresponding character_literal. 
  3735.  
  3736.             Implementation Permissions
  3737.  
  3738.    4. In a nonstandard mode, an implementation may provide other 
  3739.       interpretations for the predefined types Character and Wide_Character, to 
  3740.       conform to local conventions. 
  3741.  
  3742.             Implementation Advice
  3743.  
  3744.    5. If an implementation supports a mode with alternative interpretations for 
  3745.       Character and Wide_Character, the set of graphic characters of Character 
  3746.       should nevertheless remain a proper subset of the set of graphic 
  3747.       characters of Wide_Character. Any character set ``localizations'' should 
  3748.       be reflected in the results of the subprograms defined in the 
  3749.       language-defined package Characters.Handling, see A.3, available in such 
  3750.       a mode. In a mode with an alternative interpretation of Character, the 
  3751.       implementation should also support a corresponding change in what is a 
  3752.       legal identifier_letter. 
  3753.  
  3754.       NOTES 
  3755.  
  3756.    6. (23) The language-defined library package Characters.Latin_1 (A.3.3) 
  3757.       includes the declaration of constants denoting control characters, lower 
  3758.       case characters, and special characters of the predefined type Character. 
  3759.  
  3760.    7. (24) A conventional character set such as EBCDIC can be declared as a 
  3761.       character type; the internal codes of the characters can be specified by 
  3762.       an enumeration_representation_clause as explained in clause (see 13.4). 
  3763.  
  3764.             Examples
  3765.  
  3766.    8. Example of a character type: 
  3767.  
  3768.          9.
  3769.  
  3770.                       type Roman_Digit is ('I', 'V', 'X', 'L', 'C', 'D', 'M');
  3771.  
  3772.  
  3773. ΓòÉΓòÉΓòÉ 6.5.3. Boolean Types ΓòÉΓòÉΓòÉ
  3774.  
  3775.  
  3776.   Static Semantics
  3777.  
  3778.    1. There is a predefined enumeration type named Boolean, declared in the 
  3779.       visible part of package Standard. It has the two enumeration literals 
  3780.       False and True ordered with the relation False < True. Any descendant of 
  3781.       the predefined type Boolean is called a boolean type. 
  3782.  
  3783.  
  3784. ΓòÉΓòÉΓòÉ 6.5.4. Integer Types ΓòÉΓòÉΓòÉ
  3785.  
  3786.    1. An integer_type_definition defines an integer type; it defines either a 
  3787.       signed integer type, or a modular integer type. The base range of a 
  3788.       signed integer type includes at least the values of the specified range. 
  3789.       A modular type is an integer type with all arithmetic modulo a specified 
  3790.       positive modulus; such a type corresponds to an unsigned type with 
  3791.       wrap-around semantics. 
  3792.  
  3793.             Syntax
  3794.  
  3795.          2.
  3796.  
  3797.                       integer_type_definition ::=
  3798.                         signed_integer_type_definition | modular_type_definition
  3799.  
  3800.          3.
  3801.  
  3802.                       signed_integer_type_definition ::=
  3803.                         range static_simple_expression ┬╖┬╖ static_simple_expression
  3804.  
  3805.          4.
  3806.  
  3807.                       modular_type_definition ::= mod static_expression
  3808.  
  3809.   Name Resolution Rules
  3810.  
  3811.    5. Each simple_expression in a signed_integer_type_definition is expected to 
  3812.       be of any integer type; they need not be of the same type. The expression 
  3813.       in a modular_type_definition is likewise expected to be of any integer 
  3814.       type. 
  3815.  
  3816.             Legality Rules
  3817.  
  3818.    6. The simple_expressions of a signed_integer_type_definition shall be 
  3819.       static, and their values shall be in the range System.Min_Int ┬╖┬╖ 
  3820.       System.Max_Int. 
  3821.  
  3822.    7. The expression of a modular_type_definition shall be static, and its 
  3823.       value (the modulus) shall be positive, and shall be no greater than 
  3824.       System.Max_Binary_Modulus if a power of 2, or no greater than 
  3825.       System.Max_Nonbinary_Modulus if not. 
  3826.  
  3827.             Static Semantics
  3828.  
  3829.    8. The set of values for a signed integer type is the (infinite) set of 
  3830.       mathematical integers, though only values of the base range of the type 
  3831.       are fully supported for run-time operations. The set of values for a 
  3832.       modular integer type are the values from 0 to one less than the modulus, 
  3833.       inclusive. 
  3834.  
  3835.    9. A signed_integer_type_definition defines an integer type whose base range 
  3836.       includes at least the values of the simple_expressions and is symmetric 
  3837.       about zero, excepting possibly an extra negative value. A 
  3838.       signed_integer_type_definition also defines a constrained first subtype 
  3839.       of the type, with a range whose bounds are given by the values of the 
  3840.       simple_expressions, converted to the type being defined. 
  3841.  
  3842.   10. A modular_type_definition defines a modular type whose base range is from 
  3843.       zero to one less than the given modulus. A modular_type_definition also 
  3844.       defines a constrained first subtype of the type with a range that is the 
  3845.       same as the base range of the type. 
  3846.  
  3847.   11. There is a predefined signed integer subtype named Integer, declared in 
  3848.       the visible part of package Standard. It is constrained to the base range 
  3849.       of its type. 
  3850.  
  3851.   12. Integer has two predefined subtypes, declared in the visible part of 
  3852.       package Standard: 
  3853.  
  3854.         13.
  3855.  
  3856.                       subtype Natural  is Integer range 0 ┬╖┬╖ Integer'Last;
  3857.                       subtype Positive is Integer range 1 ┬╖┬╖ Integer'Last;
  3858.  
  3859.   14. A type defined by an integer_type_definition is implicitly derived from 
  3860.       root_integer, an anonymous predefined (specific) integer type, whose base 
  3861.       range is System.Min_Int ┬╖┬╖ System.Max_Int. However, the base range of the 
  3862.       new type is not inherited from root_integer, but is instead determined by 
  3863.       the range or modulus specified by the integer_type_definition. Integer 
  3864.       literals are all of the type universal_integer, the universal type, see 
  3865.       3.4.1, for the class rooted at root_integer, allowing their use with the 
  3866.       operations of any integer type. 
  3867.  
  3868.   15. The position number of an integer value is equal to the value. 
  3869.  
  3870.   16. For every modular subtype S, the following attribute is defined: 
  3871.  
  3872.   17. S'Modulus 
  3873.  
  3874.                       S'Modulus yields the modulus of the type of S, as a value of
  3875.                       the type universal_integer.
  3876.  
  3877.   Dynamic Semantics
  3878.  
  3879.   18. The elaboration of an integer_type_definition creates the integer type 
  3880.       and its first subtype. 
  3881.  
  3882.   19. For a modular type, if the result of the execution of a predefined 
  3883.       operator, see 4.5 is outside the base range of the type, the result is 
  3884.       reduced modulo the modulus of the type to a value that is within the base 
  3885.       range of the type. 
  3886.  
  3887.   20. For a signed integer type, the exception Constraint_Error is raised by 
  3888.       the execution of an operation that cannot deliver the correct result 
  3889.       because it is outside the base range of the type. For any integer type, 
  3890.       Constraint_Error is raised by the operators "/", "rem", and "mod" if the 
  3891.       right operand is zero. 
  3892.  
  3893.             Implementation Requirements
  3894.  
  3895.   21. In an implementation, the range of Integer shall include the range 
  3896.       -2**15+1 ┬╖┬╖ +2**15-1. 
  3897.  
  3898.   22. If Long_Integer is predefined for an implementation, then its range shall 
  3899.       include the range -2**31+1 ┬╖┬╖ +2**31-1. 
  3900.  
  3901.   23. System.Max_Binary_Modulus shall be at least 2**16. 
  3902.  
  3903.             Implementation Permissions
  3904.  
  3905.   24. For the execution of a predefined operation of a signed integer type, the 
  3906.       implementation need not raise Constraint_Error if the result is outside 
  3907.       the base range of the type, so long as the correct result is produced. 
  3908.  
  3909.   25. An implementation may provide additional predefined signed integer types, 
  3910.       declared in the visible part of Standard, whose first subtypes have names 
  3911.       of the form Short_Integer, Long_Integer, Short_Short_Integer, 
  3912.       Long_Long_Integer, etc. Different predefined integer types are allowed to 
  3913.       have the same base range. However, the range of Integer should be no 
  3914.       wider than that of Long_Integer. Similarly, the range of Short_Integer 
  3915.       (if provided) should be no wider than Integer. Corresponding 
  3916.       recommendations apply to any other predefined integer types. There need 
  3917.       not be a named integer type corresponding to each distinct base range 
  3918.       supported by an implementation. The range of each first subtype should be 
  3919.       the base range of its type. 
  3920.  
  3921.   26. An implementation may provide nonstandard integer types, descendants of 
  3922.       root_integer that are declared outside of the specification of package 
  3923.       Standard, which need not have all the standard characteristics of a type 
  3924.       defined by an integer_type_definition. For example, a nonstandard integer 
  3925.       type might have an asymmetric base range or it might not be allowed as an 
  3926.       array or loop index (a very long integer). Any type descended from a 
  3927.       nonstandard integer type is also nonstandard. An implementation may place 
  3928.       arbitrary restrictions on the use of such types; it is implementation 
  3929.       defined whether operators that are predefined for ``any integer type'' 
  3930.       are defined for a particular nonstandard integer type. In any case, such 
  3931.       types are not permitted as explicit_generic_actual_parameters for formal 
  3932.       scalar types -- see 12.5.2. 
  3933.  
  3934.   27. For a one's complement machine, the high bound of the base range of a 
  3935.       modular type whose modulus is one less than a power of 2 may be equal to 
  3936.       the modulus, rather than one less than the modulus. It is implementation 
  3937.       defined for which powers of 2, if any, this permission is exercised. 
  3938.  
  3939.             Implementation Advice
  3940.  
  3941.   28. An implementation should support Long_Integer in addition to Integer if 
  3942.       the target machine supports 32-bit (or longer) arithmetic. No other named 
  3943.       integer subtypes are recommended for package Standard. Instead, 
  3944.       appropriate named integer subtypes should be provided in the library 
  3945.       package Interfaces, see B.2. 
  3946.  
  3947.   29. An implementation for a two's complement machine should support modular 
  3948.       types with a binary modulus up to System.Max_Int*2+2. An implementation 
  3949.       should support a nonbinary modulus up to Integer'Last. 
  3950.  
  3951.       NOTES 
  3952.  
  3953.   30. (25) Integer literals are of the anonymous predefined integer type 
  3954.       universal_integer. Other integer types have no literals. However, the 
  3955.       overload resolution rules, see 8.6: ``The Context of Overload 
  3956.       Resolution'', allow expressions of the type universal_integer whenever an 
  3957.       integer type is expected. 
  3958.  
  3959.   31. (26) The same arithmetic operators are predefined for all signed integer 
  3960.       types defined by a signed_integer_type_definition, see 4.5: ``Operators 
  3961.       and Expression Evaluation''. For modular types, these same operators are 
  3962.       predefined, plus bit-wise logical operators (and, or, xor, and not). In 
  3963.       addition, for the unsigned types declared in the language-defined package 
  3964.       Interfaces, see B.2, functions are defined that provide bit-wise shifting 
  3965.       and rotating. 
  3966.  
  3967.   32. (27) Modular types match a generic_formal_parameter_declaration of the 
  3968.       form "type T is mod <>;"; signed integer types match "type T is range 
  3969.       <>;", see 12.5.2. 
  3970.  
  3971.             Examples
  3972.  
  3973.   33. Examples of integer types and subtypes: 
  3974.  
  3975.         34.
  3976.  
  3977.                       type Page_Num  is range 1 ┬╖┬╖ 2_000;
  3978.                       type Line_Size is range 1 ┬╖┬╖ Max_Line_Size;
  3979.  
  3980.         35.
  3981.  
  3982.                       subtype Small_Int  is Integer  range -10 ┬╖┬╖ 10;
  3983.                       subtype Column_Ptr  is Line_Size range 1 ┬╖┬╖ 10;
  3984.                       subtype Buffer_Size is Integer  range 0 ┬╖┬╖ Max;
  3985.  
  3986.         36.
  3987.  
  3988.                       type Byte     is mod 256; -- an unsigned byte
  3989.                       type Hash_Index  is mod 97;  -- modulus is prime
  3990.  
  3991.  
  3992. ΓòÉΓòÉΓòÉ 6.5.5. Operations of Discrete Types ΓòÉΓòÉΓòÉ
  3993.  
  3994.  
  3995.   Static Semantics
  3996.  
  3997.    1. For every discrete subtype S, the following attributes are defined: 
  3998.  
  3999.    2. S'Pos  S'Pos denotes a function with the following specification: 
  4000.  
  4001.                    a.
  4002.  
  4003.                       function S'Pos(Arg : S'Base)
  4004.                        return universal_integer
  4005.  
  4006.         b. This function returns the position number of the value of Arg, as a 
  4007.            value of type universal_integer. 
  4008.  
  4009.    1. S'Val  S'Val denotes a function with the following specification: 
  4010.  
  4011.                    a.
  4012.  
  4013.                       function S'Val(Arg : universal_integer)
  4014.                        return S'Base
  4015.  
  4016.         b. This function returns a value of the type of S whose position number 
  4017.            equals the value of Arg. For the evaluation of a call on S'Val, if 
  4018.            there is no value in the base range of its type with the given 
  4019.            position number, Constraint_Error is raised. 
  4020.  
  4021.   Implementation Advice
  4022.  
  4023.    1. For the evaluation of a call on S'Pos for an enumeration subtype, if the 
  4024.       value of the operand does not correspond to the internal code for any 
  4025.       enumeration literal of its type (perhaps due to an uninitialized 
  4026.       variable), then the implementation should raise Program_Error. This is 
  4027.       particularly important for enumeration types with noncontiguous internal 
  4028.       codes specified by an enumeration_representation_clause. 
  4029.  
  4030.       NOTES 
  4031.  
  4032.    2. (28) Indexing and loop iteration use values of discrete types. 
  4033.  
  4034.    3. (29) The predefined operations of a discrete type include the assignment 
  4035.       operation, qualification, the membership tests, and the relational 
  4036.       operators; for a boolean type they include the short-circuit control 
  4037.       forms and the logical operators; for an integer type they include type 
  4038.       conversion to and from other numeric types, as well as the binary and 
  4039.       unary adding operators - and +, the multiplying operators, the unary 
  4040.       operator abs, and the exponentiation operator. The assignment operation 
  4041.       is described in 5.2. The other predefined operations are described in 
  4042.       Section 4. 
  4043.  
  4044.    4. (30) As for all types, objects of a discrete type have Size and Address 
  4045.       attributes, see 13.3. 
  4046.  
  4047.    5. (31) For a subtype of a discrete type, the result delivered by the 
  4048.       attribute Val might not belong to the subtype; similarly, the actual 
  4049.       parameter of the attribute Pos need not belong to the subtype. The 
  4050.       following relations are satisfied (in the absence of an exception) by 
  4051.       these attributes: 
  4052.  
  4053.          6.
  4054.  
  4055.                       S'Val(S'Pos(X)) = X
  4056.                       S'Pos(S'Val(N)) = N
  4057.  
  4058.   Examples
  4059.  
  4060.    7. Examples of attributes of discrete subtypes: 
  4061.  
  4062.          8.
  4063.  
  4064.                       --  For the types and subtypes declared in subclause
  4065.                       --  see 3.5.1, the following hold:
  4066.  
  4067.          9.
  4068.  
  4069.                       --  Color'First  = White,  Color'Last  = Black
  4070.                       --  Rainbow'First = Red,   Rainbow'Last = Blue
  4071.  
  4072.         10.
  4073.  
  4074.                       --  Color'Succ(Blue) = Rainbow'Succ(Blue) = Brown
  4075.                       --  Color'Pos(Blue)  = Rainbow'Pos(Blue)  = 4
  4076.                       --  Color'Val(0)   = Rainbow'Val(0)   = White
  4077.  
  4078.  
  4079. ΓòÉΓòÉΓòÉ 6.5.6. Real Types ΓòÉΓòÉΓòÉ
  4080.  
  4081.    1. Real types provide approximations to the real numbers, with relative 
  4082.       bounds on errors for floating point types, and with absolute bounds for 
  4083.       fixed point types. 
  4084.  
  4085.             Syntax
  4086.  
  4087.          2.
  4088.  
  4089.                       real_type_definition ::=
  4090.                         floating_point_definition | fixed_point_definition
  4091.  
  4092.   Static Semantics
  4093.  
  4094.    3. A type defined by a real_type_definition is implicitly derived from 
  4095.       root_real, an anonymous predefined (specific) real type. Hence, all real 
  4096.       types, whether floating point or fixed point, are in the derivation class 
  4097.       rooted at root_real. 
  4098.  
  4099.    4. Real literals are all of the type universal_real, the universal type (see 
  4100.       3.4.1) for the class rooted at root_real, allowing their use with the 
  4101.       operations of any real type. Certain multiplying operators have a result 
  4102.       type of universal_fixed, see 4.5.5, the universal type for the class of 
  4103.       fixed point types, allowing the result of the multiplication or division 
  4104.       to be used where any specific fixed point type is expected. 
  4105.  
  4106.             Dynamic Semantics
  4107.  
  4108.    5. The elaboration of a real_type_definition consists of the elaboration of 
  4109.       the floating_point_definition or the fixed_point_definition. 
  4110.  
  4111.             Implementation Requirements
  4112.  
  4113.    6. An implementation shall perform the run-time evaluation of a use of a 
  4114.       predefined operator of root_real with an accuracy at least as great as 
  4115.       that of any floating point type definable by a floating_point_definition. 
  4116.  
  4117.             Implementation Permissions
  4118.  
  4119.    7. For the execution of a predefined operation of a real type, the 
  4120.       implementation need not raise Constraint_Error if the result is outside 
  4121.       the base range of the type, so long as the correct result is produced, or 
  4122.       the Machine_Overflows attribute of the type is false, see G.2. 
  4123.  
  4124.    8. An implementation may provide nonstandard real types, descendants of 
  4125.       root_real that are declared outside of the specification of package 
  4126.       Standard, which need not have all the standard characteristics of a type 
  4127.       defined by a real_type_definition. For example, a nonstandard real type 
  4128.       might have an asymmetric or unsigned base range, or its predefined 
  4129.       operations might wrap around or ``saturate'' rather than overflow 
  4130.       (modular or saturating arithmetic), or it might not conform to the 
  4131.       accuracy model, see G.2. Any type descended from a nonstandard real type 
  4132.       is also nonstandard. An implementation may place arbitrary restrictions 
  4133.       on the use of such types; it is implementation defined whether operators 
  4134.       that are predefined for ``any real type'' are defined for a particular 
  4135.       nonstandard real type. In any case, such types are not permitted as 
  4136.       explicit_generic_actual_parameters for formal scalar types --  see 
  4137.       12.5.2. 
  4138.  
  4139.       NOTES 
  4140.  
  4141.    9. (32) As stated, real literals are of the anonymous predefined real type 
  4142.       universal_real. Other real types have no literals. However, the overload 
  4143.       resolution rules, see 8.6, allow expressions of the type universal_real 
  4144.       whenever a real type is expected. 
  4145.  
  4146.  
  4147. ΓòÉΓòÉΓòÉ 6.5.7. Floating Point Types ΓòÉΓòÉΓòÉ
  4148.  
  4149.    1. For floating point types, the error bound is specified as a relative 
  4150.       precision by giving the required minimum number of significant decimal 
  4151.       digits. 
  4152.  
  4153.             Syntax
  4154.  
  4155.          2.
  4156.  
  4157.                       floating_point_definition ::=
  4158.                         digits static_expression [real_range_specification]
  4159.  
  4160.          3.
  4161.  
  4162.                       real_range_specification ::=
  4163.                         range static_simple_expression ┬╖┬╖ static_simple_expression
  4164.  
  4165.   Name Resolution Rules
  4166.  
  4167.    4. The requested decimal precision, which is the minimum number of 
  4168.       significant decimal digits required for the floating point type, is 
  4169.       specified by the value of the expression given after the reserved word 
  4170.       digits. This expression is expected to be of any integer type. 
  4171.  
  4172.    5. Each simple_expression of a real_range_specification is expected to be of 
  4173.       any real type; the types need not be the same. 
  4174.  
  4175.             Legality Rules
  4176.  
  4177.    6. The requested decimal precision shall be specified by a static expression 
  4178.       whose value is positive and no greater than System.Max_Base_Digits. Each 
  4179.       simple_expression of a real_range_specification shall also be static. If 
  4180.       the real_range_specification is omitted, the requested decimal precision 
  4181.       shall be no greater than System.Max_Digits. 
  4182.  
  4183.    7. A floating_point_definition is illegal if the implementation does not 
  4184.       support a floating point type that satisfies the requested decimal 
  4185.       precision and range. 
  4186.  
  4187.             Static Semantics
  4188.  
  4189.    8. The set of values for a floating point type is the (infinite) set of 
  4190.       rational numbers. The machine numbers of a floating point type are the 
  4191.       values of the type that can be represented exactly in every unconstrained 
  4192.       variable of the type. The base range, see 3.5, of a floating point type 
  4193.       is symmetric around zero, except that it can include some extra negative 
  4194.       values in some implementations. 
  4195.  
  4196.    9. The base decimal precision of a floating point type is the number of 
  4197.       decimal digits of precision representable in objects of the type. The 
  4198.       safe range of a floating point type is that part of its base range for 
  4199.       which the accuracy corresponding to the base decimal precision is 
  4200.       preserved by all predefined operations. 
  4201.  
  4202.   10. A floating_point_definition defines a floating point type whose base 
  4203.       decimal precision is no less than the requested decimal precision. If a 
  4204.       real_range_specification is given, the safe range of the floating point 
  4205.       type (and hence, also its base range) includes at least the values of the 
  4206.       simple expressions given in the real_range_specification. If a 
  4207.       real_range_specification is not given, the safe (and base) range of the 
  4208.       type includes at least the values of the range -10.0**(4*D) ┬╖┬╖ 
  4209.       +10.0**(4*D) where D is the requested decimal precision. The safe range 
  4210.       might include other values as well. The attributes Safe_First and 
  4211.       Safe_Last give the actual bounds of the safe range. 
  4212.  
  4213.   11. A floating_point_definition also defines a first subtype of the type. If 
  4214.       a real_range_specification is given, then the subtype is constrained to a 
  4215.       range whose bounds are given by a conversion of the values of the 
  4216.       simple_expressions of the real_range_specification to the type being 
  4217.       defined. Otherwise, the subtype is unconstrained. 
  4218.  
  4219.   12. There is a predefined, unconstrained, floating point subtype named Float, 
  4220.       declared in the visible part of package Standard. 
  4221.  
  4222.             Dynamic Semantics
  4223.  
  4224.   13. The elaboration of a floating_point_definition creates the floating point 
  4225.       type and its first subtype. 
  4226.  
  4227.             Implementation Requirements
  4228.  
  4229.   14. In an implementation that supports floating point types with 6 or more 
  4230.       digits of precision, the requested decimal precision for Float shall be 
  4231.       at least 6. 
  4232.  
  4233.   15. If Long_Float is predefined for an implementation, then its requested 
  4234.       decimal precision shall be at least 11. 
  4235.  
  4236.             Implementation Permissions
  4237.  
  4238.   16. An implementation is allowed to provide additional predefined floating 
  4239.       point types, declared in the visible part of Standard, whose 
  4240.       (unconstrained) first subtypes have names of the form Short_Float, 
  4241.       Long_Float, Short_Short_Float, Long_Long_Float, etc. Different predefined 
  4242.       floating point types are allowed to have the same base decimal precision. 
  4243.       However, the precision of Float should be no greater than that of 
  4244.       Long_Float. Similarly, the precision of Short_Float (if provided) should 
  4245.       be no greater than Float. Corresponding recommendations apply to any 
  4246.       other predefined floating point types. There need not be a named floating 
  4247.       point type corresponding to each distinct base decimal precision 
  4248.       supported by an implementation. 
  4249.  
  4250.             Implementation Advice
  4251.  
  4252.   17. An implementation should support Long_Float in addition to Float if the 
  4253.       target machine supports 11 or more digits of precision. No other named 
  4254.       floating point subtypes are recommended for package Standard. Instead, 
  4255.       appropriate named floating point subtypes should be provided in the 
  4256.       library package Interfaces, see B.2. 
  4257.  
  4258.       NOTES 
  4259.  
  4260.   18. (33) If a floating point subtype is unconstrained, then assignments to 
  4261.       variables of the subtype involve only Overflow_Checks, never 
  4262.       Range_Checks. 
  4263.  
  4264.             Examples
  4265.  
  4266.   19. Examples of floating point types and subtypes: 
  4267.  
  4268.         20.
  4269.  
  4270.                       type Coefficient is digits 10 range -1.0 ┬╖┬╖ 1.0;
  4271.  
  4272.         21.
  4273.  
  4274.                       type Real is digits 8;
  4275.                       type Mass is digits 7 range 0.0 ┬╖┬╖ 1.0E35;
  4276.  
  4277.         22.
  4278.  
  4279.                       subtype Probability is Real range 0.0 ┬╖┬╖ 1.0;
  4280.                       --  a subtype with a smaller range
  4281.  
  4282.  
  4283. ΓòÉΓòÉΓòÉ 6.5.8. Operations of Floating Point Types ΓòÉΓòÉΓòÉ
  4284.  
  4285.  
  4286.   Static Semantics
  4287.  
  4288.    1. The following attribute is defined for every floating point subtype S: 
  4289.  
  4290.    2. S'Digits 
  4291.  
  4292.                       S'Digits denotes the requested decimal precision for the
  4293.                       subtype S. The value of this attribute is of the type
  4294.                       universal_integer. The requested decimal precision of the
  4295.                       base subtype of a floating point type T is defined to be the
  4296.                       largest value of d for which ceiling(d * log(10) /
  4297.                       log(T'Machine_Radix)) + 1 <= T'Model_Mantissa.
  4298.  
  4299.  NOTES 
  4300.  
  4301.    3. (34) The predefined operations of a floating point type include the 
  4302.       assignment operation, qualification, the membership tests, and explicit 
  4303.       conversion to and from other numeric types. They also include the 
  4304.       relational operators and the following predefined arithmetic operators: 
  4305.       the binary and unary adding operators - and +, certain multiplying 
  4306.       operators, the unary operator abs, and the exponentiation operator. 
  4307.  
  4308.    4. (35) As for all types, objects of a floating point type have Size and 
  4309.       Address attributes, see 13.3. Other attributes of floating point types 
  4310.       are defined in A.5.3. 
  4311.  
  4312.  
  4313. ΓòÉΓòÉΓòÉ 6.5.9. Fixed Point Types ΓòÉΓòÉΓòÉ
  4314.  
  4315.    1. A fixed point type is either an ordinary fixed point type, or a decimal 
  4316.       fixed point type. The error bound of a fixed point type is specified as 
  4317.       an absolute value, called the delta of the fixed point type. 
  4318.  
  4319.             Syntax
  4320.  
  4321.          2.
  4322.  
  4323.                       fixed_point_definition ::=
  4324.                         ordinary_fixed_point_definition | decimal_fixed_point_definition
  4325.  
  4326.          3.
  4327.  
  4328.                       ordinary_fixed_point_definition ::=
  4329.                         delta static_expression real_range_specification
  4330.  
  4331.          4.
  4332.  
  4333.                       decimal_fixed_point_definition ::=
  4334.                         delta static_expression digits static_expression
  4335.                          [real_range_specification]
  4336.  
  4337.          5.
  4338.  
  4339.                       digits_constraint ::=
  4340.                         digits static_expression [range_constraint]
  4341.  
  4342.   Name Resolution Rules
  4343.  
  4344.    6. For a type defined by a fixed_point_definition, the delta of the type is 
  4345.       specified by the value of the expression given after the reserved word 
  4346.       delta; this expression is expected to be of any real type. For a type 
  4347.       defined by a decimal_fixed_point_definition (a decimal fixed point type), 
  4348.       the number of significant decimal digits for its first subtype (the 
  4349.       digits of the first subtype) is specified by the expression given after 
  4350.       the reserved word digits; this expression is expected to be of any 
  4351.       integer type. 
  4352.  
  4353.             Legality Rules
  4354.  
  4355.    7. In a fixed_point_definition or digits_constraint, the expressions given 
  4356.       after the reserved words delta and digits shall be static; their values 
  4357.       shall be positive. 
  4358.  
  4359.    8. The set of values of a fixed point type comprise the integral multiples 
  4360.       of a number called the small of the type. For a type defined by an 
  4361.       ordinary_fixed_point_definition (an ordinary fixed point type), the small 
  4362.       may be specified by an attribute_definition_clause, see 13.3, if so 
  4363.       specified, it shall be no greater than the delta of the type. If not 
  4364.       specified, the small of an ordinary fixed point type is an 
  4365.       implementation-defined power of two less than or equal to the delta. 
  4366.  
  4367.    9. For a decimal fixed point type, the small equals the delta; the delta 
  4368.       shall be a power of 10. If a real_range_specification is given, both 
  4369.       bounds of the range shall be in the range -(10**digits-1)*delta ┬╖┬╖ 
  4370.       +(10**digits-1)*delta. 
  4371.  
  4372.   10. A fixed_point_definition is illegal if the implementation does not 
  4373.       support a fixed point type with the given small and specified range or 
  4374.       digits. 
  4375.  
  4376.   11. For a subtype_indication with a digits_constraint, the subtype_mark shall 
  4377.       denote a decimal fixed point subtype. 
  4378.  
  4379.             Static Semantics
  4380.  
  4381.   12. The base range, see 3.5 of a fixed point type is symmetric around zero, 
  4382.       except possibly for an extra negative value in some implementations. 
  4383.  
  4384.   13. An ordinary_fixed_point_definition defines an ordinary fixed point type 
  4385.       whose base range includes at least all multiples of small that are 
  4386.       between the bounds specified in the real_range_specification. The base 
  4387.       range of the type does not necessarily include the specified bounds 
  4388.       themselves. An ordinary_fixed_point_definition also defines a constrained 
  4389.       first subtype of the type, with each bound of its range given by the 
  4390.       closer to zero of: 
  4391.  
  4392.         a. the value of the conversion to the fixed point type of the 
  4393.            corresponding expression of the real_range_specification; 
  4394.  
  4395.         b. the corresponding bound of the base range. 
  4396.  
  4397.    1. A decimal_fixed_point_definition defines a decimal fixed point type whose 
  4398.       base range includes at least the range -(10**digits-1)*delta ┬╖┬╖ 
  4399.       +(10**digits-1)*delta. A decimal_fixed_point_definition also defines a 
  4400.       constrained first subtype of the type. If a real_range_specification is 
  4401.       given, the bounds of the first subtype are given by a conversion of the 
  4402.       values of the expressions of the real_range_specification. Otherwise, the 
  4403.       range of the first subtype is -(10**digits-1)*delta ┬╖┬╖ 
  4404.       +(10**digits-1)*delta. 
  4405.  
  4406.             Dynamic Semantics
  4407.  
  4408.    2. The elaboration of a fixed_point_definition creates the fixed point type 
  4409.       and its first subtype. 
  4410.  
  4411.    3. For a digits_constraint on a decimal fixed point subtype with a given 
  4412.       delta, if it does not have a range_constraint, then it specifies an 
  4413.       implicit range -(10**D-1)*delta ┬╖┬╖ +(10**D-1)*delta, where D is the value 
  4414.       of the expression. A digits_constraint is compatible with a decimal fixed 
  4415.       point subtype if the value of the expression is no greater than the 
  4416.       digits of the subtype, and if it specifies (explicitly or implicitly) a 
  4417.       range that is compatible with the subtype. 
  4418.  
  4419.    4. The elaboration of a digits_constraint consists of the elaboration of the 
  4420.       range_constraint, if any. If a range_constraint is given, a check is made 
  4421.       that the bounds of the range are both in the range -(10**D-1)*delta ┬╖┬╖ 
  4422.       +(10**D-1)*delta, where D is the value of the (static) expression given 
  4423.       after the reserved word digits. If this check fails, Constraint_Error is 
  4424.       raised. 
  4425.  
  4426.             Implementation Requirements
  4427.  
  4428.    5. The implementation shall support at least 24 bits of precision (including 
  4429.       the sign bit) for fixed point types. 
  4430.  
  4431.             Implementation Permissions
  4432.  
  4433.    6. Implementations are permitted to support only smalls that are a power of 
  4434.       two. In particular, all decimal fixed point type declarations can be 
  4435.       disallowed. Note however that conformance with the Information Systems 
  4436.       Annex requires support for decimal smalls, and decimal fixed point type 
  4437.       declarations with digits up to at least 18. 
  4438.  
  4439.       NOTES 
  4440.  
  4441.    7. (36) The base range of an ordinary fixed point type need not include the 
  4442.       specified bounds themselves so that the range specification can be given 
  4443.       in a natural way, such as: 
  4444.  
  4445.          8.
  4446.  
  4447.                       type Fraction is delta 2.0**(-15) range -1.0 ┬╖┬╖ 1.0;
  4448.  
  4449.    9. With 2's complement hardware, such a type could have a signed 16-bit 
  4450.       representation, using 1 bit for the sign and 15 bits for fraction, 
  4451.       resulting in a base range of -1.0 ┬╖┬╖ 1.0-2.0**(-15). 
  4452.  
  4453.             Examples
  4454.  
  4455.   10. Examples of fixed point types and subtypes: 
  4456.  
  4457.         11.
  4458.  
  4459.                       type Volt is delta 0.125 range 0.0 ┬╖┬╖ 255.0;
  4460.  
  4461.         12.
  4462.  
  4463.                       --  A pure fraction which requires all the available
  4464.                       --  space in a word can be declared as the type Fraction:
  4465.                       type Fraction is delta System.Fine_Delta range -1.0 ┬╖┬╖ 1.0;
  4466.                       --  Fraction'Last = 1.0 - System.Fine_Delta
  4467.  
  4468.         13.
  4469.  
  4470.                       type Money is delta 0.01 digits 15;  -- decimal fixed point
  4471.                       subtype Salary is Money digits 10;
  4472.                        -- Money'Last = 10.0**13 - 0.01, Salary'Last = 10.0**8 - 0.01
  4473.  
  4474.  
  4475. ΓòÉΓòÉΓòÉ 6.5.10. Operations of Fixed Point Types ΓòÉΓòÉΓòÉ
  4476.  
  4477.  
  4478.   Static Semantics
  4479.  
  4480.    1. The following attributes are defined for every fixed point subtype S: 
  4481.  
  4482.    2. S'Small 
  4483.  
  4484.                       S'Small denotes the small of the type of S. The value of
  4485.                       this attribute is of the type universal_real. Small may
  4486.                       be specified for nonderived fixed point types via an
  4487.                       attribute_definition_clause, see 13.3; the expression
  4488.                       of such a clause shall be static.
  4489.  
  4490.    3. S'Delta 
  4491.  
  4492.                       S'Delta denotes the delta of the fixed point subtype S. The
  4493.                       value of this attribute is of the type universal_real.
  4494.  
  4495.    4. S'Fore 
  4496.  
  4497.                       S'Fore yields the minimum number of characters needed
  4498.                       before the decimal point for the decimal representation
  4499.                       of any value of the subtype S, assuming that the
  4500.                       representation does not include an exponent, but
  4501.                       includes a one-character prefix that is either a minus
  4502.                       sign or a space. (This minimum number does not include
  4503.                       superfluous zeros or underlines, and is at least 2.) The
  4504.                       value of this attribute is of the type
  4505.                       universal_integer.
  4506.  
  4507.    5. S'Aft 
  4508.  
  4509.                       S'Aft yields the number of decimal digits needed after the
  4510.                       decimal point to accommodate the delta of the subtype S,
  4511.                       unless the delta of the subtype S is greater than 0.1, in
  4512.                       which case the attribute yields the value one. (S'Aft is the
  4513.                       smallest positive integer N for which (10**N)*S'Delta is
  4514.                       greater than or equal to one.) The value of this attribute
  4515.                       is of the type universal_integer.
  4516.  
  4517.    6. The following additional attributes are defined for every decimal fixed 
  4518.       point subtype S: 
  4519.  
  4520.    7. S'Digits 
  4521.  
  4522.                       S'Digits denotes the digits of the decimal fixed point
  4523.                       subtype S, which corresponds to the number of decimal digits
  4524.                       that are representable in objects of the subtype. The value
  4525.                       of this attribute is of the type universal_integer. Its
  4526.                       value is determined as follows:
  4527.  
  4528.         a. For a first subtype or a subtype defined by a subtype_indication 
  4529.            with a digits_constraint, the digits is the value of the expression 
  4530.            given after the reserved word digits; 
  4531.  
  4532.         b. For a subtype defined by a subtype_indication without a 
  4533.            digits_constraint, the digits of the subtype is the same as that of 
  4534.            the subtype denoted by the subtype_mark in the subtype_indication. 
  4535.  
  4536.         c. The digits of a base subtype is the largest integer D such that the 
  4537.            range -(10**D-1)*delta ┬╖┬╖ +(10**D-1)*delta is included in the base 
  4538.            range of the type. 
  4539.  
  4540.    1. S'Scale 
  4541.  
  4542.                       S'Scale denotes the scale of the subtype S, defined as the
  4543.                       value N such that S'Delta = 10.0**(-N). The scale indicates
  4544.                       the position of the point relative to the rightmost
  4545.                       significant digits of values of subtype S. The value of this
  4546.                       attribute is of the type universal_integer.
  4547.  
  4548.    2. S'Round  S'Round denotes a function with the following specification: 
  4549.  
  4550.                    a.
  4551.  
  4552.                       function S'Round(X : universal_real)
  4553.                        return S'Base
  4554.  
  4555.         b. The function returns the value obtained by rounding X (away from 0, 
  4556.            if X is midway between two values of the type of S). 
  4557.   NOTES 
  4558.  
  4559.    1. (37) All subtypes of a fixed point type will have the same value for the 
  4560.       Delta attribute, in the absence of delta_constraints, see J.3. 
  4561.  
  4562.    2. (38) S'Scale is not always the same as S'Aft for a decimal subtype; for 
  4563.       example, if S'Delta = 1.0 then S'Aft is 1 while S'Scale is 0. 
  4564.  
  4565.    3. (39) The predefined operations of a fixed point type include the 
  4566.       assignment operation, qualification, the membership tests, and explicit 
  4567.       conversion to and from other numeric types. They also include the 
  4568.       relational operators and the following predefined arithmetic operators: 
  4569.       the binary and unary adding operators - and +, multiplying operators, and 
  4570.       the unary operator abs. 
  4571.  
  4572.    4. (40) As for all types, objects of a fixed point type have Size and 
  4573.       Address attributes, see 13.3. Other attributes of fixed point types are 
  4574.       defined in A.5.4. 
  4575.  
  4576.  
  4577. ΓòÉΓòÉΓòÉ 6.6. Array Types ΓòÉΓòÉΓòÉ
  4578.  
  4579.    1. An array object is a composite object consisting of components which all 
  4580.       have the same subtype. The name for a component of an array uses one or 
  4581.       more index values belonging to specified discrete types. The value of an 
  4582.       array object is a composite value consisting of the values of the 
  4583.       components. 
  4584.  
  4585.             Syntax
  4586.  
  4587.          2.
  4588.  
  4589.                       array_type_definition ::=
  4590.                         unconstrained_array_definition | constrained_array_definition
  4591.  
  4592.          3.
  4593.  
  4594.                       unconstrained_array_definition ::=
  4595.                         array(index_subtype_definition {, index_subtype_definition})
  4596.                          of component_definition
  4597.  
  4598.          4.
  4599.  
  4600.                       index_subtype_definition ::= subtype_mark range <>
  4601.  
  4602.          5.
  4603.  
  4604.                       constrained_array_definition ::=
  4605.                         array (discrete_subtype_definition
  4606.                          {, discrete_subtype_definition}) of component_definition
  4607.  
  4608.          6.
  4609.  
  4610.                       discrete_subtype_definition ::= discrete_subtype_indication | range
  4611.  
  4612.          7.
  4613.  
  4614.                       component_definition ::= [aliased] subtype_indication
  4615.  
  4616.   Name Resolution Rules
  4617.  
  4618.    8. For a discrete_subtype_definition that is a range, the range shall 
  4619.       resolve to be of some specific discrete type; which discrete type shall 
  4620.       be determined without using any context other than the bounds of the 
  4621.       range itself (plus the preference for root_integer --  see 8.6.). 
  4622.  
  4623.             Legality Rules
  4624.  
  4625.    9. Each index_subtype_definition or discrete_subtype_definition in an 
  4626.       array_type_definition defines an index subtype; its type (the index type) 
  4627.       shall be discrete. 
  4628.  
  4629.   10. The subtype defined by the subtype_indication of a component_definition 
  4630.       (the component subtype) shall be a definite subtype. 
  4631.  
  4632.   11. Within the definition of a nonlimited composite type (or a limited 
  4633.       composite type that later in its immediate scope becomes nonlimited -- 
  4634.       7.3.1, and 7.5.), if a component_definition contains the reserved word 
  4635.       aliased and the type of the component is discriminated, then the nominal 
  4636.       subtype of the component shall be constrained. 
  4637.  
  4638.             Static Semantics
  4639.  
  4640.   12. An array is characterized by the number of indices (the dimensionality of 
  4641.       the array), the type and position of each index, the lower and upper 
  4642.       bounds for each index, and the subtype of the components. The order of 
  4643.       the indices is significant. 
  4644.  
  4645.   13. A one-dimensional array has a distinct component for each possible index 
  4646.       value. A multidimensional array has a distinct component for each 
  4647.       possible sequence of index values that can be formed by selecting one 
  4648.       value for each index position (in the given order). The possible values 
  4649.       for a given index are all the values between the lower and upper bounds, 
  4650.       inclusive; this range of values is called the index range. The bounds of 
  4651.       an array are the bounds of its index ranges. The length of a dimension of 
  4652.       an array is the number of values of the index range of the dimension 
  4653.       (zero for a null range). The length of a one-dimensional array is the 
  4654.       length of its only dimension. 
  4655.  
  4656.   14. An array_type_definition defines an array type and its first subtype. For 
  4657.       each object of this array type, the number of indices, the type and 
  4658.       position of each index, and the subtype of the components are as in the 
  4659.       type definition; the values of the lower and upper bounds for each index 
  4660.       belong to the corresponding index subtype of its type, except for null 
  4661.       arrays, see 3.6.1. 
  4662.  
  4663.   15. An unconstrained_array_definition defines an array type with an 
  4664.       unconstrained first subtype. Each index_subtype_definition defines the 
  4665.       corresponding index subtype to be the subtype denoted by the 
  4666.       subtype_mark. The compound delimiter <> (called a box) of an 
  4667.       index_subtype_definition stands for an undefined range (different objects 
  4668.       of the type need not have the same bounds). 
  4669.  
  4670.   16. A constrained_array_definition defines an array type with a constrained 
  4671.       first subtype. Each discrete_subtype_definition defines the corresponding 
  4672.       index subtype, as well as the corresponding index range for the 
  4673.       constrained first subtype. The constraint of the first subtype consists 
  4674.       of the bounds of the index ranges. 
  4675.  
  4676.   17. The discrete subtype defined by a discrete_subtype_definition is either 
  4677.       that defined by the subtype_indication, or a subtype determined by the 
  4678.       range as follows: 
  4679.  
  4680.         a. If the type of the range resolves to root_integer, then the 
  4681.            discrete_subtype_definition defines a subtype of the predefined type 
  4682.            Integer with bounds given by a conversion to Integer of the bounds 
  4683.            of the range; 
  4684.  
  4685.         b. Otherwise, the discrete_subtype_definition defines a subtype of the 
  4686.            type of the range, with the bounds given by the range. 
  4687.  
  4688.    1. The component_definition of an array_type_definition defines the nominal 
  4689.       subtype of the components. If the reserved word aliased appears in the 
  4690.       component_definition, then each component of the array is aliased, see 
  4691.       3.10. 
  4692.  
  4693.             Dynamic Semantics
  4694.  
  4695.    2. The elaboration of an array_type_definition creates the array type and 
  4696.       its first subtype, and consists of the elaboration of any 
  4697.       discrete_subtype_definitions and the component_definition. 
  4698.  
  4699.    3. The elaboration of a discrete_subtype_definition creates the discrete 
  4700.       subtype, and consists of the elaboration of the subtype_indication or the 
  4701.       evaluation of the range. The elaboration of a component_definition in an 
  4702.       array_type_definition consists of the elaboration of the 
  4703.       subtype_indication. The elaboration of any discrete_subtype_definitions 
  4704.       and the elaboration of the component_definition are performed in an 
  4705.       arbitrary order. 
  4706.  
  4707.       NOTES 
  4708.  
  4709.    4. (41) All components of an array have the same subtype. In particular, for 
  4710.       an array of components that are one-dimensional arrays, this means that 
  4711.       all components have the same bounds and hence the same length. 
  4712.  
  4713.    5. (42) Each elaboration of an array_type_definition creates a distinct 
  4714.       array type. A consequence of this is that each object whose 
  4715.       object_declaration contains an array_type_definition is of its own unique 
  4716.       type. 
  4717.  
  4718.             Examples
  4719.  
  4720.    6. Examples of type declarations with unconstrained array definitions: 
  4721.  
  4722.          7.
  4723.  
  4724.                       type Vector   is array(Integer  range <>) of Real;
  4725.                       type Matrix   is array(Integer  range <>, Integer range <>)
  4726.                        of Real;
  4727.                       type Bit_Vector is array(Integer  range <>) of Boolean;
  4728.                       type Roman    is array(Positive range <>) of
  4729.                        Roman_Digit;  --  see 3.5.2
  4730.  
  4731.    8. Examples of type declarations with constrained array definitions: 
  4732.  
  4733.          9.
  4734.  
  4735.                       type Table   is array(1 ┬╖┬╖ 10) of Integer;
  4736.                       type Schedule is array(Day) of Boolean;
  4737.                       type Line   is array(1 ┬╖┬╖ Max_Line_Size) of Character;
  4738.  
  4739.   10. Examples of object declarations with array type definitions: 
  4740.  
  4741.         11.
  4742.  
  4743.                       Grid : array(1 ┬╖┬╖ 80, 1 ┬╖┬╖ 100) of Boolean;
  4744.                       Mix  : array(Color range Red ┬╖┬╖ Green) of Boolean;
  4745.                       Page : array(Positive range <>) of Line :=  --  an array of arrays
  4746.                        (1 | 50  => Line'(1 | Line'Last => '+', others => '-'),
  4747.                        --  see 4.3.3
  4748.                         2 ┬╖┬╖ 49 => Line'(1 | Line'Last => '|', others => ' '));
  4749.                         -- Page is constrained by its initial value to (1┬╖┬╖50)
  4750.  
  4751.  3.6.1                         Index Constraints and Discrete Ranges 
  4752.  3.6.2                         Operations of Array Types 
  4753.  3.6.3                         String Types 
  4754.  
  4755.  
  4756. ΓòÉΓòÉΓòÉ 6.6.1. Index Constraints and Discrete Ranges ΓòÉΓòÉΓòÉ
  4757.  
  4758.    1. An index_constraint determines the range of possible values for every 
  4759.       index of an array subtype, and thereby the corresponding array bounds. 
  4760.  
  4761.             Syntax
  4762.  
  4763.          2.
  4764.  
  4765.                       index_constraint ::= (discrete_range {, discrete_range})
  4766.  
  4767.          3.
  4768.  
  4769.                       discrete_range ::= discrete_subtype_indication | range
  4770.  
  4771.   Name Resolution Rules
  4772.  
  4773.    4. The type of a discrete_range is the type of the subtype defined by the 
  4774.       subtype_indication, or the type of the range. For an index_constraint, 
  4775.       each discrete_range shall resolve to be of the type of the corresponding 
  4776.       index. 
  4777.  
  4778.             Legality Rules
  4779.  
  4780.    5. An index_constraint shall appear only in a subtype_indication whose 
  4781.       subtype_mark denotes either an unconstrained array subtype, or an 
  4782.       unconstrained access subtype whose designated subtype is an unconstrained 
  4783.       array subtype; in either case, the index_constraint shall provide a 
  4784.       discrete_range for each index of the array type. 
  4785.  
  4786.             Static Semantics
  4787.  
  4788.    6. A discrete_range defines a range whose bounds are given by the range, or 
  4789.       by the range of the subtype defined by the subtype_indication. 
  4790.  
  4791.             Dynamic Semantics
  4792.  
  4793.    7. An index_constraint is compatible with an unconstrained array subtype if 
  4794.       and only if the index range defined by each discrete_range is compatible, 
  4795.       see 3.5, with the corresponding index subtype. If any of the 
  4796.       discrete_ranges defines a null range, any array thus constrained is a 
  4797.       null array, having no components. An array value satisfies an 
  4798.       index_constraint if at each index position the array value and the 
  4799.       index_constraint have the same index bounds. 
  4800.  
  4801.    8. The elaboration of an index_constraint consists of the evaluation of the 
  4802.       discrete_range(s), in an arbitrary order. The evaluation of a 
  4803.       discrete_range consists of the elaboration of the subtype_indication or 
  4804.       the evaluation of the range. 
  4805.  
  4806.       NOTES 
  4807.  
  4808.    9. (43) The elaboration of a subtype_indication consisting of a subtype_mark 
  4809.       followed by an index_constraint checks the compatibility of the 
  4810.       index_constraint with the subtype_mark, see 3.2.2. 
  4811.  
  4812.   10. (44) Even if an array value does not satisfy the index constraint of an 
  4813.       array subtype, Constraint_Error is not raised on conversion to the array 
  4814.       subtype, so long as the length of each dimension of the array value and 
  4815.       the array subtype match (see 4.6). 
  4816.  
  4817.             Examples
  4818.  
  4819.   11. Examples of array declarations including an index constraint: 
  4820.  
  4821.         12.
  4822.  
  4823.                       Board   : Matrix(1 ┬╖┬╖ 8,  1 ┬╖┬╖ 8);  --  see 3.6
  4824.                       Rectangle : Matrix(1 ┬╖┬╖ 20, 1 ┬╖┬╖ 30);
  4825.                       Inverse  : Matrix(1 ┬╖┬╖ N,  1 ┬╖┬╖ N);  --  N need not be static
  4826.  
  4827.         13.
  4828.  
  4829.                       Filter  : Bit_Vector(0 ┬╖┬╖ 31);
  4830.  
  4831.   14. Example of array declaration with a constrained array subtype: 
  4832.  
  4833.         15.
  4834.  
  4835.                       My_Schedule : Schedule;
  4836.                       --  all arrays of type Schedule have the same bounds
  4837.  
  4838.   16. Example of record type with a component that is an array: 
  4839.  
  4840.         17.
  4841.  
  4842.                       type Var_Line(Length : Natural) is
  4843.                         record
  4844.                          Image : String(1 ┬╖┬╖ Length);
  4845.                         end record;
  4846.  
  4847.         18.
  4848.  
  4849.                       Null_Line : Var_Line(0);  --  Null_Line.Image is a null array
  4850.  
  4851.  
  4852. ΓòÉΓòÉΓòÉ 6.6.2. Operations of Array Types ΓòÉΓòÉΓòÉ
  4853.  
  4854.  
  4855.   Legality Rules
  4856.  
  4857.    1. The argument N used in the attribute_designators for the N-th dimension 
  4858.       of an array shall be a static expression of some integer type. The value 
  4859.       of N shall be positive (nonzero) and no greater than the dimensionality 
  4860.       of the array. 
  4861.  
  4862.             Static Semantics
  4863.  
  4864.    2. The following attributes are defined for a prefix A that is of an array 
  4865.       type (after any implicit dereference), or denotes a constrained array 
  4866.       subtype: 
  4867.  
  4868.    3. A'First 
  4869.  
  4870.                       A'First denotes the lower bound of the first index range; its
  4871.                       type is the corresponding index type.
  4872.  
  4873.    4. A'First(N) 
  4874.  
  4875.                       A'First(N) denotes the lower bound of the N-th index range;
  4876.                       its type is the corresponding index type.
  4877.  
  4878.    5. A'Last 
  4879.  
  4880.                       A'Last denotes the upper bound of the first index range; its
  4881.                       type is the corresponding index type.
  4882.  
  4883.    6. A'Last(N) 
  4884.  
  4885.                       A'Last(N) denotes the upper bound of the N-th index range;
  4886.                       its type is the corresponding index type.
  4887.  
  4888.    7. A'Range 
  4889.  
  4890.                       A'Range is equivalent to the range A'First ┬╖┬╖ A'Last, except
  4891.                       that the prefix A is only evaluated once.
  4892.  
  4893.    8. A'Range(N) 
  4894.  
  4895.                       A'Range(N) is equivalent to the range A'First(N) ┬╖┬╖
  4896.                       A'Last(N), except that the prefix A is only evaluated once.
  4897.  
  4898.    9. A'Length 
  4899.  
  4900.                       A'Length denotes the number of values of the first index
  4901.                       range (zero for a null range); its type is universal_integer.
  4902.  
  4903.   10. A'Length(N) 
  4904.  
  4905.                       A'Length(N) denotes the number of values of the N-th index
  4906.                       range (zero for a null range); its type is universal_integer.
  4907.  
  4908.   Implementation Advice
  4909.  
  4910.   11. An implementation should normally represent multidimensional arrays in 
  4911.       row-major order, consistent with the notation used for multidimensional 
  4912.       array aggregates, see 4.3.3. However, if a pragma Convention(Fortran, 
  4913.       ┬╖┬╖┬╖) applies to a multidimensional array type, then column-major order 
  4914.       should be used instead, see B.5: ``Interfacing with Fortran''. 
  4915.  
  4916.       NOTES 
  4917.  
  4918.   12. (45) The attribute_references A'First and A'First(1) denote the same 
  4919.       value. A similar relation exists for the attribute_references A'Last, 
  4920.       A'Range, and A'Length. The following relation is satisfied (except for a 
  4921.       null array) by the above attributes if the index type is an integer type: 
  4922.  
  4923.         13.
  4924.  
  4925.                       A'Length(N) = A'Last(N) - A'First(N) + 1
  4926.  
  4927.   14. (46) An array type is limited if its component type is limited, see 7.5. 
  4928.  
  4929.   15. (47) The predefined operations of an array type include the membership 
  4930.       tests, qualification, and explicit conversion. If the array type is not 
  4931.       limited, they also include assignment and the predefined equality 
  4932.       operators. For a one-dimensional array type, they include the predefined 
  4933.       concatenation operators (if nonlimited) and, if the component type is 
  4934.       discrete, the predefined relational operators; if the component type is 
  4935.       boolean, the predefined logical operators are also included. 
  4936.  
  4937.   16. (48) A component of an array can be named with an indexed_component. A 
  4938.       value of an array type can be specified with an array_aggregate, unless 
  4939.       the array type is limited. For a one-dimensional array type, a slice of 
  4940.       the array can be named; also, string literals are defined if the 
  4941.       component type is a character type. 
  4942.  
  4943.             Examples
  4944.  
  4945.   17. Examples (using arrays declared in the examples of subclause 3.6.1): 
  4946.  
  4947.         18.
  4948.  
  4949.                       --  Filter'First    =  0
  4950.                       --  Filter'Last     =  31
  4951.                       --  Filter'Length    =  32
  4952.                       --  Rectangle'Last(1)  =  20
  4953.                       --  Rectangle'Last(2)  =  30
  4954.  
  4955.  
  4956. ΓòÉΓòÉΓòÉ 6.6.3. String Types ΓòÉΓòÉΓòÉ
  4957.  
  4958.  
  4959.   Static Semantics
  4960.  
  4961.    1. A one-dimensional array type whose component type is a character type is 
  4962.       called a string type. 
  4963.  
  4964.    2. There are two predefined string types, String and Wide_String, each 
  4965.       indexed by values of the predefined subtype Positive; these are declared 
  4966.       in the visible part of package Standard: 
  4967.  
  4968.          3.
  4969.  
  4970.                       subtype Positive is Integer range 1 ┬╖┬╖ Integer'Last;
  4971.  
  4972.          4.
  4973.  
  4974.                       type String is array(Positive range <>) of Character;
  4975.                       type Wide_String is array(Positive range <>) of Wide_Character;
  4976.  
  4977.  NOTES 
  4978.  
  4979.    5. (49) String literals, see 2.6, and 4.2, are defined for all string types. 
  4980.       The concatenation operator & is predefined for string types, as for all 
  4981.       nonlimited one-dimensional array types. The ordering operators <, <=, >, 
  4982.       and >= are predefined for string types, as for all one-dimensional 
  4983.       discrete array types; these ordering operators correspond to 
  4984.       lexicographic order, see 4.5.2. 
  4985.  
  4986.             Examples
  4987.  
  4988.    6. Examples of string objects: 
  4989.  
  4990.          7.
  4991.  
  4992.                       Stars   : String(1 ┬╖┬╖ 120) := (1 ┬╖┬╖ 120 => '*' );
  4993.                       Question  : constant String  := "How many characters?";
  4994.                       --  Question'First = 1, Question'Last = 20
  4995.                       --  Question'Length = 20 (the number of characters)
  4996.  
  4997.          8.
  4998.  
  4999.                       Ask_Twice  : String  := Question & Question;
  5000.                       --  constrained to (1┬╖┬╖40)
  5001.                       Ninety_Six : constant Roman  := "XCVI";
  5002.                       --  see 3.5.2, and 3.6
  5003.  
  5004.  
  5005. ΓòÉΓòÉΓòÉ 6.7. Discriminants ΓòÉΓòÉΓòÉ
  5006.  
  5007.    1. A composite type (other than an array type) can have discriminants, which 
  5008.       parameterize the type. A known_discriminant_part specifies the 
  5009.       discriminants of a composite type. A discriminant of an object is a 
  5010.       component of the object, and is either of a discrete type or an access 
  5011.       type. An unknown_discriminant_part in the declaration of a partial view 
  5012.       of a type specifies that the discriminants of the type are unknown for 
  5013.       the given view; all subtypes of such a partial view are indefinite 
  5014.       subtypes. 
  5015.  
  5016.             Syntax
  5017.  
  5018.          2.
  5019.  
  5020.                       discriminant_part ::=
  5021.                         unknown_discriminant_part | known_discriminant_part
  5022.  
  5023.          3.
  5024.  
  5025.                       unknown_discriminant_part ::= (<>)
  5026.  
  5027.          4.
  5028.  
  5029.                       known_discriminant_part ::=
  5030.                         (discriminant_specification {; discriminant_specification})
  5031.  
  5032.          5.
  5033.  
  5034.                       discriminant_specification ::=
  5035.                          defining_identifier_list : subtype_mark
  5036.                           [:= default_expression]
  5037.                         | defining_identifier_list : access_definition
  5038.                           [:= default_expression]
  5039.  
  5040.          6.
  5041.  
  5042.                       default_expression ::= expression
  5043.  
  5044.   Name Resolution Rules
  5045.  
  5046.    7. The expected type for the default_expression of a 
  5047.       discriminant_specification is that of the corresponding discriminant. 
  5048.  
  5049.             Legality Rules
  5050.  
  5051.    8. A known_discriminant_part is only permitted in a declaration for a 
  5052.       composite type that is not an array type (this includes generic formal 
  5053.       types); a type declared with a known_discriminant_part is called a 
  5054.       discriminated type, as is a type that inherits (known) discriminants. 
  5055.  
  5056.    9. The subtype of a discriminant may be defined by a subtype_mark, in which 
  5057.       case the subtype_mark shall denote a discrete or access subtype, or it 
  5058.       may be defined by an access_definition (in which case the subtype_mark of 
  5059.       the access_definition may denote any kind of subtype). A discriminant 
  5060.       that is defined by an access_definition is called an access discriminant 
  5061.       and is of an anonymous general access-to-variable type whose designated 
  5062.       subtype is denoted by the subtype_mark of the access_definition. 
  5063.  
  5064.   10. A discriminant_specification for an access discriminant shall appear only 
  5065.       in the declaration for a task or protected type, or for a type with the 
  5066.       reserved word limited in its (full) definition or in that of one of its 
  5067.       ancestors. In addition to the places where Legality Rules normally apply, 
  5068.       see 12.3, this rule applies also in the private part of an instance of a 
  5069.       generic unit. 
  5070.  
  5071.   11. Default_expressions shall be provided either for all or for none of the 
  5072.       discriminants of a known_discriminant_part. No default_expressions are 
  5073.       permitted in a known_discriminant_part in a declaration of a tagged type 
  5074.       or a generic formal type. 
  5075.  
  5076.   12. For a type defined by a derived_type_definition, if a 
  5077.       known_discriminant_part is provided in its declaration, then: 
  5078.  
  5079.         a. The parent subtype shall be constrained; 
  5080.  
  5081.         b. If the parent type is not a tagged type, then each discriminant of 
  5082.            the derived type shall be used in the constraint defining the parent 
  5083.            subtype; 
  5084.  
  5085.         c. If a discriminant is used in the constraint defining the parent 
  5086.            subtype, the subtype of the discriminant shall be statically 
  5087.            compatible (see 4.9.1) with the subtype of the corresponding parent 
  5088.            discriminant. 
  5089.  
  5090.    1. The type of the default_expression, if any, for an access discriminant 
  5091.       shall be convertible to the anonymous access type of the discriminant 
  5092.       (see 4.6). 
  5093.  
  5094.             Static Semantics
  5095.  
  5096.    2. A discriminant_specification declares a discriminant; the subtype_mark 
  5097.       denotes its subtype unless it is an access discriminant, in which case 
  5098.       the discriminant's subtype is the anonymous access-to-variable subtype 
  5099.       defined by the access_definition. 
  5100.  
  5101.    3. For a type defined by a derived_type_definition, each discriminant of the 
  5102.       parent type is either inherited, constrained to equal some new 
  5103.       discriminant of the derived type, or constrained to the value of an 
  5104.       expression. When inherited or constrained to equal some new discriminant, 
  5105.       the parent discriminant and the discriminant of the derived type are said 
  5106.       to correspond. Two discriminants also correspond if there is some common 
  5107.       discriminant to which they both correspond. A discriminant corresponds to 
  5108.       itself as well. If a discriminant of a parent type is constrained to a 
  5109.       specific value by a derived_type_definition, then that discriminant is 
  5110.       said to be specified by that derived_type_definition. 
  5111.  
  5112.    4. A constraint that appears within the definition of a discriminated type 
  5113.       depends on a discriminant of the type if it names the discriminant as a 
  5114.       bound or discriminant value. A component_definition depends on a 
  5115.       discriminant if its constraint depends on the discriminant, or on a 
  5116.       discriminant that corresponds to it. 
  5117.  
  5118.    5. A component depends on a discriminant if: 
  5119.  
  5120.         a. Its component_definition depends on the discriminant; or 
  5121.  
  5122.         b. It is declared in a variant_part that is governed by the 
  5123.            discriminant; or 
  5124.  
  5125.         c. It is a component inherited as part of a derived_type_definition, 
  5126.            and the constraint of the parent_subtype_indication depends on the 
  5127.            discriminant; or 
  5128.  
  5129.         d. It is a subcomponent of a component that depends on the 
  5130.            discriminant. 
  5131.  
  5132.    1. Each value of a discriminated type includes a value for each component of 
  5133.       the type that does not depend on a discriminant; this includes the 
  5134.       discriminants themselves. The values of discriminants determine which 
  5135.       other component values are present in the value of the discriminated 
  5136.       type. 
  5137.  
  5138.    2. A type declared with a known_discriminant_part is said to have known 
  5139.       discriminants; its first subtype is unconstrained. A type declared with 
  5140.       an unknown_discriminant_part is said to have unknown discriminants. A 
  5141.       type declared without a discriminant_part has no discriminants, unless it 
  5142.       is a derived type; if derived, such a type has the same sort of 
  5143.       discriminants (known, unknown, or none) as its parent (or ancestor) type. 
  5144.       A tagged class-wide type also has unknown discriminants. Any subtype of a 
  5145.       type with unknown discriminants is an unconstrained and indefinite 
  5146.       subtype, see 3.2, and 3.3. 
  5147.  
  5148.             Dynamic Semantics
  5149.  
  5150.    3. An access_definition is elaborated when the value of a corresponding 
  5151.       access discriminant is defined, either by evaluation of its 
  5152.       default_expression or by elaboration of a discriminant_constraint. The 
  5153.       elaboration of an access_definition creates the anonymous access type. 
  5154.       When the expression defining the access discriminant is evaluated, it is 
  5155.       converted to this anonymous access type, see 4.6. 
  5156.  
  5157.       NOTES 
  5158.  
  5159.    4. (50) If a discriminated type has default_expressions for its 
  5160.       discriminants, then unconstrained variables of the type are permitted, 
  5161.       and the values of the discriminants can be changed by an assignment to 
  5162.       such a variable. If defaults are not provided for the discriminants, then 
  5163.       all variables of the type are constrained, either by explicit constraint 
  5164.       or by their initial value; the values of the discriminants of such a 
  5165.       variable cannot be changed after initialization. 
  5166.  
  5167.    5. (51) The default_expression for a discriminant of a type is evaluated 
  5168.       when an object of an unconstrained subtype of the type is created. 
  5169.  
  5170.    6. (52) Assignment to a discriminant of an object (after its initialization) 
  5171.       is not allowed, since the name of a discriminant is a constant; neither 
  5172.       assignment_statements nor assignments inherent in passing as an in out or 
  5173.       out parameter are allowed. Note however that the value of a discriminant 
  5174.       can be changed by assigning to the enclosing object, presuming it is an 
  5175.       unconstrained variable. 
  5176.  
  5177.    7. (53) A discriminant that is of a named access type is not called an 
  5178.       access discriminant; that term is used only for discriminants defined by 
  5179.       an access_definition. 
  5180.  
  5181.             Examples
  5182.  
  5183.    8. Examples of discriminated types: 
  5184.  
  5185.          9.
  5186.  
  5187.                       type Buffer(Size : Buffer_Size := 100) is  --  see 3.5.4
  5188.                         record
  5189.                          Pos  : Buffer_Size := 0;
  5190.                          Value : String(1 ┬╖┬╖ Size);
  5191.                         end record;
  5192.  
  5193.         10.
  5194.  
  5195.                       type Matrix_Rec(Rows, Columns : Integer) is
  5196.                         record
  5197.                          Mat : Matrix(1 ┬╖┬╖ Rows, 1 ┬╖┬╖ Columns);  --  see 3.6
  5198.                         end record;
  5199.  
  5200.         11.
  5201.  
  5202.                       type Square(Side : Integer) is new
  5203.                        Matrix_Rec(Rows => Side, Columns => Side);
  5204.  
  5205.         12.
  5206.  
  5207.                       type Double_Square(Number : Integer) is
  5208.                         record
  5209.                          Left  : Square(Number);
  5210.                          Right : Square(Number);
  5211.                         end record;
  5212.  
  5213.                       type Item(Number : Positive) is
  5214.                         record
  5215.                          Content : Integer;
  5216.                          --  no component depends on the discriminant
  5217.                         end record;
  5218.  
  5219.  3.7.1                         Discriminant Constraints 
  5220.  3.7.2                         Operations of Discriminated Types 
  5221.  
  5222.  
  5223. ΓòÉΓòÉΓòÉ 6.7.1. Discriminant Constraints ΓòÉΓòÉΓòÉ
  5224.  
  5225.    1. A discriminant_constraint specifies the values of the discriminants for a 
  5226.       given discriminated type. 
  5227.  
  5228.             Syntax
  5229.  
  5230.          2.
  5231.  
  5232.                       discriminant_constraint ::=
  5233.                         (discriminant_association {, discriminant_association})
  5234.  
  5235.          3.
  5236.  
  5237.                       discriminant_association ::=
  5238.                         [discriminant_selector_name
  5239.                          {| discriminant_selector_name} =>] expression
  5240.  
  5241.         a. A discriminant_association is said to be named if it has one or more 
  5242.            discriminant_selector_names; it is otherwise said to be positional. 
  5243.            In a discriminant_constraint, any positional associations shall 
  5244.            precede any named associations. 
  5245.  
  5246.   Name Resolution Rules
  5247.  
  5248.    1. Each selector_name of a named discriminant_association shall resolve to 
  5249.       denote a discriminant of the subtype being constrained; the discriminants 
  5250.       so named are the associated discriminants of the named association. For a 
  5251.       positional association, the associated discriminant is the one whose 
  5252.       discriminant_specification occurred in the corresponding position in the 
  5253.       known_discriminant_part that defined the discriminants of the subtype 
  5254.       being constrained. 
  5255.  
  5256.    2. The expected type for the expression in a discriminant_association is 
  5257.       that of the associated discriminant(s). 
  5258.  
  5259.             Legality Rules
  5260.  
  5261.    3. A discriminant_constraint is only allowed in a subtype_indication whose 
  5262.       subtype_mark denotes either an unconstrained discriminated subtype, or an 
  5263.       unconstrained access subtype whose designated subtype is an unconstrained 
  5264.       discriminated subtype. 
  5265.  
  5266.    4. A named discriminant_association with more than one selector_name is 
  5267.       allowed only if the named discriminants are all of the same type. A 
  5268.       discriminant_constraint shall provide exactly one value for each 
  5269.       discriminant of the subtype being constrained. 
  5270.  
  5271.    5. The expression associated with an access discriminant shall be of a type 
  5272.       convertible to the anonymous access type. 
  5273.  
  5274.             Dynamic Semantics
  5275.  
  5276.    6. A discriminant_constraint is compatible with an unconstrained 
  5277.       discriminated subtype if each discriminant value belongs to the subtype 
  5278.       of the corresponding discriminant. 
  5279.  
  5280.    7. A composite value satisfies a discriminant constraint if and only if each 
  5281.       discriminant of the composite value has the value imposed by the 
  5282.       discriminant constraint. 
  5283.  
  5284.    8. For the elaboration of a discriminant_constraint, the expressions in the 
  5285.       discriminant_associations are evaluated in an arbitrary order and 
  5286.       converted to the type of the associated discriminant (which might raise 
  5287.       Constraint_Error --  see 4.6.); the expression of a named association is 
  5288.       evaluated (and converted) once for each associated discriminant. The 
  5289.       result of each evaluation and conversion is the value imposed by the 
  5290.       constraint for the associated discriminant. 
  5291.  
  5292.       NOTES 
  5293.  
  5294.    9. (54) The rules of the language ensure that a discriminant of an object 
  5295.       always has a value, either from explicit or implicit initialization. 
  5296.  
  5297.             Examples
  5298.  
  5299.   10. Examples (using types declared above in clause 3.7): 
  5300.  
  5301.         11.
  5302.  
  5303.                       Large  : Buffer(200);  --  constrained, always 200 characters
  5304.                                   --  (explicit discriminant value)
  5305.                       Message : Buffer;    --  unconstrained, initially 100 characters
  5306.                                   --  (default discriminant value)
  5307.                       Basis  : Square(5);   --  constrained, always 5 by 5
  5308.                       Illegal : Square;    --  illegal, a Square has to be constrained
  5309.  
  5310.  
  5311. ΓòÉΓòÉΓòÉ 6.7.2. Operations of Discriminated Types ΓòÉΓòÉΓòÉ
  5312.  
  5313.    1. If a discriminated type has default_expressions for its discriminants, 
  5314.       then unconstrained variables of the type are permitted, and the 
  5315.       discriminants of such a variable can be changed by assignment to the 
  5316.       variable. For a formal parameter of such a type, an attribute is provided 
  5317.       to determine whether the corresponding actual parameter is constrained or 
  5318.       unconstrained. 
  5319.  
  5320.             Static Semantics
  5321.  
  5322.    2. For a prefix A that is of a discriminated type (after any implicit 
  5323.       dereference), the following attribute is defined: 
  5324.  
  5325.    3. A'Constrained 
  5326.  
  5327.                       Yields the value True if A denotes a constant, a value, or a
  5328.                       constrained variable, and False otherwise.
  5329.  
  5330.   Erroneous Execution
  5331.  
  5332.    4. The execution of a construct is erroneous if the construct has a 
  5333.       constituent that is a name denoting a subcomponent that depends on 
  5334.       discriminants, and the value of any of these discriminants is changed by 
  5335.       this execution between evaluating the name and the last use (within this 
  5336.       execution) of the subcomponent denoted by the name. 
  5337.  
  5338.  
  5339. ΓòÉΓòÉΓòÉ 6.8. Record Types ΓòÉΓòÉΓòÉ
  5340.  
  5341.    1. A record object is a composite object consisting of named components. The 
  5342.       value of a record object is a composite value consisting of the values of 
  5343.       the components. 
  5344.  
  5345.             Syntax
  5346.  
  5347.          2.
  5348.  
  5349.                       record_type_definition ::=
  5350.                         [[abstract] tagged] [limited] record_definition
  5351.  
  5352.          3.
  5353.  
  5354.                       record_definition ::=
  5355.                          record
  5356.                           component_list
  5357.                          end record
  5358.                         | null record
  5359.  
  5360.          4.
  5361.  
  5362.                       component_list ::=
  5363.                          component_item {component_item}
  5364.                         | {component_item} variant_part
  5365.                         |  null;
  5366.  
  5367.          5.
  5368.  
  5369.                       component_item ::= component_declaration | representation_clause
  5370.  
  5371.          6.
  5372.  
  5373.                       component_declaration ::=
  5374.                         defining_identifier_list : component_definition
  5375.                          [:= default_expression];
  5376.  
  5377.   Name Resolution Rules
  5378.  
  5379.    7. The expected type for the default_expression, if any, in a 
  5380.       component_declaration is the type of the component. 
  5381.  
  5382.             Legality Rules
  5383.  
  5384.    8. A default_expression is not permitted if the component is of a limited 
  5385.       type. 
  5386.  
  5387.    9. Each component_declaration declares a component of the record type. 
  5388.       Besides components declared by component_declarations, the components of 
  5389.       a record type include any components declared by 
  5390.       discriminant_specifications of the record type declaration. The 
  5391.       identifiers of all components of a record type shall be distinct. 
  5392.  
  5393.   10. Within a type_declaration, a name that denotes a component, protected 
  5394.       subprogram, or entry of the type is allowed only in the following cases: 
  5395.  
  5396.         a. A name that denotes any component, protected subprogram, or entry is 
  5397.            allowed within a representation item that occurs within the 
  5398.            declaration of the composite type. 
  5399.  
  5400.         b. A name that denotes a noninherited discriminant is allowed within 
  5401.            the declaration of the type, but not within the discriminant_part. 
  5402.            If the discriminant is used to define the constraint of a component, 
  5403.            the bounds of an entry family, or the constraint of the parent 
  5404.            subtype in a derived_type_definition then its name shall appear 
  5405.            alone as a direct_name (not as part of a larger expression or 
  5406.            expanded name). A discriminant shall not be used to define the 
  5407.            constraint of a scalar component. 
  5408.  
  5409.    1. If the name of the current instance of a type, see 8.6, is used to define 
  5410.       the constraint of a component, then it shall appear as a direct_name that 
  5411.       is the prefix of an attribute_reference whose result is of an access 
  5412.       type, and the attribute_reference shall appear alone. 
  5413.  
  5414.             Static Semantics
  5415.  
  5416.    2. The component_definition of a component_declaration defines the (nominal) 
  5417.       subtype of the component. If the reserved word aliased appears in the 
  5418.       component_definition, then the component is aliased, see 3.10. 
  5419.  
  5420.    3. If the component_list of a record type is defined by the reserved word 
  5421.       null and there are no discriminants, then the record type has no 
  5422.       components and all records of the type are null records. A 
  5423.       record_definition of null record is equivalent to record null; end 
  5424.       record. 
  5425.  
  5426.             Dynamic Semantics
  5427.  
  5428.    4. The elaboration of a record_type_definition creates the record type and 
  5429.       its first subtype, and consists of the elaboration of the 
  5430.       record_definition. The elaboration of a record_definition consists of the 
  5431.       elaboration of its component_list, if any. 
  5432.  
  5433.    5. The elaboration of a component_list consists of the elaboration of the 
  5434.       component_items and variant_part, if any, in the order in which they 
  5435.       appear. The elaboration of a component_declaration consists of the 
  5436.       elaboration of the component_definition. 
  5437.  
  5438.    6. Within the definition of a composite type, if a component_definition or 
  5439.       discrete_subtype_definition, see 9.5.2, includes a name that denotes a 
  5440.       discriminant of the type, or that is an attribute_reference whose prefix 
  5441.       denotes the current instance of the type, the expression containing the 
  5442.       name is called a per-object expression, and the constraint being defined 
  5443.       is called a per-object constraint. For the elaboration of a 
  5444.       component_definition of a component_declaration, if the constraint of the 
  5445.       subtype_indication is not a per-object constraint, then the 
  5446.       subtype_indication is elaborated. On the other hand, if the constraint is 
  5447.       a per-object constraint, then the elaboration consists of the evaluation 
  5448.       of any included expression that is not part of a per-object expression. 
  5449.  
  5450.       NOTES 
  5451.  
  5452.    7. (55) A component_declaration with several identifiers is equivalent to a 
  5453.       sequence of single component_declarations, as explained in 3.3.1. 
  5454.  
  5455.    8. (56) The default_expression of a record component is only evaluated upon 
  5456.       the creation of a default-initialized object of the record type 
  5457.       (presuming the object has the component, if it is in a variant_part -- 
  5458.       see 3.3.1). 
  5459.  
  5460.    9. (57) The subtype defined by a component_definition, see 3.6, has to be a 
  5461.       definite subtype. 
  5462.  
  5463.   10. (58) If a record type does not have a variant_part, then the same 
  5464.       components are present in all values of the type. 
  5465.  
  5466.   11. (59) A record type is limited if it has the reserved word limited in its 
  5467.       definition, or if any of its components are limited, see 7.5. 
  5468.  
  5469.   12. (60) The predefined operations of a record type include membership tests, 
  5470.       qualification, and explicit conversion. If the record type is nonlimited, 
  5471.       they also include assignment and the predefined equality operators. 
  5472.  
  5473.   13. (61) A component of a record can be named with a selected_component. A 
  5474.       value of a record can be specified with a record_aggregate, unless the 
  5475.       record type is limited. 
  5476.  
  5477.             Examples
  5478.  
  5479.   14. Examples of record type declarations: 
  5480.  
  5481.         15.
  5482.  
  5483.                       type Date is
  5484.                         record
  5485.                          Day  : Integer range 1 ┬╖┬╖ 31;
  5486.                          Month : Month_Name;
  5487.                          Year  : Integer range 0 ┬╖┬╖ 4000;
  5488.                         end record;
  5489.  
  5490.         16.
  5491.  
  5492.                       type Complex is
  5493.                         record
  5494.                          Re : Real := 0.0;
  5495.                          Im : Real := 0.0;
  5496.                         end record;
  5497.  
  5498.   17. Examples of record variables: 
  5499.  
  5500.         18.
  5501.  
  5502.                       Tomorrow, Yesterday : Date;
  5503.                       A, B, C : Complex;
  5504.  
  5505.         19.
  5506.  
  5507.                       -- both components of A, B, and C are implicitly initialized to zero
  5508.  
  5509.  3.8.1                         Variant Parts and Discrete Choices 
  5510.  
  5511.  
  5512. ΓòÉΓòÉΓòÉ 6.8.1. Variant Parts and Discrete Choices ΓòÉΓòÉΓòÉ
  5513.  
  5514.    1. A record type with a variant_part specifies alternative lists of 
  5515.       components. Each variant defines the components for the value or values 
  5516.       of the discriminant covered by its discrete_choice_list. 
  5517.  
  5518.             Syntax
  5519.  
  5520.          2.
  5521.  
  5522.                       variant_part ::=
  5523.                         case discriminant_direct_name is
  5524.                          variant
  5525.                          {variant}
  5526.                         end case;
  5527.  
  5528.          3.
  5529.  
  5530.                       variant ::=
  5531.                         when discrete_choice_list =>
  5532.                          component_list
  5533.  
  5534.          4.
  5535.  
  5536.                       discrete_choice_list ::= discrete_choice {| discrete_choice}
  5537.  
  5538.          5.
  5539.  
  5540.                       discrete_choice ::= expression | discrete_range | others
  5541.  
  5542.   Name Resolution Rules
  5543.  
  5544.    6. The discriminant_direct_name shall resolve to denote a discriminant 
  5545.       (called the discriminant of the variant_part) specified in the 
  5546.       known_discriminant_part of the full_type_declaration that contains the 
  5547.       variant_part. The expected type for each discrete_choice in a variant is 
  5548.       the type of the discriminant of the variant_part. 
  5549.  
  5550.             Legality Rules
  5551.  
  5552.    7. The discriminant of the variant_part shall be of a discrete type. 
  5553.  
  5554.    8. The expressions and discrete_ranges given as discrete_choices in a 
  5555.       variant_part shall be static. The discrete_choice others shall appear 
  5556.       alone in a discrete_choice_list, and such a discrete_choice_list, if it 
  5557.       appears, shall be the last one in the enclosing construct. 
  5558.  
  5559.    9. A discrete_choice is defined to cover a value in the following cases: 
  5560.  
  5561.         a. A discrete_choice that is an expression covers a value if the value 
  5562.            equals the value of the expression converted to the expected type. 
  5563.  
  5564.         b. A discrete_choice that is a discrete_range covers all values 
  5565.            (possibly none) that belong to the range. 
  5566.  
  5567.         c. The discrete_choice others covers all values of its expected type 
  5568.            that are not covered by previous discrete_choice_lists of the same 
  5569.            construct. 
  5570.  
  5571.    1. A discrete_choice_list covers a value if one of its discrete_choices 
  5572.       covers the value. 
  5573.  
  5574.    2. The possible values of the discriminant of a variant_part shall be 
  5575.       covered as follows: 
  5576.  
  5577.         a. If the discriminant is of a static constrained scalar subtype, then 
  5578.            each non-others discrete_choice shall cover only values in that 
  5579.            subtype, and each value of that subtype shall be covered by some 
  5580.            discrete_choice (either explicitly or by others); 
  5581.  
  5582.         b. If the type of the discriminant is a descendant of a generic formal 
  5583.            scalar type then the variant_part shall have an others 
  5584.            discrete_choice; 
  5585.  
  5586.         c. Otherwise, each value of the base range of the type of the 
  5587.            discriminant shall be covered (either explicitly or by others). 
  5588.  
  5589.    1. Two distinct discrete_choices of a variant_part shall not cover the same 
  5590.       value. 
  5591.  
  5592.             Static Semantics
  5593.  
  5594.    2. If the component_list of a variant is specified by null, the variant has 
  5595.       no components. 
  5596.  
  5597.    3. The discriminant of a variant_part is said to govern the variant_part and 
  5598.       its variants. In addition, the discriminant of a derived type governs a 
  5599.       variant_part and its variants if it corresponds, see 3.7, to the 
  5600.       discriminant of the variant_part. 
  5601.  
  5602.             Dynamic Semantics
  5603.  
  5604.    4. A record value contains the values of the components of a particular 
  5605.       variant only if the value of the discriminant governing the variant is 
  5606.       covered by the discrete_choice_list of the variant. This rule applies in 
  5607.       turn to any further variant that is, itself, included in the 
  5608.       component_list of the given variant. 
  5609.  
  5610.    5. The elaboration of a variant_part consists of the elaboration of the 
  5611.       component_list of each variant in the order in which they appear. 
  5612.  
  5613.             Examples
  5614.  
  5615.    6. Example of record type with a variant part: 
  5616.  
  5617.          7.
  5618.  
  5619.                       type Device is (Printer, Disk, Drum);
  5620.                       type State  is (Open, Closed);
  5621.  
  5622.          8.
  5623.  
  5624.                       type Peripheral(Unit : Device := Disk) is
  5625.                         record
  5626.                          Status : State;
  5627.                          case Unit is
  5628.                            when Printer =>
  5629.                             Line_Count : Integer range 1 ┬╖┬╖ Page_Size;
  5630.                            when others =>
  5631.                             Cylinder  : Cylinder_Index;
  5632.                             Track    : Track_Number;
  5633.                            end case;
  5634.                          end record;
  5635.  
  5636.    9. Examples of record subtypes: 
  5637.  
  5638.         10.
  5639.  
  5640.                       subtype Drum_Unit is Peripheral(Drum);
  5641.                       subtype Disk_Unit is Peripheral(Disk);
  5642.  
  5643.   11. Examples of constrained record variables: 
  5644.  
  5645.         12.
  5646.  
  5647.                       Writer  : Peripheral(Unit  => Printer);
  5648.                       Archive  : Disk_Unit;
  5649.  
  5650.  
  5651. ΓòÉΓòÉΓòÉ 6.9. Tagged Types and Type Extensions ΓòÉΓòÉΓòÉ
  5652.  
  5653.    1. Tagged types and type extensions support object-oriented programming, 
  5654.       based on inheritance with extension and run-time polymorphism via 
  5655.       dispatching operations. 
  5656.  
  5657.             Static Semantics
  5658.  
  5659.    2. A record type or private type that has the reserved word tagged in its 
  5660.       declaration is called a tagged type. When deriving from a tagged type, 
  5661.       additional components may be defined. As for any derived type, additional 
  5662.       primitive subprograms may be defined, and inherited primitive subprograms 
  5663.       may be overridden. The derived type is called an extension of the 
  5664.       ancestor type, or simply a type extension. Every type extension is also a 
  5665.       tagged type, and is either a record extension or a private extension of 
  5666.       some other tagged type. A record extension is defined by a 
  5667.       derived_type_definition with a record_extension_part. A private 
  5668.       extension, which is a partial view of a record extension, can be declared 
  5669.       in the visible part of a package, see 7.3, or in a generic formal part, 
  5670.       see 12.5.1. 
  5671.  
  5672.    3. An object of a tagged type has an associated (run-time) tag that 
  5673.       identifies the specific tagged type used to create the object originally. 
  5674.       The tag of an operand of a class-wide tagged type T'Class controls which 
  5675.       subprogram body is to be executed when a primitive subprogram of type T 
  5676.       is applied to the operand, see 3.9.2, using a tag to control which body 
  5677.       to execute is called dispatching. 
  5678.  
  5679.    4. The tag of a specific tagged type identifies the full_type_declaration of 
  5680.       the type. If a declaration for a tagged type occurs within a 
  5681.       generic_package_declaration, then the corresponding type declarations in 
  5682.       distinct instances of the generic package are associated with distinct 
  5683.       tags. For a tagged type that is local to a generic package body, the 
  5684.       language does not specify whether repeated instantiations of the generic 
  5685.       body result in distinct tags. 
  5686.  
  5687.    5. The following language-defined library package exists: 
  5688.  
  5689.          6.
  5690.  
  5691.                       package Ada.Tags is
  5692.                         type Tag is private;
  5693.  
  5694.          7.
  5695.  
  5696.                          function Expanded_Name(T : Tag) return String;
  5697.                         function External_Tag(T : Tag) return String;
  5698.                         function Internal_Tag(External : String) return Tag;
  5699.  
  5700.          8.
  5701.  
  5702.                          Tag_Error : exception;
  5703.  
  5704.          9.
  5705.  
  5706.                       private
  5707.                         ┬╖┬╖┬╖ -- not specified by the language
  5708.                       end Ada.Tags;
  5709.  
  5710.   10. The function Expanded_Name returns the full expanded name of the first 
  5711.       subtype of the specific type identified by the tag, in upper case, 
  5712.       starting with a root library unit. The result is implementation defined 
  5713.       if the type is declared within an unnamed block_statement. 
  5714.  
  5715.   11. The function External_Tag returns a string to be used in an external 
  5716.       representation for the given tag. The call External_Tag(S'Tag) is 
  5717.       equivalent to the attribute_reference S'External_Tag, see 13.3. 
  5718.  
  5719.   12. The function Internal_Tag returns the tag that corresponds to the given 
  5720.       external tag, or raises Tag_Error if the given string is not the external 
  5721.       tag for any specific type of the partition. 
  5722.  
  5723.   13. For every subtype S of a tagged type T (specific or class-wide), the 
  5724.       following attributes are defined: 
  5725.  
  5726.   14. S'Class 
  5727.  
  5728.                       S'Class denotes a subtype of the class-wide type (called
  5729.                       T'Class in this International Standard) for the class rooted
  5730.                       at T (or if S already denotes a class-wide subtype, then
  5731.                       S'Class is the same as S).
  5732.  
  5733.         a. S'Class is unconstrained. However, if S is constrained, then the 
  5734.            values of S'Class are only those that when converted to the type T 
  5735.            belong to S. 
  5736.  
  5737.    1. S'Tag 
  5738.  
  5739.                       S'Tag denotes the tag of the type T (or if T is class-wide,
  5740.                       the tag of the root type of the corresponding class). The
  5741.                       value of this attribute is of type Tag.
  5742.  
  5743.    2. Given a prefix X that is of a class-wide tagged type (after any implicit 
  5744.       dereference), the following attribute is defined: 
  5745.  
  5746.    3. X'Tag 
  5747.  
  5748.                       X'Tag denotes the tag of X. The value of this attribute is of
  5749.                       type Tag.
  5750.  
  5751.   Dynamic Semantics
  5752.  
  5753.    4. The tag associated with an object of a tagged type is determined as 
  5754.       follows: 
  5755.  
  5756.         a. The tag of a stand-alone object, a component, or an aggregate of a 
  5757.            specific tagged type T identifies T. 
  5758.  
  5759.         b. The tag of an object created by an allocator for an access type with 
  5760.            a specific designated tagged type T, identifies T. 
  5761.  
  5762.         c. The tag of an object of a class-wide tagged type is that of its 
  5763.            initialization expression. 
  5764.  
  5765.         d. The tag of the result returned by a function whose result type is a 
  5766.            specific tagged type T identifies T. 
  5767.  
  5768.         e. The tag of the result returned by a function with a class-wide 
  5769.            result type is that of the return expression. 
  5770.  
  5771.    1. The tag is preserved by type conversion and by parameter passing. The tag 
  5772.       of a value is the tag of the associated object, see 6.2. 
  5773.  
  5774.             Implementation Permissions
  5775.  
  5776.    2. The implementation of the functions in Ada.Tags may raise Tag_Error if no 
  5777.       specific type corresponding to the tag passed as a parameter exists in 
  5778.       the partition at the time the function is called. 
  5779.  
  5780.       NOTES 
  5781.  
  5782.    3. (62) A type declared with the reserved word tagged should normally be 
  5783.       declared in a package_specification, so that new primitive subprograms 
  5784.       can be declared for it. 
  5785.  
  5786.    4. (63) Once an object has been created, its tag never changes. 
  5787.  
  5788.    5. (64) Class-wide types are defined to have unknown discriminants (see 
  5789.       3.7). This means that objects of a class-wide type have to be explicitly 
  5790.       initialized (whether created by an object_declaration or an allocator), 
  5791.       and that aggregates have to be explicitly qualified with a specific type 
  5792.       when their expected type is class-wide. 
  5793.  
  5794.    6. (65) If S denotes an untagged private type whose full type is tagged, 
  5795.       then S'Class is also allowed before the full type definition, but only in 
  5796.       the private part of the package in which the type is declared (see 
  5797.       7.3.1). Similarly, the Class attribute is defined for incomplete types 
  5798.       whose full type is tagged, but only within the library unit in which the 
  5799.       incomplete type is declared, see 3.10.1. 
  5800.  
  5801.             Examples
  5802.  
  5803.    7. Examples of tagged record types: 
  5804.  
  5805.          8.
  5806.  
  5807.                       type Point is tagged
  5808.                        record
  5809.                         X, Y : Real := 0.0;
  5810.                        end record;
  5811.  
  5812.          9.
  5813.  
  5814.                       type Expression is tagged null record;
  5815.                        -- Components will be added by each extension
  5816.  
  5817.  3.9.1                         Type Extensions 
  5818.  3.9.2                         Dispatching Operations of Tagged Types 
  5819.  3.9.3                         Abstract Types and Subprograms 
  5820.  
  5821.  
  5822. ΓòÉΓòÉΓòÉ 6.9.1. Type Extensions ΓòÉΓòÉΓòÉ
  5823.  
  5824.    1. Every type extension is a tagged type, and is either a record extension 
  5825.       or a private extension of some other tagged type. 
  5826.  
  5827.             Syntax
  5828.  
  5829.          2.
  5830.  
  5831.                       record_extension_part ::= with record_definition
  5832.  
  5833.   Legality Rules
  5834.  
  5835.    3. The parent type of a record extension shall not be a class-wide type. If 
  5836.       the parent type is nonlimited, then each of the components of the 
  5837.       record_extension_part shall be nonlimited. The accessibility level (see 
  5838.       3.10.2) of a record extension shall not be statically deeper than that of 
  5839.       its parent type. In addition to the places where Legality Rules normally 
  5840.       apply, see 12.3, these rules apply also in the private part of an 
  5841.       instance of a generic unit. 
  5842.  
  5843.    4. A type extension shall not be declared in a generic body if the parent 
  5844.       type is declared outside that body. 
  5845.  
  5846.             Dynamic Semantics
  5847.  
  5848.    5. The elaboration of a record_extension_part consists of the elaboration of 
  5849.       the record_definition. 
  5850.  
  5851.       NOTES 
  5852.  
  5853.    6. (66) The term ``type extension'' refers to a type as a whole. The term 
  5854.       ``extension part'' refers to the piece of text that defines the 
  5855.       additional components (if any) the type extension has relative to its 
  5856.       specified ancestor type. 
  5857.  
  5858.    7. (67) The accessibility rules imply that a tagged type declared in a 
  5859.       library package_specification can be extended only at library level or as 
  5860.       a generic formal. When the extension is declared immediately within a 
  5861.       package_body, primitive subprograms are inherited and are overridable, 
  5862.       but new primitive subprograms cannot be added. 
  5863.  
  5864.    8. (68) A name that denotes a component (including a discriminant) of the 
  5865.       parent type is not allowed within the record_extension_part. Similarly, a 
  5866.       name that denotes a component defined within the record_extension_part is 
  5867.       not allowed within the record_extension_part. It is permissible to use a 
  5868.       name that denotes a discriminant of the record extension, providing there 
  5869.       is a new known_discriminant_part in the enclosing type declaration. (The 
  5870.       full rule is given in 3.8.) 
  5871.  
  5872.    9. (69) Each visible component of a record extension has to have a unique 
  5873.       name, whether the component is (visibly) inherited from the parent type 
  5874.       or declared in the record_extension_part, see 8.3. 
  5875.  
  5876.             Examples
  5877.  
  5878.   10. Examples of record extensions (of types defined above in 3.9.): 
  5879.  
  5880.         11.
  5881.  
  5882.                       type Painted_Point is new Point with
  5883.                        record
  5884.                         Paint : Color := White;
  5885.                        end record;
  5886.                         -- Components X and Y are inherited
  5887.  
  5888.         12.
  5889.  
  5890.                       Origin : constant Painted_Point := (X | Y => 0.0, Paint => Black);
  5891.  
  5892.         13.
  5893.  
  5894.                       type Literal is new Expression with
  5895.                        record         -- a leaf in an Expression tree
  5896.                         Value : Real;
  5897.                        end record;
  5898.  
  5899.         14.
  5900.  
  5901.                       type Expr_Ptr is access all Expression'Class;
  5902.                       --  see 3.10
  5903.  
  5904.         15.
  5905.  
  5906.                       type Binary_Operation is new Expression with
  5907.                        record    -- an internal node in an Expression tree
  5908.                         Left, Right : Expr_Ptr;
  5909.                        end record;
  5910.  
  5911.         16.
  5912.  
  5913.                       type Addition is new Binary_Operation with null record;
  5914.                       type Subtraction is new Binary_Operation with null record;
  5915.                       -- No additional components needed for these extensions
  5916.  
  5917.         17.
  5918.  
  5919.                       Tree : Expr_Ptr :=  -- A tree representation of ``5.0 + (13.0-7.0)''
  5920.                         new Addition'(
  5921.                          Left  => new Literal'(Value => 5.0),
  5922.                          Right => new Subtraction'(
  5923.                            Left  => new Literal'(Value => 13.0),
  5924.                            Right => new Literal'(Value => 7.0)));
  5925.  
  5926.  
  5927. ΓòÉΓòÉΓòÉ 6.9.2. Dispatching Operations of Tagged Types ΓòÉΓòÉΓòÉ
  5928.  
  5929.    1. The primitive subprograms of a tagged type are called dispatching 
  5930.       operations. A dispatching operation can be called using a statically 
  5931.       determined controlling tag, in which case the body to be executed is 
  5932.       determined at compile time. Alternatively, the controlling tag can be 
  5933.       dynamically determined, in which case the call dispatches to a body that 
  5934.       is determined at run time; such a call is termed a dispatching call. As 
  5935.       explained below, the properties of the operands and the context of a 
  5936.       particular call on a dispatching operation determine how the controlling 
  5937.       tag is determined, and hence whether or not the call is a dispatching 
  5938.       call. Run-time polymorphism is achieved when a dispatching operation is 
  5939.       called by a dispatching call. 
  5940.  
  5941.             Static Semantics
  5942.  
  5943.    2. A call on a dispatching operation is a call whose name or prefix denotes 
  5944.       the declaration of a primitive subprogram of a tagged type, that is, a 
  5945.       dispatching operation. A controlling operand in a call on a dispatching 
  5946.       operation of a tagged type T is one whose corresponding formal parameter 
  5947.       is of type T or is of an anonymous access type with designated type T; 
  5948.       the corresponding formal parameter is called a controlling formal 
  5949.       parameter. If the controlling formal parameter is an access parameter, 
  5950.       the controlling operand is the object designated by the actual parameter, 
  5951.       rather than the actual parameter itself. If the call is to a (primitive) 
  5952.       function with result type T, then the call has a controlling result -- 
  5953.       the context of the call can control the dispatching. 
  5954.  
  5955.    3. A name or expression of a tagged type is either statically tagged, 
  5956.       dynamically tagged, or tag indeterminate, according to whether, when used 
  5957.       as a controlling operand, the tag that controls dispatching is determined 
  5958.       statically by the operand's (specific) type, dynamically by its tag at 
  5959.       run time, or from context. A qualified_expression or parenthesized 
  5960.       expression is statically, dynamically, or indeterminately tagged 
  5961.       according to its operand. For other kinds of names and expressions, this 
  5962.       is determined as follows: 
  5963.  
  5964.         a. The name or expression is statically tagged if it is of a specific 
  5965.            tagged type and, if it is a call with a controlling result, it has 
  5966.            at least one statically tagged controlling operand; 
  5967.  
  5968.         b. The name or expression is dynamically tagged if it is of a 
  5969.            class-wide type, or it is a call with a controlling result and at 
  5970.            least one dynamically tagged controlling operand; 
  5971.  
  5972.         c. The name or expression is tag indeterminate if it is a call with a 
  5973.            controlling result, all of whose controlling operands (if any) are 
  5974.            tag indeterminate. 
  5975.  
  5976.    1. A type_conversion is statically or dynamically tagged according to 
  5977.       whether the type determined by the subtype_mark is specific or 
  5978.       class-wide, respectively. For a controlling operand that is designated by 
  5979.       an actual parameter, the controlling operand is statically or dynamically 
  5980.       tagged according to whether the designated type of the actual parameter 
  5981.       is specific or class-wide, respectively. 
  5982.  
  5983.             Legality Rules
  5984.  
  5985.    2. A call on a dispatching operation shall not have both dynamically tagged 
  5986.       and statically tagged controlling operands. 
  5987.  
  5988.    3. If the expected type for an expression or name is some specific tagged 
  5989.       type, then the expression or name shall not be dynamically tagged unless 
  5990.       it is a controlling operand in a call on a dispatching operation. 
  5991.       Similarly, if the expected type for an expression is an anonymous 
  5992.       access-to-specific tagged type, then the expression shall not be of an 
  5993.       access-to-class-wide type unless it designates a controlling operand in a 
  5994.       call on a dispatching operation. 
  5995.  
  5996.    4. In the declaration of a dispatching operation of a tagged type, 
  5997.       everywhere a subtype of the tagged type appears as a subtype of the 
  5998.       profile, see 6.1, it shall statically match the first subtype of the 
  5999.       tagged type. If the dispatching operation overrides an inherited 
  6000.       subprogram, it shall be subtype conformant with the inherited subprogram. 
  6001.       A dispatching operation shall not be of convention Intrinsic. If a 
  6002.       dispatching operation overrides the predefined equals operator, then it 
  6003.       shall be of convention Ada (either explicitly or by default --  see 
  6004.       6.3.1.). 
  6005.  
  6006.    5. The default_expression for a controlling formal parameter of a 
  6007.       dispatching operation shall be tag indeterminate. A controlling formal 
  6008.       parameter that is an access parameter shall not have a 
  6009.       default_expression. 
  6010.  
  6011.    6. A given subprogram shall not be a dispatching operation of two or more 
  6012.       distinct tagged types. 
  6013.  
  6014.    7. The explicit declaration of a primitive subprogram of a tagged type shall 
  6015.       occur before the type is frozen, see 13.14. For example, new dispatching 
  6016.       operations cannot be added after objects or values of the type exist, nor 
  6017.       after deriving a record extension from it, nor after a body. 
  6018.  
  6019.             Dynamic Semantics
  6020.  
  6021.    8. For the execution of a call on a dispatching operation of a type T, the 
  6022.       controlling tag value determines which subprogram body is executed. The 
  6023.       controlling tag value is defined as follows: 
  6024.  
  6025.         a. If one or more controlling operands are statically tagged, then the 
  6026.            controlling tag value is statically determined to be the tag of T. 
  6027.  
  6028.         b. If one or more controlling operands are dynamically tagged, then the 
  6029.            controlling tag value is not statically determined, but is rather 
  6030.            determined by the tags of the controlling operands. If there is more 
  6031.            than one dynamically tagged controlling operand, a check is made 
  6032.            that they all have the same tag. If this check fails, 
  6033.            Constraint_Error is raised unless the call is a function_call whose 
  6034.            name denotes the declaration of an equality operator (predefined or 
  6035.            user defined) that returns Boolean, in which case the result of the 
  6036.            call is defined to indicate inequality, and no subprogram_body is 
  6037.            executed. This check is performed prior to evaluating any 
  6038.            tag-indeterminate controlling operands. 
  6039.  
  6040.         c. If all of the controlling operands are tag-indeterminate, then: 
  6041.  
  6042.              1. If the call has a controlling result and is itself a (possibly 
  6043.                 parenthesized or qualified) controlling operand of an enclosing 
  6044.                 call on a dispatching operation of type T, then its controlling 
  6045.                 tag value is determined by the controlling tag value of this 
  6046.                 enclosing call; 
  6047.  
  6048.              2. Otherwise, the controlling tag value is statically determined 
  6049.                 to be the tag of type T. 
  6050.  
  6051.    1. For the execution of a call on a dispatching operation, the body executed 
  6052.       is the one for the corresponding primitive subprogram of the specific 
  6053.       type identified by the controlling tag value. The body for an explicitly 
  6054.       declared dispatching operation is the corresponding explicit body for the 
  6055.       subprogram. The body for an implicitly declared dispatching operation 
  6056.       that is overridden is the body for the overriding subprogram, even if the 
  6057.       overriding occurs in a private part. The body for an inherited 
  6058.       dispatching operation that is not overridden is the body of the 
  6059.       corresponding subprogram of the parent or ancestor type. 
  6060.  
  6061.       NOTES 
  6062.  
  6063.    2. (70) The body to be executed for a call on a dispatching operation is 
  6064.       determined by the tag; it does not matter whether that tag is determined 
  6065.       statically or dynamically, and it does not matter whether the 
  6066.       subprogram's declaration is visible at the place of the call. 
  6067.  
  6068.    3. (71) This subclause covers calls on primitive subprograms of a tagged 
  6069.       type. Rules for tagged type membership tests are described in 4.5.2. 
  6070.       Controlling tag determination for an assignment_statement is described in 
  6071.       5.2. 
  6072.  
  6073.    4. (72) A dispatching call can dispatch to a body whose declaration is not 
  6074.       visible at the place of the call. 
  6075.  
  6076.    5. (73) A call through an access-to-subprogram value is never a dispatching 
  6077.       call, even if the access value designates a dispatching operation. 
  6078.       Similarly a call whose prefix denotes a subprogram_renaming_declaration 
  6079.       cannot be a dispatching call unless the renaming itself is the 
  6080.       declaration of a primitive subprogram. 
  6081.  
  6082.  
  6083. ΓòÉΓòÉΓòÉ 6.9.3. Abstract Types and Subprograms ΓòÉΓòÉΓòÉ
  6084.  
  6085.    1. An abstract type is a tagged type intended for use as a parent type for 
  6086.       type extensions, but which is not allowed to have objects of its own. An 
  6087.       abstract subprogram is a subprogram that has no body, but is intended to 
  6088.       be overridden at some point when inherited. Because objects of an 
  6089.       abstract type cannot be created, a dispatching call to an abstract 
  6090.       subprogram always dispatches to some overriding body. 
  6091.  
  6092.             Legality Rules
  6093.  
  6094.    2. An abstract type is a specific type that has the reserved word abstract 
  6095.       in its declaration. Only a tagged type is allowed to be declared 
  6096.       abstract. 
  6097.  
  6098.    3. A subprogram declared by an abstract_subprogram_declaration, see 6.1, is 
  6099.       an abstract subprogram. If it is a primitive subprogram of a tagged type, 
  6100.       then the tagged type shall be abstract. 
  6101.  
  6102.    4. For a derived type, if the parent or ancestor type has an abstract 
  6103.       primitive subprogram, or a primitive function with a controlling result, 
  6104.       then: 
  6105.  
  6106.         a. If the derived type is abstract or untagged, the inherited 
  6107.            subprogram is abstract. 
  6108.  
  6109.         b. Otherwise, the subprogram shall be overridden with a nonabstract 
  6110.            subprogram; for a type declared in the visible part of a package, 
  6111.            the overriding may be either in the visible or the private part. 
  6112.            However, if the type is a generic formal type, the subprogram need 
  6113.            not be overridden for the formal type itself; a nonabstract version 
  6114.            will necessarily be provided by the actual type. 
  6115.  
  6116.    1. A call on an abstract subprogram shall be a dispatching call; 
  6117.       nondispatching calls to an abstract subprogram are not allowed. 
  6118.  
  6119.    2. The type of an aggregate, or of an object created by an 
  6120.       object_declaration or an allocator, or a generic formal object of mode 
  6121.       in, shall not be abstract. The type of the target of an assignment 
  6122.       operation, see 5.2, shall not be abstract. The type of a component shall 
  6123.       not be abstract. If the result type of a function is abstract, then the 
  6124.       function shall be abstract. 
  6125.  
  6126.    3. If a partial view is not abstract, the corresponding full view shall not 
  6127.       be abstract. If a generic formal type is abstract, then for each 
  6128.       primitive subprogram of the formal that is not abstract, the 
  6129.       corresponding primitive subprogram of the actual shall not be abstract. 
  6130.  
  6131.    4. For an abstract type declared in a visible part, an abstract primitive 
  6132.       subprogram shall not be declared in the private part, unless it is 
  6133.       overriding an abstract subprogram implicitly declared in the visible 
  6134.       part. For a tagged type declared in a visible part, a primitive function 
  6135.       with a controlling result shall not be declared in the private part, 
  6136.       unless it is overriding a function implicitly declared in the visible 
  6137.       part. 
  6138.  
  6139.    5. A generic actual subprogram shall not be an abstract subprogram. The 
  6140.       prefix of an attribute_reference for the Access, Unchecked_Access, or 
  6141.       Address attributes shall not denote an abstract subprogram. 
  6142.  
  6143.       NOTES 
  6144.  
  6145.    6. (74) Abstractness is not inherited; to declare an abstract type, the 
  6146.       reserved word abstract has to be used in the declaration of the type 
  6147.       extension. 
  6148.  
  6149.    7. (75) A class-wide type is never abstract. Even if a class is rooted at an 
  6150.       abstract type, the class-wide type for the class is not abstract, and an 
  6151.       object of the class-wide type can be created; the tag of such an object 
  6152.       will identify some nonabstract type in the class. 
  6153.  
  6154.             Examples
  6155.  
  6156.    8. Example of an abstract type representing a set of natural numbers: 
  6157.  
  6158.          9.
  6159.  
  6160.                       package Sets is
  6161.                         subtype Element_Type is Natural;
  6162.                         type Set is abstract tagged null record;
  6163.                         function Empty return Set is abstract;
  6164.                         function Union(Left, Right : Set) return Set is abstract;
  6165.                         function Intersection(Left, Right : Set) return Set is abstract;
  6166.                         function Unit_Set(Element : Element_Type) return Set is abstract;
  6167.                         procedure Take
  6168.                          (Element : out Element_Type;
  6169.                           From : in out Set) is abstract;
  6170.                       end Sets;
  6171.  
  6172.  NOTES 
  6173.  
  6174.   10. (76) Notes on the example:  Given the above abstract type, one could then 
  6175.       derive various (nonabstract) extensions of the type, representing 
  6176.       alternative implementations of a set. One might use a bit vector, but 
  6177.       impose an upper bound on the largest element representable, while another 
  6178.       might use a hash table, trading off space for flexibility. 
  6179.  
  6180.  
  6181. ΓòÉΓòÉΓòÉ 6.10. Access Types ΓòÉΓòÉΓòÉ
  6182.  
  6183.    1. A value of an access type (an access value) provides indirect access to 
  6184.       the object or subprogram it designates. Depending on its type, an access 
  6185.       value can designate either subprograms, objects created by allocators 
  6186.       (see 4.8) or more generally aliased objects of an appropriate type. 
  6187.  
  6188.             Syntax
  6189.  
  6190.          2.
  6191.  
  6192.                       access_type_definition ::=
  6193.                          access_to_object_definition
  6194.                         | access_to_subprogram_definition
  6195.  
  6196.          3.
  6197.  
  6198.                       access_to_object_definition ::=
  6199.                         access [general_access_modifier] subtype_indication
  6200.  
  6201.          4.
  6202.  
  6203.                       general_access_modifier ::= all | constant
  6204.  
  6205.          5.
  6206.  
  6207.                       access_to_subprogram_definition ::=
  6208.                          access [protected] procedure parameter_profile
  6209.                         | access [protected] function  parameter_and_result_profile
  6210.  
  6211.          6.
  6212.  
  6213.                       access_definition ::= access subtype_mark
  6214.  
  6215.   Static Semantics
  6216.  
  6217.    7. There are two kinds of access types, access-to-object types, whose values 
  6218.       designate objects, and access-to-subprogram types, whose values designate 
  6219.       subprograms. Associated with an access-to-object type is a storage pool; 
  6220.       several access types may share the same storage pool. A storage pool is 
  6221.       an area of storage used to hold dynamically allocated objects (called 
  6222.       pool elements) created by allocators; storage pools are described further 
  6223.       in 13.11: ``Storage Management''. 
  6224.  
  6225.    8. Access-to-object types are further subdivided into pool-specific access 
  6226.       types, whose values can designate only the elements of their associated 
  6227.       storage pool, and general access types, whose values can designate the 
  6228.       elements of any storage pool, as well as aliased objects created by 
  6229.       declarations rather than allocators, and aliased subcomponents of other 
  6230.       objects. 
  6231.  
  6232.    9. A view of an object is defined to be aliased if it is defined by an 
  6233.       object_declaration or component_definition with the reserved word 
  6234.       aliased, or by a renaming of an aliased view. In addition, the 
  6235.       dereference of an access-to-object value denotes an aliased view, as does 
  6236.       a view conversion, see 4.6 of an aliased view. Finally, the current 
  6237.       instance of a limited type, and a formal parameter or generic formal 
  6238.       object of a tagged type are defined to be aliased. Aliased views are the 
  6239.       ones that can be designated by an access value. If the view defined by an 
  6240.       object_declaration is aliased, and the type of the object has 
  6241.       discriminants, then the object is constrained; if its nominal subtype is 
  6242.       unconstrained, then the object is constrained by its initial value. 
  6243.       Similarly, if the object created by an allocator has discriminants, the 
  6244.       object is constrained, either by the designated subtype, or by its 
  6245.       initial value. 
  6246.  
  6247.   10. An access_to_object_definition defines an access-to-object type and its 
  6248.       first subtype; the subtype_indication defines the designated subtype of 
  6249.       the access type. If a general_access_modifier appears, then the access 
  6250.       type is a general access type. If the modifier is the reserved word 
  6251.       constant, then the type is an access-to-constant type; a designated 
  6252.       object cannot be updated through a value of such a type. If the modifier 
  6253.       is the reserved word all, then the type is an access-to-variable type; a 
  6254.       designated object can be both read and updated through a value of such a 
  6255.       type. If no general_access_modifier appears in the 
  6256.       access_to_object_definition, the access type is a pool-specific 
  6257.       access-to-variable type. 
  6258.  
  6259.   11. An access_to_subprogram_definition defines an access-to-subprogram type 
  6260.       and its first subtype; the parameter_profile or 
  6261.       parameter_and_result_profile defines the designated profile of the access 
  6262.       type. There is a calling convention associated with the designated 
  6263.       profile; only subprograms with this calling convention can be designated 
  6264.       by values of the access type. By default, the calling convention is 
  6265.       ``protected'' if the reserved word protected appears, and ``Ada'' 
  6266.       otherwise. See Annex B for how to override this default. 
  6267.  
  6268.   12. An access_definition defines an anonymous general access-to-variable 
  6269.       type; the subtype_mark denotes its designated subtype. An 
  6270.       access_definition is used in the specification of an access discriminant, 
  6271.       see 3.7, or an access parameter, see 6.1. 
  6272.  
  6273.   13. For each (named) access type, there is a literal null which has a null 
  6274.       access value designating no entity at all. The null value of a named 
  6275.       access type is the default initial value of the type. Other values of an 
  6276.       access type are obtained by evaluating an attribute_reference for the 
  6277.       Access or Unchecked_Access attribute of an aliased view of an object or 
  6278.       non-intrinsic subprogram, or, in the case of a named access-to-object 
  6279.       type, an allocator, which returns an access value designating a newly 
  6280.       created object, see 3.10.2. 
  6281.  
  6282.   14. All subtypes of an access-to-subprogram type are constrained. The first 
  6283.       subtype of a type defined by an access_type_definition or an 
  6284.       access_to_object_definition is unconstrained if the designated subtype is 
  6285.       an unconstrained array or discriminated type; otherwise it is 
  6286.       constrained. 
  6287.  
  6288.             Dynamic Semantics
  6289.  
  6290.   15. A composite_constraint is compatible with an unconstrained access subtype 
  6291.       if it is compatible with the designated subtype. An access value 
  6292.       satisfies a composite_constraint of an access subtype if it equals the 
  6293.       null value of its type or if it designates an object whose value 
  6294.       satisfies the constraint. 
  6295.  
  6296.   16. The elaboration of an access_type_definition creates the access type and 
  6297.       its first subtype. For an access-to-object type, this elaboration 
  6298.       includes the elaboration of the subtype_indication, which creates the 
  6299.       designated subtype. 
  6300.  
  6301.   17. The elaboration of an access_definition creates an anonymous general 
  6302.       access-to-variable type (this happens as part of the initialization of an 
  6303.       access parameter or access discriminant). 
  6304.  
  6305.       NOTES 
  6306.  
  6307.   18. (77) Access values are called ``pointers'' or ``references'' in some 
  6308.       other languages. 
  6309.  
  6310.   19. (78) Each access-to-object type has an associated storage pool; several 
  6311.       access types can share the same pool. An object can be created in the 
  6312.       storage pool of an access type by an allocator, see 4.8, for the access 
  6313.       type. A storage pool (roughly) corresponds to what some other languages 
  6314.       call a ``heap.''. See 13.11, for a discussion of pools. 
  6315.  
  6316.   20. (79) Only index_constraints and discriminant_constraints can be applied 
  6317.       to access types, see 3.6.1, and 3.7.1. 
  6318.  
  6319.             Examples
  6320.  
  6321.   21. Examples of access-to-object types: 
  6322.  
  6323.         22.
  6324.  
  6325.                       type Peripheral_Ref is access Peripheral;  --  see 3.8.1
  6326.                       type Binop_Ptr is access all Binary_Operation'Class;
  6327.                       -- general access-to-class-wide, see 3.9.1
  6328.  
  6329.   23. Example of an access subtype: 
  6330.  
  6331.         24.
  6332.  
  6333.                       subtype Drum_Ref is Peripheral_Ref(Drum);  --  see 3.8.1
  6334.  
  6335.   25. Example of an access-to-subprogram type: 
  6336.  
  6337.         26.
  6338.  
  6339.                       type Message_Procedure is access
  6340.                        procedure (M : in String := "Error!");
  6341.                       procedure Default_Message_Procedure(M : in String);
  6342.                       Give_Message : Message_Procedure := Default_Message_Procedure'Access;
  6343.                       ┬╖┬╖┬╖
  6344.                       procedure Other_Procedure(M : in String);
  6345.                       ┬╖┬╖┬╖
  6346.                       Give_Message := Other_Procedure'Access;
  6347.                       ┬╖┬╖┬╖
  6348.                       Give_Message("File not found.");
  6349.                       -- call with parameter (.all is optional)
  6350.                       Give_Message.all;
  6351.                       -- call with no parameters
  6352.  
  6353.  3.10.1                        Incomplete Type Declarations 
  6354.  3.10.2                        Operations of Access Types 
  6355.  
  6356.  
  6357. ΓòÉΓòÉΓòÉ 6.10.1. Incomplete Type Declarations ΓòÉΓòÉΓòÉ
  6358.  
  6359.    1. There are no particular limitations on the designated type of an access 
  6360.       type. In particular, the type of a component of the designated type can 
  6361.       be another access type, or even the same access type. This permits 
  6362.       mutually dependent and recursive access types. An 
  6363.       incomplete_type_declaration can be used to introduce a type to be used as 
  6364.       a designated type, while deferring its full definition to a subsequent 
  6365.       full_type_declaration. 
  6366.  
  6367.             Syntax
  6368.  
  6369.          2.
  6370.  
  6371.                       incomplete_type_declaration ::=
  6372.                         type defining_identifier [discriminant_part];
  6373.  
  6374.   Legality Rules
  6375.  
  6376.    3. An incomplete_type_declaration requires a completion, which shall be a 
  6377.       full_type_declaration. If the incomplete_type_declaration occurs 
  6378.       immediately within either the visible part of a package_specification or 
  6379.       a declarative_part, then the full_type_declaration shall occur later and 
  6380.       immediately within this visible part or declarative_part. If the 
  6381.       incomplete_type_declaration occurs immediately within the private part of 
  6382.       a given package_specification, then the full_type_declaration shall occur 
  6383.       later and immediately within either the private part itself, or the 
  6384.       declarative_part of the corresponding package_body. 
  6385.  
  6386.    4. If an incomplete_type_declaration has a known_discriminant_part, then a 
  6387.       full_type_declaration that completes it shall have a fully conforming 
  6388.       (explicit) known_discriminant_part, see 6.3.1. If an 
  6389.       incomplete_type_declaration has no discriminant_part (or an 
  6390.       unknown_discriminant_part), then a corresponding full_type_declaration is 
  6391.       nevertheless allowed to have discriminants, either explicitly, or 
  6392.       inherited via derivation. 
  6393.  
  6394.    5. The only allowed uses of a name that denotes an 
  6395.       incomplete_type_declaration are as follows: 
  6396.  
  6397.         a. as the subtype_mark in the subtype_indication of an 
  6398.            access_to_object_definition; the only form of constraint allowed in 
  6399.            this subtype_indication is a discriminant_constraint; 
  6400.  
  6401.         b. as the subtype_mark defining the subtype of a parameter or result of 
  6402.            an access_to_subprogram_definition; 
  6403.  
  6404.         c. as the subtype_mark in an access_definition; 
  6405.  
  6406.         d. as the prefix of an attribute_reference whose attribute_designator 
  6407.            is Class; such an attribute_reference is similarly restricted to the 
  6408.            uses allowed here; when used in this way, the corresponding 
  6409.            full_type_declaration shall declare a tagged type, and the 
  6410.            attribute_reference shall occur in the same library unit as the 
  6411.            incomplete_type_declaration. 
  6412.  
  6413.    1. A dereference (whether implicit or explicit --  see 4.1.) shall not be of 
  6414.       an incomplete type. 
  6415.  
  6416.             Static Semantics
  6417.  
  6418.    2. An incomplete_type_declaration declares an incomplete type and its first 
  6419.       subtype; the first subtype is unconstrained if a known_discriminant_part 
  6420.       appears. 
  6421.  
  6422.             Dynamic Semantics
  6423.  
  6424.    3. The elaboration of an incomplete_type_declaration has no effect. 
  6425.  
  6426.       NOTES 
  6427.  
  6428.    4. (80) Within a declarative_part, an incomplete_type_declaration and a 
  6429.       corresponding full_type_declaration cannot be separated by an intervening 
  6430.       body. This is because a type has to be completely defined before it is 
  6431.       frozen, and a body freezes all types declared prior to it in the same 
  6432.       declarative_part, see 13.14. 
  6433.  
  6434.             Examples
  6435.  
  6436.    5. Example of a recursive type: 
  6437.  
  6438.          6.
  6439.  
  6440.                       type Cell;  --  incomplete type declaration
  6441.                       type Link is access Cell;
  6442.  
  6443.          7.
  6444.  
  6445.                       type Cell is
  6446.                         record
  6447.                          Value  : Integer;
  6448.                          Succ  : Link;
  6449.                          Pred  : Link;
  6450.                         end record;
  6451.  
  6452.          8.
  6453.  
  6454.                       Head  : Link  := new Cell'(0, null, null);
  6455.                       Next  : Link  := Head.Succ;
  6456.  
  6457.    9. Examples of mutually dependent access types: 
  6458.  
  6459.         10.
  6460.  
  6461.                       type Person(<>);   -- incomplete type declaration
  6462.                       type Car;      -- incomplete type declaration
  6463.  
  6464.         11.
  6465.  
  6466.                       type Person_Name is access Person;
  6467.                       type Car_Name   is access all Car;
  6468.  
  6469.         12.
  6470.  
  6471.                       type Car is
  6472.                         record
  6473.                          Number  : Integer;
  6474.                          Owner  : Person_Name;
  6475.                         end record;
  6476.  
  6477.         13.
  6478.  
  6479.                       type Person(Sex : Gender) is
  6480.                         record
  6481.                          Name   : String(1 ┬╖┬╖ 20);
  6482.                          Birth   : Date;
  6483.                          Age    : Integer range 0 ┬╖┬╖ 130;
  6484.                          Vehicle  : Car_Name;
  6485.                          case Sex is
  6486.                            when M => Wife   : Person_Name(Sex => F);
  6487.                            when F => Husband : Person_Name(Sex => M);
  6488.                          end case;
  6489.                         end record;
  6490.  
  6491.         14.
  6492.  
  6493.                       My_Car, Your_Car, Next_Car : Car_Name := new Car;
  6494.                       --  see 4.8
  6495.                       George : Person_Name := new Person(M);
  6496.                         ┬╖┬╖┬╖
  6497.                       George.Vehicle := Your_Car;
  6498.  
  6499.  
  6500. ΓòÉΓòÉΓòÉ 6.10.2. Operations of Access Types ΓòÉΓòÉΓòÉ
  6501.  
  6502.    1. The attribute Access is used to create access values designating aliased 
  6503.       objects and non-intrinsic subprograms. The ``accessibility'' rules 
  6504.       prevent dangling references (in the absence of uses of certain unchecked 
  6505.       features -- see 13.). 
  6506.  
  6507.             Name Resolution Rules
  6508.  
  6509.    2. For an attribute_reference with attribute_designator Access (or 
  6510.       Unchecked_Access --  see 13.10.), the expected type shall be a single 
  6511.       access type; the prefix of such an attribute_reference is never 
  6512.       interpreted as an implicit_dereference. If the expected type is an 
  6513.       access-to-subprogram type, then the expected profile of the prefix is the 
  6514.       designated profile of the access type. 
  6515.  
  6516.             Static Semantics
  6517.  
  6518.    3. The accessibility rules, which prevent dangling references, are written 
  6519.       in terms of accessibility levels, which reflect the run-time nesting of 
  6520.       masters. As explained in 7.6.1, a master is the execution of a task_body, 
  6521.       a block_statement, a subprogram_body, an entry_body, or an 
  6522.       accept_statement. An accessibility level is deeper than another if it is 
  6523.       more deeply nested at run time. For example, an object declared local to 
  6524.       a called subprogram has a deeper accessibility level than an object 
  6525.       declared local to the calling subprogram. The accessibility rules for 
  6526.       access types require that the accessibility level of an object designated 
  6527.       by an access value be no deeper than that of the access type. This 
  6528.       ensures that the object will live at least as long as the access type, 
  6529.       which in turn ensures that the access value cannot later designate an 
  6530.       object that no longer exists. The Unchecked_Access attribute may be used 
  6531.       to circumvent the accessibility rules. 
  6532.  
  6533.    4. A given accessibility level is said to be statically deeper than another 
  6534.       if the given level is known at compile time (as defined below) to be 
  6535.       deeper than the other for all possible executions. In most cases, 
  6536.       accessibility is enforced at compile time by Legality Rules. Run-time 
  6537.       accessibility checks are also used, since the Legality Rules do not cover 
  6538.       certain cases involving access parameters and generic packages. 
  6539.  
  6540.    5. Each master, and each entity and view created by it, has an accessibility 
  6541.       level: 
  6542.  
  6543.         a. The accessibility level of a given master is deeper than that of 
  6544.            each dynamically enclosing master, and deeper than that of each 
  6545.            master upon which the task executing the given master directly 
  6546.            depends, see 9.3. 
  6547.  
  6548.         b. An entity or view created by a declaration has the same 
  6549.            accessibility level as the innermost enclosing master, except in the 
  6550.            cases of renaming and derived access types described below. A 
  6551.            parameter of a master has the same accessibility level as the 
  6552.            master. 
  6553.  
  6554.         c. The accessibility level of a view of an object or subprogram defined 
  6555.            by a renaming_declaration is the same as that of the renamed view. 
  6556.  
  6557.         d. The accessibility level of a view conversion is the same as that of 
  6558.            the operand. 
  6559.  
  6560.         e. For a function whose result type is a return-by-reference type, the 
  6561.            accessibility level of the result object is the same as that of the 
  6562.            master that elaborated the function body. For any other function, 
  6563.            the accessibility level of the result object is that of the 
  6564.            execution of the called function. 
  6565.  
  6566.         f. The accessibility level of a derived access type is the same as that 
  6567.            of its ultimate ancestor. 
  6568.  
  6569.         g. The accessibility level of the anonymous access type of an access 
  6570.            discriminant is the same as that of the containing object or 
  6571.            associated constrained subtype. 
  6572.  
  6573.         h. The accessibility level of the anonymous access type of an access 
  6574.            parameter is the same as that of the view designated by the actual. 
  6575.            If the actual is an allocator, this is the accessibility level of 
  6576.            the execution of the called subprogram. 
  6577.  
  6578.         i. The accessibility level of an object created by an allocator is the 
  6579.            same as that of the access type. 
  6580.  
  6581.         j. The accessibility level of a view of an object or subprogram denoted 
  6582.            by a dereference of an access value is the same as that of the 
  6583.            access type. 
  6584.  
  6585.         k. The accessibility level of a component, protected subprogram, or 
  6586.            entry of (a view of) a composite object is the same as that of (the 
  6587.            view of) the composite object. 
  6588.  
  6589.    1. One accessibility level is defined to be statically deeper than another 
  6590.       in the following cases: 
  6591.  
  6592.         a. For a master that is statically nested within another master, the 
  6593.            accessibility level of the inner master is statically deeper than 
  6594.            that of the outer master. 
  6595.  
  6596.         b. The statically deeper relationship does not apply to the 
  6597.            accessibility level of the anonymous type of an access parameter; 
  6598.            that is, such an accessibility level is not considered to be 
  6599.            statically deeper, nor statically shallower, than any other. 
  6600.  
  6601.         c. For determining whether one level is statically deeper than another 
  6602.            when within a generic package body, the generic package is presumed 
  6603.            to be instantiated at the same level as where it was declared; 
  6604.            run-time checks are needed in the case of more deeply nested 
  6605.            instantiations. 
  6606.  
  6607.         d. For determining whether one level is statically deeper than another 
  6608.            when within the declarative region of a type_declaration, the 
  6609.            current instance of the type is presumed to be an object created at 
  6610.            a deeper level than that of the type. 
  6611.  
  6612.    1. The accessibility level of all library units is called the library level; 
  6613.       a library-level declaration or entity is one whose accessibility level is 
  6614.       the library level. 
  6615.  
  6616.    2. The following attribute is defined for a prefix X that denotes an aliased 
  6617.       view of an object: 
  6618.  
  6619.    3. X'Access 
  6620.  
  6621.                       X'Access yields an access value that designates the object
  6622.                       denoted by X. The type of X'Access is an access-to-object
  6623.                       type, as determined by the expected type. The expected type
  6624.                       shall be a general access type. X shall denote an aliased
  6625.                       view of an object, including possibly the current instance
  6626.                       (see 8.6) of a limited type within its definition, or a
  6627.                       formal parameter or generic formal object of a tagged type.
  6628.                       The view denoted by the prefix X shall satisfy the following
  6629.                       additional requirements, presuming the expected type for
  6630.                       X'Access is the general access type A:
  6631.  
  6632.              1. If A is an access-to-variable type, then the view shall be a 
  6633.                 variable; on the other hand, if A is an access-to-constant 
  6634.                 type, the view may be either a constant or a variable. 
  6635.  
  6636.              2. The view shall not be a subcomponent that depends on 
  6637.                 discriminants of a variable whose nominal subtype is 
  6638.                 unconstrained, unless this subtype is indefinite, or the 
  6639.                 variable is aliased. 
  6640.  
  6641.              3. If the designated type of A is tagged, then the type of the 
  6642.                 view shall be covered by the designated type; if A's designated 
  6643.                 type is not tagged, then the type of the view shall be the 
  6644.                 same, and either A's designated subtype shall statically match 
  6645.                 the nominal subtype of the view, or the designated subtype 
  6646.                 shall be discriminated and unconstrained; 
  6647.  
  6648.              4. The accessibility level of the view shall not be statically 
  6649.                 deeper than that of the access type A. In addition to the 
  6650.                 places where Legality Rules normally apply, see 12.3, this rule 
  6651.                 applies also in the private part of an instance of a generic 
  6652.                 unit. 
  6653.  
  6654.         a. A check is made that the accessibility level of X is not deeper than 
  6655.            that of the access type A. If this check fails, Program_Error is 
  6656.            raised. 
  6657.  
  6658.         b. If the nominal subtype of X does not statically match the designated 
  6659.            subtype of A, a view conversion of X to the designated subtype is 
  6660.            evaluated (which might raise Constraint_Error --  see 4.6.) and the 
  6661.            value of X'Access designates that view. 
  6662.  
  6663.    1. The following attribute is defined for a prefix P that denotes a 
  6664.       subprogram: 
  6665.  
  6666.    2. P'Access 
  6667.  
  6668.                       P'Access yields an access value that designates the
  6669.                       subprogram denoted by P. The type of P'Access is an
  6670.                       access-to-subprogram type (S), as determined by the expected
  6671.                       type. The accessibility level of P shall not be statically
  6672.                       deeper than that of S. In addition to the places where
  6673.                       Legality Rules normally apply, see 12.3, this rule applies
  6674.                       also in the private part of an instance of a generic unit.
  6675.                       The profile of P shall be subtype-conformant with the
  6676.                       designated profile of S, and shall not be Intrinsic. If
  6677.                       the subprogram denoted by P is declared within a generic
  6678.                       body, S shall be declared within the generic body.
  6679.  
  6680.  NOTES 
  6681.  
  6682.    3. (81) The Unchecked_Access attribute yields the same result as the Access 
  6683.       attribute for objects, but has fewer restrictions, see 13.10. There are 
  6684.       other predefined operations that yield access values: an allocator can be 
  6685.       used to create an object, and return an access value that designates it, 
  6686.       see 4.8, evaluating the literal null yields a null access value that 
  6687.       designates no entity at all, see 4.2. 
  6688.  
  6689.    4. (82) The predefined operations of an access type also include the 
  6690.       assignment operation, qualification, and membership tests. Explicit 
  6691.       conversion is allowed between general access types with matching 
  6692.       designated subtypes; explicit conversion is allowed between 
  6693.       access-to-subprogram types with subtype conformant profiles, see 4.6. 
  6694.       Named access types have predefined equality operators; anonymous access 
  6695.       types do not, see 4.5.2. 
  6696.  
  6697.    5. (83) The object or subprogram designated by an access value can be named 
  6698.       with a dereference, either an explicit_dereference or an 
  6699.       implicit_dereference (see 4.1). 
  6700.  
  6701.    6. (84) A call through the dereference of an access-to-subprogram value is 
  6702.       never a dispatching call. 
  6703.  
  6704.    7. (85) The accessibility rules imply that it is not possible to use the 
  6705.       Access attribute to implement ``downward closures'' -- that is, to pass a 
  6706.       more-nested subprogram as a parameter to a less-nested subprogram, as 
  6707.       might be desired for example for an iterator abstraction. Instead, 
  6708.       downward closures can be implemented using generic formal subprograms 
  6709.       (see 12.6). Note that Unchecked_Access is not allowed for subprograms. 
  6710.  
  6711.    8. (86) Note that using an access-to-class-wide tagged type with a 
  6712.       dispatching operation is a potentially more structured alternative to 
  6713.       using an access-to-subprogram type. 
  6714.  
  6715.    9. (87) An implementation may consider two access-to-subprogram values to be 
  6716.       unequal, even though they designate the same subprogram. This might be 
  6717.       because one points directly to the subprogram, while the other points to 
  6718.       a special prologue that performs an Elaboration_Check and then jumps to 
  6719.       the subprogram (see 4.5.2). 
  6720.  
  6721.             Examples
  6722.  
  6723.   10. Example of use of the Access attribute: 
  6724.  
  6725.         11.
  6726.  
  6727.                       Martha : Person_Name := new Person(F);  --  see 3.10.1
  6728.                       Cars  : array (1┬╖┬╖2) of aliased Car;
  6729.                         ┬╖┬╖┬╖
  6730.                       Martha.Vehicle := Cars(1)'Access;
  6731.                       George.Vehicle := Cars(2)'Access;
  6732.  
  6733.  
  6734. ΓòÉΓòÉΓòÉ 6.11. Declarative Parts ΓòÉΓòÉΓòÉ
  6735.  
  6736.    1. A declarative_part contains declarative_items (possibly none). 
  6737.  
  6738.             Syntax
  6739.  
  6740.          2.
  6741.  
  6742.                       declarative_part ::= {declarative_item}
  6743.  
  6744.          3.
  6745.  
  6746.                       declarative_item ::= basic_declarative_item | body
  6747.  
  6748.          4.
  6749.  
  6750.                       basic_declarative_item ::=
  6751.                         basic_declaration | representation_clause | use_clause
  6752.  
  6753.          5.
  6754.  
  6755.                       body ::= proper_body | body_stub
  6756.  
  6757.          6.
  6758.  
  6759.                       proper_body ::=
  6760.                         subprogram_body | package_body | task_body | protected_body
  6761.  
  6762.   Dynamic Semantics
  6763.  
  6764.    7. The elaboration of a declarative_part consists of the elaboration of the 
  6765.       declarative_items, if any, in the order in which they are given in the 
  6766.       declarative_part. 
  6767.  
  6768.    8. An elaborable construct is in the elaborated state after the normal 
  6769.       completion of its elaboration. Prior to that, it is not yet elaborated. 
  6770.  
  6771.    9. For a construct that attempts to use a body, a check (Elaboration_Check) 
  6772.       is performed, as follows: 
  6773.  
  6774.         a. For a call to a (non-protected) subprogram that has an explicit 
  6775.            body, a check is made that the subprogram_body is already 
  6776.            elaborated. This check and the evaluations of any actual parameters 
  6777.            of the call are done in an arbitrary order. 
  6778.  
  6779.         b. For a call to a protected operation of a protected type (that has a 
  6780.            body -- no check is performed if a pragma Import applies to the 
  6781.            protected type), a check is made that the protected_body is already 
  6782.            elaborated. This check and the evaluations of any actual parameters 
  6783.            of the call are done in an arbitrary order. 
  6784.  
  6785.         c. For the activation of a task, a check is made by the activator that 
  6786.            the task_body is already elaborated. If two or more tasks are being 
  6787.            activated together, see 9.2, as the result of the elaboration of a 
  6788.            declarative_part or the initialization for the object created by an 
  6789.            allocator, this check is done for all of them before activating any 
  6790.            of them. 
  6791.  
  6792.         d. For the instantiation of a generic unit that has a body, a check is 
  6793.            made that this body is already elaborated. This check and the 
  6794.            evaluation of any explicit_generic_actual_parameters of the 
  6795.            instantiation are done in an arbitrary order. 
  6796.  
  6797.    1. The exception Program_Error is raised if any of these checks fails. 
  6798.  
  6799.  3.11.1                        Completions of Declarations 
  6800.  
  6801.  
  6802. ΓòÉΓòÉΓòÉ 6.11.1. Completions of Declarations ΓòÉΓòÉΓòÉ
  6803.  
  6804.    1. Declarations sometimes come in two parts. A declaration that requires a 
  6805.       second part is said to require completion. The second part is called the 
  6806.       completion of the declaration (and of the entity declared), and is either 
  6807.       another declaration, a body, or a pragma. 
  6808.  
  6809.             Name Resolution Rules
  6810.  
  6811.    2. A construct that can be a completion is interpreted as the completion of 
  6812.       a prior declaration only if: 
  6813.  
  6814.         a. The declaration and the completion occur immediately within the same 
  6815.            declarative region; 
  6816.  
  6817.         b. The defining name or defining_program_unit_name in the completion is 
  6818.            the same as in the declaration, or in the case of a pragma, the 
  6819.            pragma applies to the declaration; 
  6820.  
  6821.         c. If the declaration is overloadable, then the completion either has a 
  6822.            type-conformant profile, or is a pragma. 
  6823.  
  6824.   Legality Rules
  6825.  
  6826.    1. An implicit declaration shall not have a completion. For any explicit 
  6827.       declaration that is specified to require completion, there shall be a 
  6828.       corresponding explicit completion. 
  6829.  
  6830.    2. At most one completion is allowed for a given declaration. Additional 
  6831.       requirements on completions appear where each kind of completion is 
  6832.       defined. 
  6833.  
  6834.    3. A type is completely defined at a place that is after its full type 
  6835.       definition (if it has one) and after all of its subcomponent types are 
  6836.       completely defined. A type shall be completely defined before it is 
  6837.       frozen, see 13.14, and 7.3. 
  6838.  
  6839.       NOTES 
  6840.  
  6841.    4. (88) Completions are in principle allowed for any kind of explicit 
  6842.       declaration. However, for some kinds of declaration, the only allowed 
  6843.       completion is a pragma Import, and implementations are not required to 
  6844.       support pragma Import for every kind of entity. 
  6845.  
  6846.    5. (89) There are rules that prevent premature uses of declarations that 
  6847.       have a corresponding completion. The Elaboration_Checks (see 3.11) 
  6848.       prevent such uses at run time for subprograms, protected operations, 
  6849.       tasks, and generic units. The "Freezing Rules" (see 13.14) prevent, at 
  6850.       compile time, premature uses of other entities such as private types and 
  6851.       deferred constants. 
  6852.  
  6853.  
  6854. ΓòÉΓòÉΓòÉ 7. Names and Expressions ΓòÉΓòÉΓòÉ
  6855.  
  6856.    1. The rules applicable to the different forms of name and expression, and 
  6857.       to their evaluation, are given in this section. 
  6858.  
  6859.  4.1                           Names 
  6860.  4.2                           Literals 
  6861.  4.3                           Aggregates 
  6862.  4.4                           Expressions 
  6863.  4.5                           Operators and Expression Evaluation 
  6864.  4.6                           Type Conversions 
  6865.  4.7                           Qualified Expressions 
  6866.  4.8                           Allocators 
  6867.  4.9                           Static Expressions and Static Subtypes --- The 
  6868.                                Detailed Node Listing --- 
  6869.  4.1                           Names 
  6870.  4.1.1                         Indexed Components 
  6871.  4.1.2                         Slices 
  6872.  4.1.3                         Selected Components 
  6873.  4.1.4                         Attributes 
  6874.  4.2                           Literals 
  6875.  4.3                           Aggregates 
  6876.  4.3.1                         Record Aggregates 
  6877.  4.3.2                         Extension Aggregates 
  6878.  4.3.3                         Array Aggregates 
  6879.  4.4                           Expressions 
  6880.  4.5                           Operators and Expression Evaluation 
  6881.  4.5.1                         Logical Operators and Short-circuit Control 
  6882.                                Forms 
  6883.  4.5.2                         Relational Operators and Membership Tests 
  6884.  4.5.3                         Binary Adding Operators 
  6885.  4.5.4                         Unary Adding Operators 
  6886.  4.5.5                         Multiplying Operators 
  6887.  4.5.6                         Highest Precedence Operators 
  6888.  4.6                           Type Conversions 
  6889.  4.7                           Qualified Expressions 
  6890.  4.8                           Allocators 
  6891.  4.9                           Static Expressions and Static Subtypes 
  6892.  4.9.1                         Statically Matching Constraints and Subtypes 
  6893.  
  6894.  
  6895. ΓòÉΓòÉΓòÉ 7.1. Names ΓòÉΓòÉΓòÉ
  6896.  
  6897.    1. Names can denote declared entities, whether declared explicitly or 
  6898.       implicitly, see 3.1. Names can also denote objects or subprograms 
  6899.       designated by access values; the results of type_conversions or 
  6900.       function_calls; subcomponents and slices of objects and values; protected 
  6901.       subprograms, single entries, entry families, and entries in families of 
  6902.       entries. Finally, names can denote attributes of any of the foregoing. 
  6903.  
  6904.             Syntax
  6905.  
  6906.          2.
  6907.  
  6908.                       name ::=
  6909.                          direct_name      | explicit_dereference
  6910.                         | indexed_component   | slice
  6911.                         | selected_component  | attribute_reference
  6912.                         | type_conversion    | function_call
  6913.                         | character_literal
  6914.  
  6915.          3.
  6916.  
  6917.                       direct_name ::= identifier | operator_symbol
  6918.  
  6919.          4.
  6920.  
  6921.                       prefix ::= name | implicit_dereference
  6922.  
  6923.          5.
  6924.  
  6925.                       explicit_dereference ::= name.all
  6926.  
  6927.          6.
  6928.  
  6929.                       implicit_dereference ::= name
  6930.  
  6931.    7. Certain forms of name (indexed_components, selected_components, slices, 
  6932.       and attributes) include a prefix that is either itself a name that 
  6933.       denotes some related entity, or an implicit_dereference of an access 
  6934.       value that designates some related entity. 
  6935.  
  6936.             Name Resolution Rules
  6937.  
  6938.    8. The name in a dereference (either an implicit_dereference or an 
  6939.       explicit_dereference) is expected to be of any access type. 
  6940.  
  6941.             Static Semantics
  6942.  
  6943.    9. If the type of the name in a dereference is some access-to-object type T, 
  6944.       then the dereference denotes a view of an object, the nominal subtype of 
  6945.       the view being the designated subtype of T. 
  6946.  
  6947.   10. If the type of the name in a dereference is some access-to-subprogram 
  6948.       type S, then the dereference denotes a view of a subprogram, the profile 
  6949.       of the view being the designated profile of S. 
  6950.  
  6951.             Dynamic Semantics
  6952.  
  6953.   11. The evaluation of a name determines the entity denoted by the name. This 
  6954.       evaluation has no other effect for a name that is a direct_name or a 
  6955.       character_literal. 
  6956.  
  6957.   12. The evaluation of a name that has a prefix includes the evaluation of the 
  6958.       prefix. The evaluation of a prefix consists of the evaluation of the name 
  6959.       or the implicit_dereference. The prefix denotes the entity denoted by the 
  6960.       name or the implicit_dereference. 
  6961.  
  6962.   13. The evaluation of a dereference consists of the evaluation of the name 
  6963.       and the determination of the object or subprogram that is designated by 
  6964.       the value of the name. A check is made that the value of the name is not 
  6965.       the null access value. Constraint_Error is raised if this check fails. 
  6966.       The dereference denotes the object or subprogram designated by the value 
  6967.       of the name. 
  6968.  
  6969.             Examples
  6970.  
  6971.   14. Examples of direct names: 
  6972.  
  6973.         15.
  6974.  
  6975.                       Pi   -- the direct name of a number       (see 3.3.2)
  6976.                       Limit  -- the direct name of a constant      (see 3.3.1)
  6977.                       Count  -- the direct name of a scalar variable  (see 3.3.1)
  6978.                       Board  -- the direct name of an array variable  (see 3.6.1)
  6979.                       Matrix  -- the direct name of a type        (see 3.6)
  6980.                       Random  -- the direct name of a function      (see 6.1)
  6981.                       Error  -- the direct name of an exception     (see 11.1)
  6982.  
  6983.   16. Examples of dereferences: 
  6984.  
  6985.         17.
  6986.  
  6987.                       Next_Car.all   --  explicit dereference denoting the object
  6988.                               --  designated by the access variable Next_Car,
  6989.                               --  see 3.10.1
  6990.                       Next_Car.Owner  --  selected component with implicit dereference;
  6991.                               --  same as Next_Car.all.Owner
  6992.  
  6993.  4.1.1                         Indexed Components 
  6994.  4.1.2                         Slices 
  6995.  4.1.3                         Selected Components 
  6996.  4.1.4                         Attributes 
  6997.  
  6998.  
  6999. ΓòÉΓòÉΓòÉ 7.1.1. Indexed Components ΓòÉΓòÉΓòÉ
  7000.  
  7001.    1. An indexed_component denotes either a component of an array or an entry 
  7002.       in a family of entries. 
  7003.  
  7004.             Syntax
  7005.  
  7006.          2.
  7007.  
  7008.                       indexed_component ::= prefix(expression {, expression})
  7009.  
  7010.   Name Resolution Rules
  7011.  
  7012.    3. The prefix of an indexed_component with a given number of expressions 
  7013.       shall resolve to denote an array (after any implicit dereference) with 
  7014.       the corresponding number of index positions, or shall resolve to denote 
  7015.       an entry family of a task or protected object (in which case there shall 
  7016.       be only one expression). 
  7017.  
  7018.    4. The expected type for each expression is the corresponding index type. 
  7019.  
  7020.             Static Semantics
  7021.  
  7022.    5. When the prefix denotes an array, the indexed_component denotes the 
  7023.       component of the array with the specified index value(s). The nominal 
  7024.       subtype of the indexed_component is the component subtype of the array 
  7025.       type. 
  7026.  
  7027.    6. When the prefix denotes an entry family, the indexed_component denotes 
  7028.       the individual entry of the entry family with the specified index value. 
  7029.  
  7030.             Dynamic Semantics
  7031.  
  7032.    7. For the evaluation of an indexed_component, the prefix and the 
  7033.       expressions are evaluated in an arbitrary order. The value of each 
  7034.       expression is converted to the corresponding index type. A check is made 
  7035.       that each index value belongs to the corresponding index range of the 
  7036.       array or entry family denoted by the prefix. Constraint_Error is raised 
  7037.       if this check fails. 
  7038.  
  7039.             Examples
  7040.  
  7041.    8. Examples of indexed components: 
  7042.  
  7043.          9.
  7044.  
  7045.                       My_Schedule(Sat)
  7046.                       --  a component of a one-dimensional array  (see see 3.6.1)
  7047.                       Page(10)
  7048.                       --  a component of a one-dimensional array  (see see 3.6)
  7049.                       Board(M, J + 1)
  7050.                       --  a component of a two-dimensional array  (see see 3.6.1)
  7051.                       Page(10)(20)
  7052.                       --  a component of a component        (see see 3.6)
  7053.                       Request(Medium)
  7054.                       --  an entry in a family of entries      (see see 9.1)
  7055.                       Next_Frame(L)(M, N)
  7056.                       --  a component of a function call      (see see 6.1)
  7057.  
  7058.  NOTES 
  7059.  
  7060.   10. (1) Notes on the examples: Distinct notations are used for components of 
  7061.       multidimensional arrays (such as Board) and arrays of arrays (such as 
  7062.       Page). The components of an array of arrays are arrays and can therefore 
  7063.       be indexed. Thus Page(10)(20) denotes the 20th component of Page(10). In 
  7064.       the last example Next_Frame(L) is a function call returning an access 
  7065.       value that designates a two-dimensional array. 
  7066.  
  7067.  
  7068. ΓòÉΓòÉΓòÉ 7.1.2. Slices ΓòÉΓòÉΓòÉ
  7069.  
  7070.    1. A slice denotes a one-dimensional array formed by a sequence of 
  7071.       consecutive components of a one-dimensional array. A slice of a variable 
  7072.       is a variable; a slice of a constant is a constant; a slice of a value is 
  7073.       a value. 
  7074.  
  7075.             Syntax
  7076.  
  7077.          2.
  7078.  
  7079.                       slice ::= prefix(discrete_range)
  7080.  
  7081.   Name Resolution Rules
  7082.  
  7083.    3. The prefix of a slice shall resolve to denote a one-dimensional array 
  7084.       (after any implicit dereference). 
  7085.  
  7086.    4. The expected type for the discrete_range of a slice is the index type of 
  7087.       the array type. 
  7088.  
  7089.             Static Semantics
  7090.  
  7091.    5. A slice denotes a one-dimensional array formed by the sequence of 
  7092.       consecutive components of the array denoted by the prefix, corresponding 
  7093.       to the range of values of the index given by the discrete_range. 
  7094.  
  7095.    6. The type of the slice is that of the prefix. Its bounds are those defined 
  7096.       by the discrete_range. 
  7097.  
  7098.             Dynamic Semantics
  7099.  
  7100.    7. For the evaluation of a slice, the prefix and the discrete_range are 
  7101.       evaluated in an arbitrary order. If the slice is not a null slice (a 
  7102.       slice where the discrete_range is a null range), then a check is made 
  7103.       that the bounds of the discrete_range belong to the index range of the 
  7104.       array denoted by the prefix. Constraint_Error is raised if this check 
  7105.       fails. 
  7106.  
  7107.       NOTES 
  7108.  
  7109.    8. (2) A slice is not permitted as the prefix of an Access 
  7110.       attribute_reference, even if the components or the array as a whole are 
  7111.       aliased (see 3.10.2). 
  7112.  
  7113.    9. (3) For a one-dimensional array A, the slice A(N ┬╖┬╖ N) denotes an array 
  7114.       that has only one component; its type is the type of A. On the other 
  7115.       hand, A(N) denotes a component of the array A and has the corresponding 
  7116.       component type. 
  7117.  
  7118.             Examples
  7119.  
  7120.   10. Examples of slices: 
  7121.  
  7122.         11.
  7123.  
  7124.                       Stars(1 ┬╖┬╖ 15)
  7125.                       --  a slice of 15 characters     (see 3.6.3)
  7126.                       Page(10 ┬╖┬╖ 10 + Size)
  7127.                       --  a slice of 1 + Size components  (see 3.6)
  7128.                       Page(L)(A ┬╖┬╖ B)
  7129.                       --  a slice of the array Page(L)   (see 3.6)
  7130.                       Stars(1 ┬╖┬╖ 0)
  7131.                       --  a null slice           (see 3.6.3)
  7132.                       My_Schedule(Weekday)
  7133.                       --  bounds given by subtype      (see 3.6.1, and 3.5.1)
  7134.                       Stars(5 ┬╖┬╖ 15)(K)
  7135.                       --  same as Stars(K)         (see 3.6.3)
  7136.                       --  provided that K is in 5 ┬╖┬╖ 15
  7137.  
  7138.  
  7139. ΓòÉΓòÉΓòÉ 7.1.3. Selected Components ΓòÉΓòÉΓòÉ
  7140.  
  7141.    1. Selected_components are used to denote components (including 
  7142.       discriminants), entries, entry families, and protected subprograms; they 
  7143.       are also used as expanded names as described below. 
  7144.  
  7145.             Syntax
  7146.  
  7147.          2.
  7148.  
  7149.                       selected_component ::= prefix . selector_name
  7150.  
  7151.          3.
  7152.  
  7153.                       selector_name ::= identifier | character_literal | operator_symbol
  7154.  
  7155.   Name Resolution Rules
  7156.  
  7157.    4. A selected_component is called an expanded name if, according to the 
  7158.       visibility rules, at least one possible interpretation of its prefix 
  7159.       denotes a package or an enclosing named construct (directly, not through 
  7160.       a subprogram_renaming_declaration or generic_renaming_declaration). 
  7161.  
  7162.    5. A selected_component that is not an expanded name shall resolve to denote 
  7163.       one of the following: 
  7164.  
  7165.         a. A component (including a discriminant): 
  7166.  
  7167.              1. The prefix shall resolve to denote an object or value of some 
  7168.                 non-array composite type (after any implicit dereference). The 
  7169.                 selector_name shall resolve to denote a 
  7170.                 discriminant_specification of the type, or, unless the type is 
  7171.                 a protected type, a component_declaration of the type. The 
  7172.                 selected_component denotes the corresponding component of the 
  7173.                 object or value. 
  7174.  
  7175.         a. A single entry, an entry family, or a protected subprogram: 
  7176.  
  7177.              1. The prefix shall resolve to denote an object or value of some 
  7178.                 task or protected type (after any implicit dereference). The 
  7179.                 selector_name shall resolve to denote an entry_declaration or 
  7180.                 subprogram_declaration occurring (implicitly or explicitly) 
  7181.                 within the visible part of that type. The selected_component 
  7182.                 denotes the corresponding entry, entry family, or protected 
  7183.                 subprogram. 
  7184.  
  7185.    1. An expanded name shall resolve to denote a declaration that occurs 
  7186.       immediately within a named declarative region, as follows: 
  7187.  
  7188.         a. The prefix shall resolve to denote either a package (including the 
  7189.            current instance of a generic package, or a rename of a package), or 
  7190.            an enclosing named construct. 
  7191.  
  7192.         b. The selector_name shall resolve to denote a declaration that occurs 
  7193.            immediately within the declarative region of the package or 
  7194.            enclosing construct (the declaration shall be visible at the place 
  7195.            of the expanded name --  see 8.3.). The expanded name denotes that 
  7196.            declaration. 
  7197.  
  7198.         c. If the prefix does not denote a package, then it shall be a 
  7199.            direct_name or an expanded name, and it shall resolve to denote a 
  7200.            program unit (other than a package), the current instance of a type, 
  7201.            a block_statement, a loop_statement, or an accept_statement (in the 
  7202.            case of an accept_statement or entry_body, no family index is 
  7203.            allowed); the expanded name shall occur within the declarative 
  7204.            region of this construct. Further, if this construct is a callable 
  7205.            construct and the prefix denotes more than one such enclosing 
  7206.            callable construct, then the expanded name is ambiguous, 
  7207.            independently of the selector_name. 
  7208.  
  7209.   Dynamic Semantics
  7210.  
  7211.    1. The evaluation of a selected_component includes the evaluation of the 
  7212.       prefix. 
  7213.  
  7214.    2. For a selected_component that denotes a component of a variant, a check 
  7215.       is made that the values of the discriminants are such that the value or 
  7216.       object denoted by the prefix has this component. The exception 
  7217.       Constraint_Error is raised if this check fails. 
  7218.  
  7219.             Examples
  7220.  
  7221.    3. Examples of selected components: 
  7222.  
  7223.          4.
  7224.  
  7225.                       Tomorrow.Month
  7226.                       --  a record component           (see 3.8)
  7227.                       Next_Car.Owner
  7228.                       --  a record component           (see 3.10.1)
  7229.                       Next_Car.Owner.Age
  7230.                       --  a record component           (see 3.10.1)
  7231.                       --  the previous two lines involve implicit dereferences
  7232.                       Writer.Unit
  7233.                       --  a record component (a discriminant)  (see 3.8.1)
  7234.                       Min_Cell(H).Value
  7235.                       --  a record component of the result    (see 6.1)
  7236.                       --  of the function call Min_Cell(H)
  7237.                       Control.Seize
  7238.                       --  an entry of a protected object     (see 9.4)
  7239.                       Pool(K).Write
  7240.                       --  an entry of the task Pool(K)      (see 9.4)
  7241.  
  7242.    5. Examples of expanded names: 
  7243.  
  7244.          6.
  7245.  
  7246.                       Key_Manager."<"
  7247.                       --  an operator of the visible part of a package  (see 7.3.1)
  7248.                       Dot_Product.Sum
  7249.                       --  a variable declared in a function body     (see 6.1)
  7250.                       Buffer.Pool
  7251.                       --  a variable declared in a protected unit     (see 9.11)
  7252.                       Buffer.Read
  7253.                       --  an entry of a protected unit          (see 9.11)
  7254.                       Swap.Temp
  7255.                       --  a variable declared in a block statement    (see 5.6)
  7256.                       Standard.Boolean
  7257.                       --  the name of a predefined type          (see A.1)
  7258.  
  7259.  
  7260. ΓòÉΓòÉΓòÉ 7.1.4. Attributes ΓòÉΓòÉΓòÉ
  7261.  
  7262.    1. An attribute is a characteristic of an entity that can be queried via an 
  7263.       attribute_reference or a range_attribute_reference. 
  7264.  
  7265.             Syntax
  7266.  
  7267.          2.
  7268.  
  7269.                       attribute_reference ::= prefix'attribute_designator
  7270.  
  7271.          3.
  7272.  
  7273.                       attribute_designator ::=
  7274.                          identifier[(static_expression)]
  7275.                         | Access | Delta | Digits
  7276.  
  7277.          4.
  7278.  
  7279.                       range_attribute_reference ::= prefix'range_attribute_designator
  7280.  
  7281.          5.
  7282.  
  7283.                       range_attribute_designator ::= Range[(static_expression)]
  7284.  
  7285.   Name Resolution Rules
  7286.  
  7287.    6. In an attribute_reference, if the attribute_designator is for an 
  7288.       attribute defined for (at least some) objects of an access type, then the 
  7289.       prefix is never interpreted as an implicit_dereference; otherwise (and 
  7290.       for all range_attribute_references), if the type of the name within the 
  7291.       prefix is of an access type, the prefix is interpreted as an 
  7292.       implicit_dereference. Similarly, if the attribute_designator is for an 
  7293.       attribute defined for (at least some) functions, then the prefix is never 
  7294.       interpreted as a parameterless function_call; otherwise (and for all 
  7295.       range_attribute_references), if the prefix consists of a name that 
  7296.       denotes a function, it is interpreted as a parameterless function_call. 
  7297.  
  7298.    7. The expression, if any, in an attribute_designator or 
  7299.       range_attribute_designator is expected to be of any integer type. 
  7300.  
  7301.             Legality Rules
  7302.  
  7303.    8. The expression, if any, in an attribute_designator or 
  7304.       range_attribute_designator shall be static. 
  7305.  
  7306.             Static Semantics
  7307.  
  7308.    9. An attribute_reference denotes a value, an object, a subprogram, or some 
  7309.       other kind of program entity. 
  7310.  
  7311.   10. A range_attribute_reference X'Range(N) is equivalent to the range 
  7312.       X'First(N) ┬╖┬╖ X'Last(N), except that the prefix is only evaluated once. 
  7313.       Similarly, X'Range is equivalent to X'First ┬╖┬╖ X'Last, except that the 
  7314.       prefix is only evaluated once. 
  7315.  
  7316.             Dynamic Semantics
  7317.  
  7318.   11. The evaluation of an attribute_reference (or range_attribute_reference) 
  7319.       consists of the evaluation of the prefix. 
  7320.  
  7321.             Implementation Permissions
  7322.  
  7323.   12. An implementation may provide implementation-defined attributes; the 
  7324.       identifier for an implementation-defined attribute shall differ from 
  7325.       those of the language-defined attributes. 
  7326.  
  7327.       NOTES 
  7328.  
  7329.   13. (4) Attributes are defined throughout this International Standard, and 
  7330.       are summarized in K: ``Annex K.''. 
  7331.  
  7332.   14. (5) In general, the name in a prefix of an attribute_reference (or a 
  7333.       range_attribute_reference) has to be resolved without using any context. 
  7334.       However, in the case of the Access attribute, the expected type for the 
  7335.       prefix has to be a single access type, and if it is an 
  7336.       access-to-subprogram type, see 3.10.2, then the resolution of the name 
  7337.       can use the fact that the profile of the callable entity denoted by the 
  7338.       prefix has to be type conformant with the designated profile of the 
  7339.       access type. 
  7340.  
  7341.             Examples
  7342.  
  7343.   15. Examples of attributes: 
  7344.  
  7345.         16.
  7346.  
  7347.                       Color'First
  7348.                       -- minimum value of the enumeration type Color   (see 3.5.1)
  7349.                       Rainbow'Base'First
  7350.                       -- same as Color'First               (see 3.5.1)
  7351.                       Real'Digits
  7352.                       -- precision of the type Real           (see 3.5.7)
  7353.                       Board'Last(2)
  7354.                       -- upper bound of the second dimension of Board  (see 3.6.1)
  7355.                       Board'Range(1)
  7356.                       -- index range of the first dimension of Board   (see 3.6.1)
  7357.                       Pool(K)'Terminated
  7358.                       -- True if task Pool(K) is terminated       (see 9.1)
  7359.                       Date'Size
  7360.                       -- number of bits for records of type Date     (see 3.8)
  7361.                       Message'Address
  7362.                       -- address of the record variable Message     (see 3.7.1)
  7363.  
  7364.  
  7365. ΓòÉΓòÉΓòÉ 7.2. Literals ΓòÉΓòÉΓòÉ
  7366.  
  7367.    1. A literal represents a value literally, that is, by means of notation 
  7368.       suited to its kind. A literal is either a numeric_literal, a 
  7369.       character_literal, the literal null, or a string_literal. 
  7370.  
  7371.             Name Resolution Rules
  7372.  
  7373.    2. The expected type for a literal null shall be a single access type. 
  7374.  
  7375.    3. For a name that consists of a character_literal, either its expected type 
  7376.       shall be a single character type, in which case it is interpreted as a 
  7377.       parameterless function_call that yields the corresponding value of the 
  7378.       character type, or its expected profile shall correspond to a 
  7379.       parameterless function with a character result type, in which case it is 
  7380.       interpreted as the name of the corresponding parameterless function 
  7381.       declared as part of the character type's definition, see 3.5.1. In either 
  7382.       case, the character_literal denotes the 
  7383.       enumeration_literal_specification. 
  7384.  
  7385.    4. The expected type for a primary that is a string_literal shall be a 
  7386.       single string type. 
  7387.  
  7388.             Legality Rules
  7389.  
  7390.    5. A character_literal that is a name shall correspond to a 
  7391.       defining_character_literal of the expected type, or of the result type of 
  7392.       the expected profile. 
  7393.  
  7394.    6. For each character of a string_literal with a given expected string type, 
  7395.       there shall be a corresponding defining_character_literal of the 
  7396.       component type of the expected string type. 
  7397.  
  7398.    7. A literal null shall not be of an anonymous access type, since such types 
  7399.       do not have a null value, see 3.10. 
  7400.  
  7401.             Static Semantics
  7402.  
  7403.    8. An integer literal is of type universal_integer. A real literal is of 
  7404.       type universal_real. 
  7405.  
  7406.             Dynamic Semantics
  7407.  
  7408.    9. The evaluation of a numeric literal, or the literal null, yields the 
  7409.       represented value. 
  7410.  
  7411.   10. The evaluation of a string_literal that is a primary yields an array 
  7412.       value containing the value of each character of the sequence of 
  7413.       characters of the string_literal, as defined in 2.6. The bounds of this 
  7414.       array value are determined according to the rules for 
  7415.       positional_array_aggregates (see 4.3.3), except that for a null string 
  7416.       literal the upper bound is the predecessor of the lower bound. 
  7417.  
  7418.   11. For the evaluation of a string_literal of type T, a check is made that 
  7419.       the value of each character of the string_literal belongs to the 
  7420.       component subtype of T. For the evaluation of a null string literal, a 
  7421.       check is made that its lower bound is greater than the lower bound of the 
  7422.       base range of the index type. The exception Constraint_Error is raised if 
  7423.       either of these checks fails. 
  7424.  
  7425.       NOTES 
  7426.  
  7427.   12. (6) Enumeration literals that are identifiers rather than 
  7428.       character_literals follow the normal rules for identifiers when used in a 
  7429.       name, see 4.1, and 4.1.3. Character_literals used as selector_names 
  7430.       follow the normal rules for expanded names, see 4.1.3. 
  7431.  
  7432.             Examples
  7433.  
  7434.   13. Examples of literals: 
  7435.  
  7436.         14.
  7437.  
  7438.                       3.14159_26536   --  a real literal
  7439.                       1_345       --  an integer literal
  7440.                       'A'        --  a character literal
  7441.                       "Some Text"    --  a string literal
  7442.  
  7443.  
  7444. ΓòÉΓòÉΓòÉ 7.3. Aggregates ΓòÉΓòÉΓòÉ
  7445.  
  7446.    1. An aggregate combines component values into a composite value of an array 
  7447.       type, record type, or record extension. 
  7448.  
  7449.             Syntax
  7450.  
  7451.          2.
  7452.  
  7453.                       aggregate ::=
  7454.                         record_aggregate | extension_aggregate | array_aggregate
  7455.  
  7456.   Name Resolution Rules
  7457.  
  7458.    3. The expected type for an aggregate shall be a single nonlimited array 
  7459.       type, record type, or record extension. 
  7460.  
  7461.             Legality Rules
  7462.  
  7463.    4. An aggregate shall not be of a class-wide type. 
  7464.  
  7465.             Dynamic Semantics
  7466.  
  7467.    5. For the evaluation of an aggregate, an anonymous object is created and 
  7468.       values for the components or ancestor part are obtained (as described in 
  7469.       the subsequent subclause for each kind of the aggregate) and assigned 
  7470.       into the corresponding components or ancestor part of the anonymous 
  7471.       object. Obtaining the values and the assignments occur in an arbitrary 
  7472.       order. The value of the aggregate is the value of this object. 
  7473.  
  7474.    6. If an aggregate is of a tagged type, a check is made that its value 
  7475.       belongs to the first subtype of the type. Constraint_Error is raised if 
  7476.       this check fails. 
  7477.  
  7478.  4.3.1                         Record Aggregates 
  7479.  4.3.2                         Extension Aggregates 
  7480.  4.3.3                         Array Aggregates 
  7481.  
  7482.  
  7483. ΓòÉΓòÉΓòÉ 7.3.1. Record Aggregates ΓòÉΓòÉΓòÉ
  7484.  
  7485.    1. In a record_aggregate, a value is specified for each component of the 
  7486.       record or record extension value, using either a named or a positional 
  7487.       association. 
  7488.  
  7489.             Syntax
  7490.  
  7491.          2.
  7492.  
  7493.                       record_aggregate ::= (record_component_association_list)
  7494.  
  7495.          3.
  7496.  
  7497.                       record_component_association_list ::=
  7498.                          record_component_association {, record_component_association}
  7499.                         | null record
  7500.  
  7501.          4.
  7502.  
  7503.                       record_component_association ::=
  7504.                         [ component_choice_list => ] expression
  7505.  
  7506.          5.
  7507.  
  7508.                       component_choice_list ::=
  7509.                          component_selector_name {| component_selector_name}
  7510.                         | others
  7511.  
  7512.         a. A record_component_association is a named component association if 
  7513.            it has a component_choice_list; otherwise, it is a positional 
  7514.            component association. Any positional component associations shall 
  7515.            precede any named component associations. If there is a named 
  7516.            association with a component_choice_list of others, it shall come 
  7517.            last. 
  7518.  
  7519.         b. In the record_component_association_list for a record_aggregate, if 
  7520.            there is only one association, it shall be a named association. 
  7521.  
  7522.   Name Resolution Rules
  7523.  
  7524.    1. The expected type for a record_aggregate shall be a single nonlimited 
  7525.       record type or record extension. 
  7526.  
  7527.    2. For the record_component_association_list of a record_aggregate, all 
  7528.       components of the composite value defined by the aggregate are needed; 
  7529.       for the association list of an extension_aggregate, only those components 
  7530.       not determined by the ancestor expression or subtype are needed, see 
  7531.       4.3.2. Each selector_name in a record_component_association shall denote 
  7532.       a needed component (including possibly a discriminant). 
  7533.  
  7534.    3. The expected type for the expression of a record_component_association is 
  7535.       the type of the associated component(s); the associated component(s) are 
  7536.       as follows: 
  7537.  
  7538.         a. For a positional association, the component (including possibly a 
  7539.            discriminant) in the corresponding relative position (in the 
  7540.            declarative region of the type), counting only the needed 
  7541.            components; 
  7542.  
  7543.         b. For a named association with one or more component_selector_names, 
  7544.            the named component(s); 
  7545.  
  7546.         c. For a named association with the reserved word others, all needed 
  7547.            components that are not associated with some previous association. 
  7548.  
  7549.   Legality Rules
  7550.  
  7551.    1. If the type of a record_aggregate is a record extension, then it shall be 
  7552.       a descendant of a record type, through one or more record extensions (and 
  7553.       no private extensions). 
  7554.  
  7555.    2. If there are no components needed in a given 
  7556.       record_component_association_list, then the reserved words null record 
  7557.       shall appear rather than a list of record_component_associations. 
  7558.  
  7559.    3. Each record_component_association shall have at least one associated 
  7560.       component, and each needed component shall be associated with exactly one 
  7561.       record_component_association. If a record_component_association has two 
  7562.       or more associated components, all of them shall be of the same type. 
  7563.  
  7564.    4. If the components of a variant_part are needed, then the value of a 
  7565.       discriminant that governs the variant_part shall be given by a static 
  7566.       expression. 
  7567.  
  7568.             Dynamic Semantics
  7569.  
  7570.    5. The evaluation of a record_aggregate consists of the evaluation of the 
  7571.       record_component_association_list. 
  7572.  
  7573.    6. For the evaluation of a record_component_association_list, any per-object 
  7574.       constraints, see 3.8, for components specified in the association list 
  7575.       are elaborated and any expressions are evaluated and converted to the 
  7576.       subtype of the associated component. Any constraint elaborations and 
  7577.       expression evaluations (and conversions) occur in an arbitrary order, 
  7578.       except that the expression for a discriminant is evaluated (and 
  7579.       converted) prior to the elaboration of any per-object constraint that 
  7580.       depends on it, which in turn occurs prior to the evaluation and 
  7581.       conversion of the expression for the component with the per-object 
  7582.       constraint. 
  7583.  
  7584.    7. The expression of a record_component_association is evaluated (and 
  7585.       converted) once for each associated component. 
  7586.  
  7587.       NOTES 
  7588.  
  7589.    8. (7) For a record_aggregate with positional associations, expressions 
  7590.       specifying discriminant values appear first since the 
  7591.       known_discriminant_part is given first in the declaration of the type; 
  7592.       they have to be in the same order as in the known_discriminant_part. 
  7593.  
  7594.             Examples
  7595.  
  7596.    9. Example of a record aggregate with positional associations: 
  7597.  
  7598.         10.
  7599.  
  7600.                       (4, July, 1776)  --  see 3.8
  7601.  
  7602.   11. Examples of record aggregates with named associations: 
  7603.  
  7604.         12.
  7605.  
  7606.                       (Day => 4, Month => July, Year => 1776)
  7607.                       (Month => July, Day => 4, Year => 1776)
  7608.  
  7609.         13.
  7610.  
  7611.                       (Disk, Closed, Track => 5, Cylinder => 12)  --  see 3.8.1
  7612.                       (Unit => Disk, Status => Closed, Cylinder => 9, Track => 1)
  7613.  
  7614.   14. Example of component association with several choices: 
  7615.  
  7616.         15.
  7617.  
  7618.                       (Value => 0, Succ|Pred => new Cell'(0, null, null))
  7619.                       --  see 3.10.1
  7620.  
  7621.         16.
  7622.  
  7623.                       --  The allocator is evaluated twice:
  7624.                       --  Succ and Pred designate different cells
  7625.  
  7626.   17. Examples of record aggregates for tagged types, see 3.9, and 3.9.1 
  7627.  
  7628.         18.
  7629.  
  7630.                       Expression'(null record)
  7631.                       Literal'(Value => 0.0)
  7632.                       Painted_Point'(0.0, Pi/2.0, Paint => Red)
  7633.  
  7634.  
  7635. ΓòÉΓòÉΓòÉ 7.3.2. Extension Aggregates ΓòÉΓòÉΓòÉ
  7636.  
  7637.    1. An extension_aggregate specifies a value for a type that is a record 
  7638.       extension by specifying a value or subtype for an ancestor of the type, 
  7639.       followed by associations for any components not determined by the 
  7640.       ancestor_part. 
  7641.  
  7642.             Syntax
  7643.  
  7644.          2.
  7645.  
  7646.                       extension_aggregate ::=
  7647.                         (ancestor_part with record_component_association_list)
  7648.  
  7649.          3.
  7650.  
  7651.                       ancestor_part ::= expression | subtype_mark
  7652.  
  7653.   Name Resolution Rules
  7654.  
  7655.    4. The expected type for an extension_aggregate shall be a single nonlimited 
  7656.       type that is a record extension. If the ancestor_part is an expression, 
  7657.       it is expected to be of any nonlimited tagged type. 
  7658.  
  7659.             Legality Rules
  7660.  
  7661.    5. If the ancestor_part is a subtype_mark, it shall denote a specific tagged 
  7662.       subtype. The type of the extension_aggregate shall be derived from the 
  7663.       type of the ancestor_part, through one or more record extensions (and no 
  7664.       private extensions). 
  7665.  
  7666.             Static Semantics
  7667.  
  7668.    6. For the record_component_association_list of an extension_aggregate, the 
  7669.       only components needed are those of the composite value defined by the 
  7670.       aggregate that are not inherited from the type of the ancestor_part, plus 
  7671.       any inherited discriminants if the ancestor_part is a subtype_mark that 
  7672.       denotes an unconstrained subtype. 
  7673.  
  7674.             Dynamic Semantics
  7675.  
  7676.    7. For the evaluation of an extension_aggregate, the 
  7677.       record_component_association_list is evaluated. If the ancestor_part is 
  7678.       an expression, it is also evaluated; if the ancestor_part is a 
  7679.       subtype_mark, the components of the value of the aggregate not given by 
  7680.       the record_component_association_list are initialized by default as for 
  7681.       an object of the ancestor type. Any implicit initializations or 
  7682.       evaluations are performed in an arbitrary order, except that the 
  7683.       expression for a discriminant is evaluated prior to any other evaluation 
  7684.       or initialization that depends on it. 
  7685.  
  7686.    8. If the type of the ancestor_part has discriminants that are not inherited 
  7687.       by the type of the extension_aggregate, then, unless the ancestor_part is 
  7688.       a subtype_mark that denotes an unconstrained subtype, a check is made 
  7689.       that each discriminant of the ancestor has the value specified for a 
  7690.       corresponding discriminant, either in the 
  7691.       record_component_association_list, or in the derived_type_definition for 
  7692.       some ancestor of the type of the extension_aggregate. Constraint_Error is 
  7693.       raised if this check fails. 
  7694.  
  7695.       NOTES 
  7696.  
  7697.    9. (8) If all components of the value of the extension_aggregate are 
  7698.       determined by the ancestor_part, then the 
  7699.       record_component_association_list is required to be simply null record. 
  7700.  
  7701.   10. (9) If the ancestor_part is a subtype_mark, then its type can be 
  7702.       abstract. If its type is controlled, then as the last step of evaluating 
  7703.       the aggregate, the Initialize procedure of the ancestor type is called, 
  7704.       unless the Initialize procedure is abstract, see 7.6. 
  7705.  
  7706.             Examples
  7707.  
  7708.   11. Examples of extension aggregates (for types defined in 3.9.1.): 
  7709.  
  7710.         12.
  7711.  
  7712.                       Painted_Point'(Point with Red)
  7713.                       (Point'(P) with Paint => Black)
  7714.  
  7715.         13.
  7716.  
  7717.                       (Expression with Left => 1.2, Right => 3.4)
  7718.                       Addition'(Binop with null record)
  7719.                       -- presuming Binop is of type Binary_Operation
  7720.  
  7721.  
  7722. ΓòÉΓòÉΓòÉ 7.3.3. Array Aggregates ΓòÉΓòÉΓòÉ
  7723.  
  7724.    1. In an array_aggregate, a value is specified for each component of an 
  7725.       array, either positionally or by its index. For a 
  7726.       positional_array_aggregate, the components are given in increasing-index 
  7727.       order, with a final others, if any, representing any remaining 
  7728.       components. For a named_array_aggregate, the components are identified by 
  7729.       the values covered by the discrete_choices. 
  7730.  
  7731.             Syntax
  7732.  
  7733.          2.
  7734.  
  7735.                       array_aggregate ::=
  7736.                         positional_array_aggregate | named_array_aggregate
  7737.  
  7738.          3.
  7739.  
  7740.                       positional_array_aggregate ::=
  7741.                          (expression, expression {, expression})
  7742.                         | (expression {, expression}, others => expression)
  7743.  
  7744.          4.
  7745.  
  7746.                       named_array_aggregate ::=
  7747.                         (array_component_association {, array_component_association})
  7748.  
  7749.          5.
  7750.  
  7751.                       array_component_association ::=
  7752.                         discrete_choice_list => expression
  7753.  
  7754.    6. An n-dimensional array_aggregate is one that is written as n levels of 
  7755.       nested array_aggregates (or at the bottom level, equivalent 
  7756.       string_literals). For the multidimensional case (n >= 2) the 
  7757.       array_aggregates (or equivalent string_literals) at the n-1 lower levels 
  7758.       are called subaggregates of the enclosing n-dimensional array_aggregate. 
  7759.       The expressions of the bottom level subaggregates (or of the 
  7760.       array_aggregate itself if one-dimensional) are called the array component 
  7761.       expressions of the enclosing n-dimensional array_aggregate. 
  7762.  
  7763.             Name Resolution Rules
  7764.  
  7765.    7. The expected type for an array_aggregate (that is not a subaggregate) 
  7766.       shall be a single nonlimited array type. The component type of this array 
  7767.       type is the expected type for each array component expression of the 
  7768.       array_aggregate. 
  7769.  
  7770.    8. The expected type for each discrete_choice in any discrete_choice_list of 
  7771.       a named_array_aggregate is the type of the corresponding index; the 
  7772.       corresponding index for an array_aggregate that is not a subaggregate is 
  7773.       the first index of its type; for an (n-m)-dimensional subaggregate within 
  7774.       an array_aggregate of an n-dimensional type, the corresponding index is 
  7775.       the index in position m+1. 
  7776.  
  7777.             Legality Rules
  7778.  
  7779.    9. An array_aggregate of an n-dimensional array type shall be written as an 
  7780.       n-dimensional array_aggregate. 
  7781.  
  7782.   10. An others choice is allowed for an array_aggregate only if an applicable 
  7783.       index constraint applies to the array_aggregate. An applicable index 
  7784.       constraint is a constraint provided by certain contexts where an 
  7785.       array_aggregate is permitted that can be used to determine the bounds of 
  7786.       the array value specified by the aggregate. Each of the following 
  7787.       contexts (and none other) defines an applicable index constraint: 
  7788.  
  7789.         a. For an explicit_actual_parameter, an 
  7790.            explicit_generic_actual_parameter, the expression of a 
  7791.            return_statement, the initialization expression in an 
  7792.            object_declaration, or a default_expression (for a parameter or a 
  7793.            component), when the nominal subtype of the corresponding formal 
  7794.            parameter, generic formal parameter, function result, object, or 
  7795.            component is a constrained array subtype, the applicable index 
  7796.            constraint is the constraint of the subtype; 
  7797.  
  7798.         b. For the expression of an assignment_statement where the name denotes 
  7799.            an array variable, the applicable index constraint is the constraint 
  7800.            of the array variable; 
  7801.  
  7802.         c. For the operand of a qualified_expression whose subtype_mark denotes 
  7803.            a constrained array subtype, the applicable index constraint is the 
  7804.            constraint of the subtype; 
  7805.  
  7806.         d. For a component expression in an aggregate, if the component's 
  7807.            nominal subtype is a constrained array subtype, the applicable index 
  7808.            constraint is the constraint of the subtype; 
  7809.  
  7810.         e. For a parenthesized expression, the applicable index constraint is 
  7811.            that, if any, defined for the expression. 
  7812.  
  7813.    1. The applicable index constraint applies to an array_aggregate that 
  7814.       appears in such a context, as well as to any subaggregates thereof. In 
  7815.       the case of an explicit_actual_parameter (or default_expression) for a 
  7816.       call on a generic formal subprogram, no applicable index constraint is 
  7817.       defined. 
  7818.  
  7819.    2. The discrete_choice_list of an array_component_association is allowed to 
  7820.       have a discrete_choice that is a nonstatic expression or that is a 
  7821.       discrete_range that defines a nonstatic or null range, only if it is the 
  7822.       single discrete_choice of its discrete_choice_list, and there is only one 
  7823.       array_component_association in the array_aggregate. 
  7824.  
  7825.    3. In a named_array_aggregate with more than one discrete_choice, no two 
  7826.       discrete_choices are allowed to cover the same value, see 3.8.1, if there 
  7827.       is no others choice, the discrete_choices taken together shall exactly 
  7828.       cover a contiguous sequence of values of the corresponding index type. 
  7829.  
  7830.    4. A bottom level subaggregate of a multidimensional array_aggregate of a 
  7831.       given array type is allowed to be a string_literal only if the component 
  7832.       type of the array type is a character type; each character of such a 
  7833.       string_literal shall correspond to a defining_character_literal of the 
  7834.       component type. 
  7835.  
  7836.             Static Semantics
  7837.  
  7838.    5. A subaggregate that is a string_literal is equivalent to one that is a 
  7839.       positional_array_aggregate of the same length, with each expression being 
  7840.       the character_literal for the corresponding character of the 
  7841.       string_literal. 
  7842.  
  7843.             Dynamic Semantics
  7844.  
  7845.    6. The evaluation of an array_aggregate of a given array type proceeds in 
  7846.       two steps: 
  7847.  
  7848.         a. Any discrete_choices of this aggregate and of its subaggregates are 
  7849.            evaluated in an arbitrary order, and converted to the corresponding 
  7850.            index type; 
  7851.  
  7852.         b. The array component expressions of the aggregate are evaluated in an 
  7853.            arbitrary order and their values are converted to the component 
  7854.            subtype of the array type; an array component expression is 
  7855.            evaluated once for each associated component. 
  7856.  
  7857.    1. The bounds of the index range of an array_aggregate (including a 
  7858.       subaggregate) are determined as follows: 
  7859.  
  7860.         a. For an array_aggregate with an others choice, the bounds are those 
  7861.            of the corresponding index range from the applicable index 
  7862.            constraint; 
  7863.  
  7864.         b. For a positional_array_aggregate (or equivalent string_literal) 
  7865.            without an others choice, the lower bound is that of the 
  7866.            corresponding index range in the applicable index constraint, if 
  7867.            defined, or that of the corresponding index subtype, if not; in 
  7868.            either case, the upper bound is determined from the lower bound and 
  7869.            the number of expressions (or the length of the string_literal); 
  7870.  
  7871.         c. For a named_array_aggregate without an others choice, the bounds are 
  7872.            determined by the smallest and largest index values covered by any 
  7873.            discrete_choice_list. 
  7874.  
  7875.    1. For an array_aggregate, a check is made that the index range defined by 
  7876.       its bounds is compatible with the corresponding index subtype. 
  7877.  
  7878.    2. For an array_aggregate with an others choice, a check is made that no 
  7879.       expression is specified for an index value outside the bounds determined 
  7880.       by the applicable index constraint. 
  7881.  
  7882.    3. For a multidimensional array_aggregate, a check is made that all 
  7883.       subaggregates that correspond to the same index have the same bounds. 
  7884.  
  7885.    4. The exception Constraint_Error is raised if any of the above checks fail. 
  7886.  
  7887.       NOTES 
  7888.  
  7889.    5. (10) In an array_aggregate, positional notation may only be used with two 
  7890.       or more expressions; a single expression in parentheses is interpreted as 
  7891.       a parenthesized_expression. A named_array_aggregate, such as (1 => X), 
  7892.       may be used to specify an array with a single component. 
  7893.  
  7894.             Examples
  7895.  
  7896.    6. Examples of array aggregates with positional associations: 
  7897.  
  7898.          7.
  7899.  
  7900.                       (7, 9, 5, 1, 3, 2, 4, 8, 6, 0)
  7901.                       Table'(5, 8, 4, 1, others => 0)  --  see 3.6
  7902.  
  7903.    8. Examples of array aggregates with named associations: 
  7904.  
  7905.          9.
  7906.  
  7907.                       (1 ┬╖┬╖ 5 => (1 ┬╖┬╖ 8 => 0.0))  --  two-dimensional
  7908.                       (1 ┬╖┬╖ N => new Cell)     --  N new cells, in particular for N = 0
  7909.  
  7910.         10.
  7911.  
  7912.                       Table'(2 | 4 | 10 => 1, others => 0)
  7913.                       Schedule'(Mon ┬╖┬╖ Fri => True,  others => False)
  7914.                       Schedule'(Wed | Sun  => False, others => True)
  7915.                       --  see 3.6
  7916.                       Vector'(1 => 2.5)
  7917.                       --  single-component vector
  7918.  
  7919.   11. Examples of two-dimensional array aggregates: 
  7920.  
  7921.         12.
  7922.  
  7923.                       -- Three aggregates for the same value of subtype
  7924.                       --  Matrix(1┬╖┬╖2,1┬╖┬╖3), see 3.6
  7925.  
  7926.         13.
  7927.  
  7928.                       ((1.1, 1.2, 1.3), (2.1, 2.2, 2.3))
  7929.                       (1 => (1.1, 1.2, 1.3), 2 => (2.1, 2.2, 2.3))
  7930.                       (1 => (1 => 1.1, 2 => 1.2, 3 => 1.3),
  7931.                        2 => (1 => 2.1, 2 => 2.2, 3 => 2.3))
  7932.  
  7933.   14. Examples of aggregates as initial values: 
  7934.  
  7935.         15.
  7936.  
  7937.                       A : Table := (7, 9, 5, 1, 3, 2, 4, 8, 6, 0);
  7938.                       -- A(1)=7, A(10)=0
  7939.                       B : Table := (2 | 4 | 10 => 1, others => 0);
  7940.                       -- B(1)=0, B(10)=1
  7941.                       C : constant Matrix := (1 ┬╖┬╖ 5 => (1 ┬╖┬╖ 8 => 0.0));
  7942.                       -- C'Last(1)=5, C'Last(2)=8
  7943.  
  7944.         16.
  7945.  
  7946.                       D : Bit_Vector(M ┬╖┬╖ N) := (M ┬╖┬╖ N => True);  --  see 3.6
  7947.                       E : Bit_Vector(M ┬╖┬╖ N) := (others => True);
  7948.                       F : String(1 ┬╖┬╖ 1) := (1 => 'F');
  7949.                       -- a one component aggregate: same as "F"
  7950.  
  7951.  
  7952. ΓòÉΓòÉΓòÉ 7.4. Expressions ΓòÉΓòÉΓòÉ
  7953.  
  7954.    1. An expression is a formula that defines the computation or retrieval of a 
  7955.       value. In this International Standard, the term ``expression'' refers to 
  7956.       a construct of the syntactic category expression or of any of the other 
  7957.       five syntactic categories defined below. 
  7958.  
  7959.             Syntax
  7960.  
  7961.          2.
  7962.  
  7963.                       expression ::=
  7964.                          relation {and relation} | relation {and then relation}
  7965.                         | relation {or relation}  | relation {or else relation}
  7966.                         | relation {xor relation}
  7967.  
  7968.          3.
  7969.  
  7970.                       relation ::=
  7971.                          simple_expression [relational_operator simple_expression]
  7972.                         | simple_expression [not] in range
  7973.                         | simple_expression [not] in subtype_mark
  7974.  
  7975.          4.
  7976.  
  7977.                       simple_expression ::=
  7978.                         [unary_adding_operator] term {binary_adding_operator term}
  7979.  
  7980.          5.
  7981.  
  7982.                       term ::= factor {multiplying_operator factor}
  7983.  
  7984.          6.
  7985.  
  7986.                       factor ::= primary [** primary] | abs primary | not primary
  7987.  
  7988.          7.
  7989.  
  7990.                       primary ::=
  7991.                          numeric_literal  | null
  7992.                         | string_literal   | aggregate
  7993.                         | name        | qualified_expression
  7994.                         | allocator     | (expression)
  7995.  
  7996.   Name Resolution Rules
  7997.  
  7998.    8. A name used as a primary shall resolve to denote an object or a value. 
  7999.  
  8000.             Static Semantics
  8001.  
  8002.    9. Each expression has a type; it specifies the computation or retrieval of 
  8003.       a value of that type. 
  8004.  
  8005.             Dynamic Semantics
  8006.  
  8007.   10. The value of a primary that is a name denoting an object is the value of 
  8008.       the object. 
  8009.  
  8010.             Implementation Permissions
  8011.  
  8012.   11. For the evaluation of a primary that is a name denoting an object of an 
  8013.       unconstrained numeric subtype, if the value of the object is outside the 
  8014.       base range of its type, the implementation may either raise 
  8015.       Constraint_Error or return the value of the object. 
  8016.  
  8017.             Examples
  8018.  
  8019.   12. Examples of primaries: 
  8020.  
  8021.         13.
  8022.  
  8023.                       4.0         --  real literal
  8024.                       Pi         --  named number
  8025.                       (1 ┬╖┬╖ 10 => 0)   --  array aggregate
  8026.                       Sum         --  variable
  8027.                       Integer'Last    --  attribute
  8028.                       Sine(X)       --  function call
  8029.                       Color'(Blue)    --  qualified expression
  8030.                       Real(M*N)      --  conversion
  8031.                       (Line_Count + 10)  --  parenthesized expression
  8032.  
  8033.   14. Examples of expressions: 
  8034.  
  8035.         15.
  8036.  
  8037.                       Volume           -- primary
  8038.                       not Destroyed        -- factor
  8039.                       2*Line_Count         -- term
  8040.                       -4.0             -- simple expression
  8041.                       -4.0 + A           -- simple expression
  8042.                       B**2 - 4.0*A*C        -- simple expression
  8043.                       Password(1 ┬╖┬╖ 3) = "Bwv"   -- relation
  8044.                       Count in Small_Int      -- relation
  8045.                       Count not in Small_Int    -- relation
  8046.                       Index = 0 or Item_Hit    -- expression
  8047.                       (Cold and Sunny) or Warm   -- expression (parentheses are required)
  8048.                       A**(B**C)          -- expression (parentheses are required)
  8049.  
  8050.  
  8051. ΓòÉΓòÉΓòÉ 7.5. Operators and Expression Evaluation ΓòÉΓòÉΓòÉ
  8052.  
  8053.    1. The language defines the following six categories of operators (given in 
  8054.       order of increasing precedence). The corresponding operator_symbols, and 
  8055.       only those, can be used as designators in declarations of functions for 
  8056.       user-defined operators (see 6.6: ``Overloading of Operators''). 
  8057.  
  8058.             Syntax
  8059.  
  8060.          2.
  8061.  
  8062.                       logical_operator       ::=  and | or  | xor
  8063.  
  8064.          3.
  8065.  
  8066.                       relational_operator     ::=  =  | /=  | <  | <= | > | >=
  8067.  
  8068.          4.
  8069.  
  8070.                       binary_adding_operator    ::=  +  | -  | &
  8071.  
  8072.          5.
  8073.  
  8074.                       unary_adding_operator    ::=  +  | -
  8075.  
  8076.          6.
  8077.  
  8078.                       multiplying_operator     ::=  *  | /  | mod | rem
  8079.  
  8080.          7.
  8081.  
  8082.                       highest_precedence_operator ::=  **  | abs | not
  8083.  
  8084.   Static Semantics
  8085.  
  8086.    8. For a sequence of operators of the same precedence level, the operators 
  8087.       are associated with their operands in textual order from left to right. 
  8088.       Parentheses can be used to impose specific associations. 
  8089.  
  8090.    9. For each form of type definition, certain of the above operators are 
  8091.       predefined; that is, they are implicitly declared immediately after the 
  8092.       type definition. For each such implicit operator declaration, the 
  8093.       parameters are called Left and Right for binary operators; the single 
  8094.       parameter is called Right for unary operators. An expression of the form 
  8095.       X op Y, where op is a binary operator, is equivalent to a function_call 
  8096.       of the form "op"(X, Y). An expression of the form op Y, where op is a 
  8097.       unary operator, is equivalent to a function_call of the form "op"(Y). The 
  8098.       predefined operators and their effects are described in subclauses 4.5.1 
  8099.       through 4.5.6. 
  8100.  
  8101.             Dynamic Semantics
  8102.  
  8103.   10. The predefined operations on integer types either yield the 
  8104.       mathematically correct result or raise the exception Constraint_Error. 
  8105.       For implementations that support the Numerics Annex, the predefined 
  8106.       operations on real types yield results whose accuracy is defined in G: 
  8107.       ``Annex G'', or raise the exception Constraint_Error. 
  8108.  
  8109.             Implementation Requirements
  8110.  
  8111.   11. The implementation of a predefined operator that delivers a result of an 
  8112.       integer or fixed point type may raise Constraint_Error only if the result 
  8113.       is outside the base range of the result type. 
  8114.  
  8115.   12. The implementation of a predefined operator that delivers a result of a 
  8116.       floating point type may raise Constraint_Error only if the result is 
  8117.       outside the safe range of the result type. 
  8118.  
  8119.             Implementation Permissions
  8120.  
  8121.   13. For a sequence of predefined operators of the same precedence level (and 
  8122.       in the absence of parentheses imposing a specific association), an 
  8123.       implementation may impose any association of the operators with operands 
  8124.       so long as the result produced is an allowed result for the left-to-right 
  8125.       association, but ignoring the potential for failure of language-defined 
  8126.       checks in either the left-to-right or chosen order of association. 
  8127.  
  8128.       NOTES 
  8129.  
  8130.   14. (11) The two operands of an expression of the form X op Y, where op is a 
  8131.       binary operator, are evaluated in an arbitrary order, as for any 
  8132.       function_call, see 6.4. 
  8133.  
  8134.             Examples
  8135.  
  8136.   15. Examples of precedence: 
  8137.  
  8138.         16.
  8139.  
  8140.                       not Sunny or Warm   --  same as (not Sunny) or Warm
  8141.                       X > 4.0 and Y > 0.0  --  same as (X > 4.0) and (Y > 0.0)
  8142.  
  8143.         17.
  8144.  
  8145.                       -4.0*A**2       --  same as -(4.0 * (A**2))
  8146.                       abs(1 + A) + B    --  same as (abs (1 + A)) + B
  8147.                       Y**(-3)        --  parentheses are necessary
  8148.                       A / B * C       --  same as (A/B)*C
  8149.                       A + (B + C)      --  evaluate B + C before adding it to A
  8150.  
  8151.  4.5.1                         Logical Operators and Short-circuit Control 
  8152.                                Forms 
  8153.  4.5.2                         Relational Operators and Membership Tests 
  8154.  4.5.3                         Binary Adding Operators 
  8155.  4.5.4                         Unary Adding Operators 
  8156.  4.5.5                         Multiplying Operators 
  8157.  4.5.6                         Highest Precedence Operators 
  8158.  
  8159.  
  8160. ΓòÉΓòÉΓòÉ 7.5.1. Logical Operators and Short-circuit Control Forms ΓòÉΓòÉΓòÉ
  8161.  
  8162.  
  8163.   Name Resolution Rules
  8164.  
  8165.    1. An expression consisting of two relations connected by and then or or 
  8166.       else (a short-circuit control form) shall resolve to be of some boolean 
  8167.       type; the expected type for both relations is that same boolean type. 
  8168.  
  8169.             Static Semantics
  8170.  
  8171.    2. The following logical operators are predefined for every boolean type T, 
  8172.       for every modular type T, and for every one-dimensional array type T 
  8173.       whose component type is a boolean type: 
  8174.  
  8175.          3.
  8176.  
  8177.                       function "and"(Left, Right : T) return T
  8178.                       function "or" (Left, Right : T) return T
  8179.                       function "xor"(Left, Right : T) return T
  8180.  
  8181.    4. For boolean types, the predefined logical operators and, or, and xor 
  8182.       perform the conventional operations of conjunction, inclusive 
  8183.       disjunction, and exclusive disjunction, respectively. 
  8184.  
  8185.    5. For modular types, the predefined logical operators are defined on a 
  8186.       bit-by-bit basis, using the binary representation of the value of the 
  8187.       operands to yield a binary representation for the result, where zero 
  8188.       represents False and one represents True. If this result is outside the 
  8189.       base range of the type, a final subtraction by the modulus is performed 
  8190.       to bring the result into the base range of the type. 
  8191.  
  8192.    6. The logical operators on arrays are performed on a component-by-component 
  8193.       basis on matching components (as for equality -- see 4.5.2.), using the 
  8194.       predefined logical operator for the component type. The bounds of the 
  8195.       resulting array are those of the left operand. 
  8196.  
  8197.             Dynamic Semantics
  8198.  
  8199.    7. The short-circuit control forms and then and or else deliver the same 
  8200.       result as the corresponding predefined and and or operators for boolean 
  8201.       types, except that the left operand is always evaluated first, and the 
  8202.       right operand is not evaluated if the value of the left operand 
  8203.       determines the result. 
  8204.  
  8205.    8. For the logical operators on arrays, a check is made that for each 
  8206.       component of the left operand there is a matching component of the right 
  8207.       operand, and vice versa. Also, a check is made that each component of the 
  8208.       result belongs to the component subtype. The exception Constraint_Error 
  8209.       is raised if either of the above checks fails. 
  8210.  
  8211.       NOTES 
  8212.  
  8213.    9. (12) The conventional meaning of the logical operators is given by the 
  8214.       following truth table: 
  8215.  
  8216.         10.
  8217.  
  8218.                       A   B    (A and B)  (A or B)  (A xor B)
  8219.                       True  True   True    True    False
  8220.                       True  False   False    True    True
  8221.                       False  True   False    True    True
  8222.                       False  False   False    False   False
  8223.  
  8224.   Examples
  8225.  
  8226.   11. Examples of logical operators: 
  8227.  
  8228.         12.
  8229.  
  8230.                       Sunny or Warm
  8231.                       Filter(1 ┬╖┬╖ 10) and Filter(15 ┬╖┬╖ 24)  --  see 3.6.1
  8232.  
  8233.   13. Examples of short-circuit control forms: 
  8234.  
  8235.         14.
  8236.  
  8237.                       Next_Car.Owner /= null and then Next_Car.Owner.Age > 25
  8238.                       --  see 3.10.1
  8239.                       N = 0 or else A(N) = Hit_Value
  8240.  
  8241.  
  8242. ΓòÉΓòÉΓòÉ 7.5.2. Relational Operators and Membership Tests ΓòÉΓòÉΓòÉ
  8243.  
  8244.    1. The equality operators = (equals) and /= (not equals) are predefined for 
  8245.       nonlimited types. The other relational_operators are the ordering 
  8246.       operators < (less than), <= (less than or equal), > (greater than), and 
  8247.       >= (greater than or equal). The ordering operators are predefined for 
  8248.       scalar types, and for discrete array types, that is, one-dimensional 
  8249.       array types whose components are of a discrete type. 
  8250.  
  8251.    2. A membership test, using in or not in, determines whether or not a value 
  8252.       belongs to a given subtype or range, or has a tag that identifies a type 
  8253.       that is covered by a given type. Membership tests are allowed for all 
  8254.       types. 
  8255.  
  8256.             Name Resolution Rules
  8257.  
  8258.    3. The tested type of a membership test is the type of the range or the type 
  8259.       determined by the subtype_mark. If the tested type is tagged, then the 
  8260.       simple_expression shall resolve to be of a type that covers or is covered 
  8261.       by the tested type; if untagged, the expected type for the 
  8262.       simple_expression is the tested type. 
  8263.  
  8264.             Legality Rules
  8265.  
  8266.    4. For a membership test, if the simple_expression is of a tagged class-wide 
  8267.       type, then the tested type shall be (visibly) tagged. 
  8268.  
  8269.             Static Semantics
  8270.  
  8271.    5. The result type of a membership test is the predefined type Boolean. 
  8272.  
  8273.    6. The equality operators are predefined for every specific type T that is 
  8274.       not limited, and not an anonymous access type, with the following 
  8275.       specifications: 
  8276.  
  8277.          7.
  8278.  
  8279.                       function "=" (Left, Right : T) return Boolean
  8280.                       function "/="(Left, Right : T) return Boolean
  8281.  
  8282.    8. The ordering operators are predefined for every specific scalar type T, 
  8283.       and for every discrete array type T, with the following specifications: 
  8284.  
  8285.          9.
  8286.  
  8287.                       function "<" (Left, Right : T) return Boolean
  8288.                       function "<="(Left, Right : T) return Boolean
  8289.                       function ">" (Left, Right : T) return Boolean
  8290.                       function ">="(Left, Right : T) return Boolean
  8291.  
  8292.   Dynamic Semantics
  8293.  
  8294.   10. For discrete types, the predefined relational operators are defined in 
  8295.       terms of corresponding mathematical operations on the position numbers of 
  8296.       the values of the operands. 
  8297.  
  8298.   11. For real types, the predefined relational operators are defined in terms 
  8299.       of the corresponding mathematical operations on the values of the 
  8300.       operands, subject to the accuracy of the type. 
  8301.  
  8302.   12. Two access-to-object values are equal if they designate the same object, 
  8303.       or if both are equal to the null value of the access type. 
  8304.  
  8305.   13. Two access-to-subprogram values are equal if they are the result of the 
  8306.       same evaluation of an Access attribute_reference, or if both are equal to 
  8307.       the null value of the access type. Two access-to-subprogram values are 
  8308.       unequal if they designate different subprograms. It is unspecified 
  8309.       whether two access values that designate the same subprogram but are the 
  8310.       result of distinct evaluations of Access attribute_references are equal 
  8311.       or unequal. 
  8312.  
  8313.   14. For a type extension, predefined equality is defined in terms of the 
  8314.       primitive (possibly user-defined) equals operator of the parent type and 
  8315.       of any tagged components of the extension part, and predefined equality 
  8316.       for any other components not inherited from the parent type. 
  8317.  
  8318.   15. For a private type, if its full type is tagged, predefined equality is 
  8319.       defined in terms of the primitive equals operator of the full type; if 
  8320.       the full type is untagged, predefined equality for the private type is 
  8321.       that of its full type. 
  8322.  
  8323.   16. For other composite types, the predefined equality operators (and certain 
  8324.       other predefined operations on composite types --  see 4.5.1, and 4.6.) 
  8325.       are defined in terms of the corresponding operation on matching 
  8326.       components, defined as follows: 
  8327.  
  8328.         a. For two composite objects or values of the same non-array type, 
  8329.            matching components are those that correspond to the same 
  8330.            component_declaration or discriminant_specification; 
  8331.  
  8332.         b. For two one-dimensional arrays of the same type, matching components 
  8333.            are those (if any) whose index values match in the following sense: 
  8334.            the lower bounds of the index ranges are defined to match, and the 
  8335.            successors of matching indices are defined to match; 
  8336.  
  8337.         c. For two multidimensional arrays of the same type, matching 
  8338.            components are those whose index values match in successive index 
  8339.            positions. 
  8340.  
  8341.    1. The analogous definitions apply if the types of the two objects or values 
  8342.       are convertible, rather than being the same. 
  8343.  
  8344.    2. Given the above definition of matching components, the result of the 
  8345.       predefined equals operator for composite types (other than for those 
  8346.       composite types covered earlier) is defined as follows: 
  8347.  
  8348.         a. If there are no components, the result is defined to be True; 
  8349.  
  8350.         b. If there are unmatched components, the result is defined to be 
  8351.            False; 
  8352.  
  8353.         c. Otherwise, the result is defined in terms of the primitive equals 
  8354.            operator for any matching tagged components, and the predefined 
  8355.            equals for any matching untagged components. 
  8356.  
  8357.    1. The predefined "/=" operator gives the complementary result to the 
  8358.       predefined "=" operator. 
  8359.  
  8360.    2. For a discrete array type, the predefined ordering operators correspond 
  8361.       to lexicographic order using the predefined order relation of the 
  8362.       component type: A null array is lexicographically less than any array 
  8363.       having at least one component. In the case of nonnull arrays, the left 
  8364.       operand is lexicographically less than the right operand if the first 
  8365.       component of the left operand is less than that of the right; otherwise 
  8366.       the left operand is lexicographically less than the right operand only if 
  8367.       their first components are equal and the tail of the left operand is 
  8368.       lexicographically less than that of the right (the tail consists of the 
  8369.       remaining components beyond the first and can be null). 
  8370.  
  8371.    3. For the evaluation of a membership test, the simple_expression and the 
  8372.       range (if any) are evaluated in an arbitrary order. 
  8373.  
  8374.    4. A membership test using in yields the result True if: 
  8375.  
  8376.         a. The tested type is scalar, and the value of the simple_expression 
  8377.            belongs to the given range, or the range of the named subtype; or 
  8378.  
  8379.         b. The tested type is not scalar, and the value of the simple_ 
  8380.            expression satisfies any constraints of the named subtype, and, if 
  8381.            the type of the simple_expression is class-wide, the value has a tag 
  8382.            that identifies a type covered by the tested type. 
  8383.  
  8384.    1. Otherwise the test yields the result False. 
  8385.  
  8386.    2. A membership test using not in gives the complementary result to the 
  8387.       corresponding membership test using in. 
  8388.  
  8389.       NOTES 
  8390.  
  8391.    3. (13) No exception is ever raised by a membership test, by a predefined 
  8392.       ordering operator, or by a predefined equality operator for an elementary 
  8393.       type, but an exception can be raised by the evaluation of the operands. A 
  8394.       predefined equality operator for a composite type can only raise an 
  8395.       exception if the type has a tagged part whose primitive equals operator 
  8396.       propagates an exception. 
  8397.  
  8398.    4. (14) If a composite type has components that depend on discriminants, two 
  8399.       values of this type have matching components if and only if their 
  8400.       discriminants are equal. Two nonnull arrays have matching components if 
  8401.       and only if the length of each dimension is the same for both. 
  8402.  
  8403.             Examples
  8404.  
  8405.    5. Examples of expressions involving relational operators and membership 
  8406.       tests: 
  8407.  
  8408.          6.
  8409.  
  8410.                       X /= Y
  8411.  
  8412.          7.
  8413.  
  8414.                       "" < "A" and "A" < "Aa"   --  True
  8415.                       "Aa" < "B" and "A" < "A  "  --  True
  8416.  
  8417.          8.
  8418.  
  8419.                       My_Car = null
  8420.                       -- true if My_Car has been set to null  (see 3.10.1)
  8421.                       My_Car = Your_Car
  8422.                       -- true if we both share the same car
  8423.                       My_Car.all = Your_Car.all
  8424.                       -- true if the two cars are identical
  8425.  
  8426.          9.
  8427.  
  8428.                       N not in 1 ┬╖┬╖ 10
  8429.                       -- range membership test
  8430.                       Today in Mon ┬╖┬╖ Fri
  8431.                       -- range membership test
  8432.                       Today in Weekday
  8433.                       -- subtype membership test  (see 3.5.1)
  8434.                       Archive in Disk_Unit
  8435.                       -- subtype membership test, see 3.8.1
  8436.                       Tree.all in Addition'Class
  8437.                       -- class membership test  (see 3.9.1)
  8438.  
  8439.  
  8440. ΓòÉΓòÉΓòÉ 7.5.3. Binary Adding Operators ΓòÉΓòÉΓòÉ
  8441.  
  8442.  
  8443.   Static Semantics
  8444.  
  8445.    1. The binary adding operators + (addition) and - (subtraction) are 
  8446.       predefined for every specific numeric type T with their conventional 
  8447.       meaning. They have the following specifications: 
  8448.  
  8449.          2.
  8450.  
  8451.                       function "+"(Left, Right : T) return T
  8452.                       function "-"(Left, Right : T) return T
  8453.  
  8454.    3. The concatenation operators & are predefined for every nonlimited, 
  8455.       one-dimensional array type T with component type C. They have the 
  8456.       following specifications: 
  8457.  
  8458.          4.
  8459.  
  8460.                       function "&"(Left : T; Right : T) return T
  8461.                       function "&"(Left : T; Right : C) return T
  8462.                       function "&"(Left : C; Right : T) return T
  8463.                       function "&"(Left : C; Right : C) return T
  8464.  
  8465.   Dynamic Semantics
  8466.  
  8467.    5. For the evaluation of a concatenation with result type T, if both 
  8468.       operands are of type T, the result of the concatenation is a 
  8469.       one-dimensional array whose length is the sum of the lengths of its 
  8470.       operands, and whose components comprise the components of the left 
  8471.       operand followed by the components of the right operand. If the left 
  8472.       operand is a null array, the result of the concatenation is the right 
  8473.       operand. Otherwise, the lower bound of the result is determined as 
  8474.       follows: 
  8475.  
  8476.         a. If the ultimate ancestor of the array type was defined by a 
  8477.            constrained_array_definition, then the lower bound of the result is 
  8478.            that of the index subtype; 
  8479.  
  8480.         b. If the ultimate ancestor of the array type was defined by an 
  8481.            unconstrained_array_definition, then the lower bound of the result 
  8482.            is that of the left operand. 
  8483.  
  8484.    1. The upper bound is determined by the lower bound and the length. A check 
  8485.       is made that the upper bound of the result of the concatenation belongs 
  8486.       to the range of the index subtype, unless the result is a null array. 
  8487.       Constraint_Error is raised if this check fails. 
  8488.  
  8489.    2. If either operand is of the component type C, the result of the 
  8490.       concatenation is given by the above rules, using in place of such an 
  8491.       operand an array having this operand as its only component (converted to 
  8492.       the component subtype) and having the lower bound of the index subtype of 
  8493.       the array type as its lower bound. 
  8494.  
  8495.    3. The result of a concatenation is defined in terms of an assignment to an 
  8496.       anonymous object, as for any function call, see 6.5. 
  8497.  
  8498.       NOTES 
  8499.  
  8500.    4. (15) As for all predefined operators on modular types, the binary adding 
  8501.       operators + and - on modular types include a final reduction modulo the 
  8502.       modulus if the result is outside the base range of the type. 
  8503.  
  8504.             Examples
  8505.  
  8506.    5. Examples of expressions involving binary adding operators: 
  8507.  
  8508.          6.
  8509.  
  8510.                       Z + 0.1
  8511.                       --  Z has to be of a real type
  8512.  
  8513.          7.
  8514.  
  8515.                       "A" & "BCD"
  8516.                       --  concatenation of two string literals
  8517.                       'A' & "BCD"
  8518.                       --  concatenation of a character literal and a string literal
  8519.                       'A' & 'A'
  8520.                       --  concatenation of two character literals
  8521.  
  8522.  
  8523. ΓòÉΓòÉΓòÉ 7.5.4. Unary Adding Operators ΓòÉΓòÉΓòÉ
  8524.  
  8525.  
  8526.   Static Semantics
  8527.  
  8528.    1. The unary adding operators + (identity) and - (negation) are predefined 
  8529.       for every specific numeric type T with their conventional meaning. They 
  8530.       have the following specifications: 
  8531.  
  8532.          2.
  8533.  
  8534.                       function "+"(Right : T) return T
  8535.                       function "-"(Right : T) return T
  8536.  
  8537.  NOTES 
  8538.  
  8539.    3. (16) For modular integer types, the unary adding operator -, when given a 
  8540.       nonzero operand, returns the result of subtracting the value of the 
  8541.       operand from the modulus; for a zero operand, the result is zero. 
  8542.  
  8543.  
  8544. ΓòÉΓòÉΓòÉ 7.5.5. Multiplying Operators ΓòÉΓòÉΓòÉ
  8545.  
  8546.  
  8547.   Static Semantics
  8548.  
  8549.    1. The multiplying operators * (multiplication), / (division), mod 
  8550.       (modulus), and rem (remainder) are predefined for every specific integer 
  8551.       type T: 
  8552.  
  8553.          2.
  8554.  
  8555.                       function "*"  (Left, Right : T) return T
  8556.                       function "/"  (Left, Right : T) return T
  8557.                       function "mod"(Left, Right : T) return T
  8558.                       function "rem"(Left, Right : T) return T
  8559.  
  8560.    3. Signed integer multiplication has its conventional meaning. 
  8561.  
  8562.    4. Signed integer division and remainder are defined by the relation: 
  8563.  
  8564.          5.
  8565.  
  8566.                       A = (A/B)*B + (A rem B)
  8567.  
  8568.    6. where (A rem B) has the sign of A and an absolute value less than the 
  8569.       absolute value of B. Signed integer division satisfies the identity: 
  8570.  
  8571.          7.
  8572.  
  8573.                       (-A)/B = -(A/B) = A/(-B)
  8574.  
  8575.    8. The signed integer modulus operator is defined such that the result of A 
  8576.       mod B has the sign of B and an absolute value less than the absolute 
  8577.       value of B; in addition, for some signed integer value N, this result 
  8578.       satisfies the relation: 
  8579.  
  8580.          9.
  8581.  
  8582.                       A = B*N + (A mod B)
  8583.  
  8584.   10. The multiplying operators on modular types are defined in terms of the 
  8585.       corresponding signed integer operators, followed by a reduction modulo 
  8586.       the modulus if the result is outside the base range of the type (which is 
  8587.       only possible for the "*" operator). 
  8588.  
  8589.   11. Multiplication and division operators are predefined for every specific 
  8590.       floating point type T: 
  8591.  
  8592.         12.
  8593.  
  8594.                       function "*"(Left, Right : T) return T
  8595.                       function "/"(Left, Right : T) return T
  8596.  
  8597.   13. The following multiplication and division operators, with an operand of 
  8598.       the predefined type Integer, are predefined for every specific fixed 
  8599.       point type T: 
  8600.  
  8601.         14.
  8602.  
  8603.                       function "*"(Left : T; Right : Integer) return T
  8604.                       function "*"(Left : Integer; Right : T) return T
  8605.                       function "/"(Left : T; Right : Integer) return T
  8606.  
  8607.   15. All of the above multiplying operators are usable with an operand of an 
  8608.       appropriate universal numeric type. The following additional multiplying 
  8609.       operators for root_real are predefined, and are usable when both operands 
  8610.       are of an appropriate universal or root numeric type, and the result is 
  8611.       allowed to be of type root_real, as in a number_declaration: 
  8612.  
  8613.         16.
  8614.  
  8615.                       function "*"(Left, Right : root_real) return root_real
  8616.                       function "/"(Left, Right : root_real) return root_real
  8617.  
  8618.         17.
  8619.  
  8620.                       function "*"(Left : root_real; Right : root_integer) return root_real
  8621.                       function "*"(Left : root_integer; Right : root_real) return root_real
  8622.                       function "/"(Left : root_real; Right : root_integer) return root_real
  8623.  
  8624.   18. Multiplication and division between any two fixed point types are 
  8625.       provided by the following two predefined operators: 
  8626.  
  8627.         19.
  8628.  
  8629.                       function "*"(Left, Right : universal_fixed) return universal_fixed
  8630.                       function "/"(Left, Right : universal_fixed) return universal_fixed
  8631.  
  8632.   Legality Rules
  8633.  
  8634.   20. The above two fixed-fixed multiplying operators shall not be used in a 
  8635.       context where the expected type for the result is itself universal_fixed 
  8636.       -- the context has to identify some other numeric type to which the 
  8637.       result is to be converted, either explicitly or implicitly. 
  8638.  
  8639.             Dynamic Semantics
  8640.  
  8641.   21. The multiplication and division operators for real types have their 
  8642.       conventional meaning. For floating point types, the accuracy of the 
  8643.       result is determined by the precision of the result type. For decimal 
  8644.       fixed point types, the result is truncated toward zero if the 
  8645.       mathematical result is between two multiples of the small of the specific 
  8646.       result type (possibly determined by context); for ordinary fixed point 
  8647.       types, if the mathematical result is between two multiples of the small, 
  8648.       it is unspecified which of the two is the result. 
  8649.  
  8650.   22. The exception Constraint_Error is raised by integer division, rem, and 
  8651.       mod if the right operand is zero. Similarly, for a real type T with 
  8652.       T'Machine_Overflows True, division by zero raises Constraint_Error. 
  8653.  
  8654.       NOTES 
  8655.  
  8656.   23. (17) For positive A and B, A/B is the quotient and A rem B is the 
  8657.       remainder when A is divided by B. The following relations are satisfied 
  8658.       by the rem operator: 
  8659.  
  8660.         24.
  8661.  
  8662.                         A  rem (-B) =  A rem B
  8663.                       (-A) rem  B  = -(A rem B)
  8664.  
  8665.   25. (18) For any signed integer K, the following identity holds: 
  8666.  
  8667.         26.
  8668.  
  8669.                         A mod B  =  (A + K*B) mod B
  8670.  
  8671.   27. The relations between signed integer division, remainder, and modulus are 
  8672.       illustrated by the following table: 
  8673.  
  8674.         28.
  8675.  
  8676.                         A   B  A/B  A rem B  A mod B   A  B  A/B  A rem B  A mod B
  8677.  
  8678.         29.
  8679.  
  8680.                         10  5  2    0     0    -10  5  -2   0     0
  8681.                        11  5  2    1     1    -11  5  -2   -1     4
  8682.                        12  5  2    2     2    -12  5  -2   -2     3
  8683.                        13  5  2    3     3    -13  5  -2   -3     2
  8684.                        14  5  2    4     4    -14  5  -2   -4     1
  8685.  
  8686.         30.
  8687.  
  8688.                         A   B  A/B  A rem B  A mod B   A  B  A/B  A rem B  A mod B
  8689.                        10  -5  -2   0     0    -10 -5   2   0     0
  8690.                        11  -5  -2   1    -4    -11 -5   2   -1    -1
  8691.                        12  -5  -2   2    -3    -12 -5   2   -2    -2
  8692.                        13  -5  -2   3    -2    -13 -5   2   -3    -3
  8693.                        14  -5  -2   4    -1    -14 -5   2   -4    -4
  8694.  
  8695.   Examples
  8696.  
  8697.   31. Examples of expressions involving multiplying operators: 
  8698.  
  8699.         32.
  8700.  
  8701.                       I : Integer := 1;
  8702.                       J : Integer := 2;
  8703.                       K : Integer := 3;
  8704.  
  8705.         33.
  8706.  
  8707.                       X : Real := 1.0;    --  see 3.5.7
  8708.                       Y : Real := 2.0;
  8709.  
  8710.         34.
  8711.  
  8712.                       F : Fraction := 0.25;  --  see 3.5.9
  8713.                       G : Fraction := 0.5;
  8714.  
  8715.         35.
  8716.  
  8717.                       Expression   Value  Result Type
  8718.                       I*J       2    same as I and J, that is, Integer
  8719.                       K/J       1    same as K and J, that is, Integer
  8720.                       K mod J     1    same as K and J, that is, Integer
  8721.                       X/Y       0.5   same as X and Y, that is, Real
  8722.                       F/2       0.125  same as F, that is, Fraction
  8723.                       3*F       0.75  same as F, that is, Fraction
  8724.                       0.75*G     0.375  universal_fixed, implicitly convertible
  8725.                                  to any fixed point type
  8726.                       Fraction(F*G)  0.125  Fraction, as stated by the conversion
  8727.                       Real(J)*Y    4.0   Real, the type of both operands after
  8728.                                  conversion of J
  8729.  
  8730.  
  8731. ΓòÉΓòÉΓòÉ 7.5.6. Highest Precedence Operators ΓòÉΓòÉΓòÉ
  8732.  
  8733.  
  8734.   Static Semantics
  8735.  
  8736.    1. The highest precedence unary operator abs (absolute value) is predefined 
  8737.       for every specific numeric type T, with the following specification: 
  8738.  
  8739.          2.
  8740.  
  8741.                       function "abs"(Right : T) return T
  8742.  
  8743.    3. The highest precedence unary operator not (logical negation) is 
  8744.       predefined for every boolean type T, every modular type T, and for every 
  8745.       one-dimensional array type T whose components are of a boolean type, with 
  8746.       the following specification: 
  8747.  
  8748.          4.
  8749.  
  8750.                       function "not"(Right : T) return T
  8751.  
  8752.    5. The result of the operator not for a modular type is defined as the 
  8753.       difference between the high bound of the base range of the type and the 
  8754.       value of the operand. For a binary modulus, this corresponds to a 
  8755.       bit-wise complement of the binary representation of the value of the 
  8756.       operand. 
  8757.  
  8758.    6. The operator not that applies to a one-dimensional array of boolean 
  8759.       components yields a one-dimensional boolean array with the same bounds; 
  8760.       each component of the result is obtained by logical negation of the 
  8761.       corresponding component of the operand (that is, the component that has 
  8762.       the same index value). A check is made that each component of the result 
  8763.       belongs to the component subtype; the exception Constraint_Error is 
  8764.       raised if this check fails. 
  8765.  
  8766.    7. The highest precedence exponentiation operator ** is predefined for every 
  8767.       specific integer type T with the following specification: 
  8768.  
  8769.          8.
  8770.  
  8771.                       function "**"(Left : T; Right : Natural) return T
  8772.  
  8773.    9. Exponentiation is also predefined for every specific floating point type 
  8774.       as well as root_real, with the following specification (where T is 
  8775.       root_real or the floating point type): 
  8776.  
  8777.         10.
  8778.  
  8779.                       function "**"(Left : T; Right : Integer'Base) return T
  8780.  
  8781.   11. The right operand of an exponentiation is the exponent. The expression 
  8782.       X**N with the value of the exponent N positive is equivalent to the 
  8783.       expression X*X*┬╖┬╖┬╖X (with N-1 multiplications) except that the 
  8784.       multiplications are associated in an arbitrary order. With N equal to 
  8785.       zero, the result is one. With the value of N negative (only defined for a 
  8786.       floating point operand), the result is the reciprocal of the result using 
  8787.       the absolute value of N as the exponent. 
  8788.  
  8789.             Implementation Permissions
  8790.  
  8791.   12. The implementation of exponentiation for the case of a negative exponent 
  8792.       is allowed to raise Constraint_Error if the intermediate result of the 
  8793.       repeated multiplications is outside the safe range of the type, even 
  8794.       though the final result (after taking the reciprocal) would not be. (The 
  8795.       best machine approximation to the final result in this case would 
  8796.       generally be 0.0.) 
  8797.  
  8798.       NOTES 
  8799.  
  8800.   13. (19) As implied by the specification given above for exponentiation of an 
  8801.       integer type, a check is made that the exponent is not negative. 
  8802.       Constraint_Error is raised if this check fails. 
  8803.  
  8804.  
  8805. ΓòÉΓòÉΓòÉ 7.6. Type Conversions ΓòÉΓòÉΓòÉ
  8806.  
  8807.    1. Explicit type conversions, both value conversions and view conversions, 
  8808.       are allowed between closely related types as defined below. This clause 
  8809.       also defines rules for value and view conversions to a particular subtype 
  8810.       of a type, both explicit ones and those implicit in other constructs. 
  8811.  
  8812.             Syntax
  8813.  
  8814.          2.
  8815.  
  8816.                       type_conversion ::=
  8817.                          subtype_mark(expression)
  8818.                         | subtype_mark(name)
  8819.  
  8820.    3. The target subtype of a type_conversion is the subtype denoted by the 
  8821.       subtype_mark. The operand of a type_conversion is the expression or name 
  8822.       within the parentheses; its type is the operand type. 
  8823.  
  8824.    4. One type is convertible to a second type if a type_conversion with the 
  8825.       first type as operand type and the second type as target type is legal 
  8826.       according to the rules of this clause. Two types are convertible if each 
  8827.       is convertible to the other. 
  8828.  
  8829.    5. A type_conversion whose operand is the name of an object is called a view 
  8830.       conversion if its target type is tagged, or if it appears as an actual 
  8831.       parameter of mode out or in out; other type_conversions are called value 
  8832.       conversions. 
  8833.  
  8834.             Name Resolution Rules
  8835.  
  8836.    6. The operand of a type_conversion is expected to be of any type. 
  8837.  
  8838.    7. The operand of a view conversion is interpreted only as a name; the 
  8839.       operand of a value conversion is interpreted as an expression. 
  8840.  
  8841.             Legality Rules
  8842.  
  8843.    8. If the target type is a numeric type, then the operand type shall be a 
  8844.       numeric type. 
  8845.  
  8846.    9. If the target type is an array type, then the operand type shall be an 
  8847.       array type. Further: 
  8848.  
  8849.         a. The types shall have the same dimensionality; 
  8850.  
  8851.         b. Corresponding index types shall be convertible; and 
  8852.  
  8853.         c. The component subtypes shall statically match. 
  8854.  
  8855.    1. If the target type is a general access type, then the operand type shall 
  8856.       be an access-to-object type. Further: 
  8857.  
  8858.         a. If the target type is an access-to-variable type, then the operand 
  8859.            type shall be an access-to-variable type; 
  8860.  
  8861.         b. If the target designated type is tagged, then the operand designated 
  8862.            type shall be convertible to the target designated type; 
  8863.  
  8864.         c. If the target designated type is not tagged, then the designated 
  8865.            types shall be the same, and either the designated subtypes shall 
  8866.            statically match or the target designated subtype shall be 
  8867.            discriminated and unconstrained; and 
  8868.  
  8869.         d. The accessibility level of the operand type shall not be statically 
  8870.            deeper than that of the target type. In addition to the places where 
  8871.            Legality Rules normally apply, see 12.3, this rule applies also in 
  8872.            the private part of an instance of a generic unit. 
  8873.  
  8874.    1. If the target type is an access-to-subprogram type, then the operand type 
  8875.       shall be an access-to-subprogram type. Further: 
  8876.  
  8877.         a. The designated profiles shall be subtype-conformant. 
  8878.  
  8879.         b. The accessibility level of the operand type shall not be statically 
  8880.            deeper than that of the target type. In addition to the places where 
  8881.            Legality Rules normally apply, see 12.3, this rule applies also in 
  8882.            the private part of an instance of a generic unit. If the operand 
  8883.            type is declared within a generic body, the target type shall be 
  8884.            declared within the generic body. 
  8885.  
  8886.    1. If the target type is not included in any of the above four cases, there 
  8887.       shall be a type that is an ancestor of both the target type and the 
  8888.       operand type. Further, if the target type is tagged, then either: 
  8889.  
  8890.         a. The operand type shall be covered by or descended from the target 
  8891.            type; or 
  8892.  
  8893.         b. The operand type shall be a class-wide type that covers the target 
  8894.            type. 
  8895.  
  8896.    1. In a view conversion for an untagged type, the target type shall be 
  8897.       convertible (back) to the operand type. 
  8898.  
  8899.             Static Semantics
  8900.  
  8901.    2. A type_conversion that is a value conversion denotes the value that is 
  8902.       the result of converting the value of the operand to the target subtype. 
  8903.  
  8904.    3. A type_conversion that is a view conversion denotes a view of the object 
  8905.       denoted by the operand. This view is a variable of the target type if the 
  8906.       operand denotes a variable; otherwise it is a constant of the target 
  8907.       type. 
  8908.  
  8909.    4. The nominal subtype of a type_conversion is its target subtype. 
  8910.  
  8911.             Dynamic Semantics
  8912.  
  8913.    5. For the evaluation of a type_conversion that is a value conversion, the 
  8914.       operand is evaluated, and then the value of the operand is converted to a 
  8915.       corresponding value of the target type, if any. If there is no value of 
  8916.       the target type that corresponds to the operand value, Constraint_Error 
  8917.       is raised; this can only happen on conversion to a modular type, and only 
  8918.       when the operand value is outside the base range of the modular type. 
  8919.       Additional rules follow: 
  8920.  
  8921.         a. Numeric Type Conversion 
  8922.  
  8923.              1. If the target and the operand types are both integer types, 
  8924.                 then the result is the value of the target type that 
  8925.                 corresponds to the same mathematical integer as the operand. 
  8926.  
  8927.              2. If the target type is a decimal fixed point type, then the 
  8928.                 result is truncated (toward 0) if the value of the operand is 
  8929.                 not a multiple of the small of the target type. 
  8930.  
  8931.              3. If the target type is some other real type, then the result is 
  8932.                 within the accuracy of the target type (see G.2: ``Numeric 
  8933.                 Performance Requirements'', for implementations that support 
  8934.                 the Numerics Annex). 
  8935.  
  8936.              4. If the target type is an integer type and the operand type is 
  8937.                 real, the result is rounded to the nearest integer (away from 
  8938.                 zero if exactly halfway between two integers). 
  8939.  
  8940.         a. Enumeration Type Conversion 
  8941.  
  8942.              1. The result is the value of the target type with the same 
  8943.                 position number as that of the operand value. 
  8944.  
  8945.         a. Array Type Conversion 
  8946.  
  8947.              1. If the target subtype is a constrained array subtype, then a 
  8948.                 check is made that the length of each dimension of the value of 
  8949.                 the operand equals the length of the corresponding dimension of 
  8950.                 the target subtype. The bounds of the result are those of the 
  8951.                 target subtype. 
  8952.  
  8953.              2. If the target subtype is an unconstrained array subtype, then 
  8954.                 the bounds of the result are obtained by converting each bound 
  8955.                 of the value of the operand to the corresponding index type of 
  8956.                 the target type. For each nonnull index range, a check is made 
  8957.                 that the bounds of the range belong to the corresponding index 
  8958.                 subtype. 
  8959.  
  8960.              3. In either array case, the value of each component of the result 
  8961.                 is that of the matching component of the operand value, see 
  8962.                 4.5.2. 
  8963.  
  8964.         a. Composite (Non-Array) Type Conversion 
  8965.  
  8966.              1. The value of each nondiscriminant component of the result is 
  8967.                 that of the matching component of the operand value. 
  8968.  
  8969.              2. The tag of the result is that of the operand. If the operand 
  8970.                 type is class-wide, a check is made that the tag of the operand 
  8971.                 identifies a (specific) type that is covered by or descended 
  8972.                 from the target type. 
  8973.  
  8974.              3. For each discriminant of the target type that corresponds to a 
  8975.                 discriminant of the operand type, its value is that of the 
  8976.                 corresponding discriminant of the operand value; if it 
  8977.                 corresponds to more than one discriminant of the operand type, 
  8978.                 a check is made that all these discriminants are equal in the 
  8979.                 operand value. 
  8980.  
  8981.              4. For each discriminant of the target type that corresponds to a 
  8982.                 discriminant that is specified by the derived_type_definition 
  8983.                 for some ancestor of the operand type (or if class-wide, some 
  8984.                 ancestor of the specific type identified by the tag of the 
  8985.                 operand), its value in the result is that specified by the 
  8986.                 derived_type_definition. 
  8987.  
  8988.              5. For each discriminant of the operand type that corresponds to a 
  8989.                 discriminant that is specified by the derived_type_definition 
  8990.                 for some ancestor of the target type, a check is made that in 
  8991.                 the operand value it equals the value specified for it. 
  8992.  
  8993.              6. For each discriminant of the result, a check is made that its 
  8994.                 value belongs to its subtype. 
  8995.  
  8996.         a. Access Type Conversion 
  8997.  
  8998.              1. For an access-to-object type, a check is made that the 
  8999.                 accessibility level of the operand type is not deeper than that 
  9000.                 of the target type. 
  9001.  
  9002.              2. If the target type is an anonymous access type, a check is made 
  9003.                 that the value of the operand is not null; if the target is not 
  9004.                 an anonymous access type, then the result is null if the 
  9005.                 operand value is null. 
  9006.  
  9007.              3. If the operand value is not null, then the result designates 
  9008.                 the same object (or subprogram) as is designated by the operand 
  9009.                 value, but viewed as being of the target designated subtype (or 
  9010.                 profile); any checks associated with evaluating a conversion to 
  9011.                 the target designated subtype are performed. 
  9012.  
  9013.    1. After conversion of the value to the target type, if the target subtype 
  9014.       is constrained, a check is performed that the value satisfies this 
  9015.       constraint. 
  9016.  
  9017.    2. For the evaluation of a view conversion, the operand name is evaluated, 
  9018.       and a new view of the object denoted by the operand is created, whose 
  9019.       type is the target type; if the target type is composite, checks are 
  9020.       performed as above for a value conversion. 
  9021.  
  9022.    3. The properties of this new view are as follows: 
  9023.  
  9024.         a. If the target type is composite, the bounds or discriminants (if 
  9025.            any) of the view are as defined above for a value conversion; each 
  9026.            nondiscriminant component of the view denotes the matching component 
  9027.            of the operand object; the subtype of the view is constrained if 
  9028.            either the target subtype or the operand object is constrained, or 
  9029.            if the operand type is a descendant of the target type, and has 
  9030.            discriminants that were not inherited from the target type; 
  9031.  
  9032.         b. If the target type is tagged, then an assignment to the view assigns 
  9033.            to the corresponding part of the object denoted by the operand; 
  9034.            otherwise, an assignment to the view assigns to the object, after 
  9035.            converting the assigned value to the subtype of the object (which 
  9036.            might raise Constraint_Error); 
  9037.  
  9038.         c. Reading the value of the view yields the result of converting the 
  9039.            value of the operand object to the target subtype (which might raise 
  9040.            Constraint_Error), except if the object is of an access type and the 
  9041.            view conversion is passed as an out parameter; in this latter case, 
  9042.            the value of the operand object is used to initialize the formal 
  9043.            parameter without checking against any constraint of the target 
  9044.            subtype (see 6.4.1). 
  9045.  
  9046.    1. If an Accessibility_Check fails, Program_Error is raised. Any other check 
  9047.       associated with a conversion raises Constraint_Error if it fails. 
  9048.  
  9049.    2. Conversion to a type is the same as conversion to an unconstrained 
  9050.       subtype of the type. 
  9051.  
  9052.       NOTES 
  9053.  
  9054.    3. (20) In addition to explicit type_conversions, type conversions are 
  9055.       performed implicitly in situations where the expected type and the actual 
  9056.       type of a construct differ, as is permitted by the type resolution rules, 
  9057.       see 8.6. For example, an integer literal is of the type 
  9058.       universal_integer, and is implicitly converted when assigned to a target 
  9059.       of some specific integer type. Similarly, an actual parameter of a 
  9060.       specific tagged type is implicitly converted when the corresponding 
  9061.       formal parameter is of a class-wide type. 
  9062.  
  9063.    4. Even when the expected and actual types are the same, implicit subtype 
  9064.       conversions are performed to adjust the array bounds (if any) of an 
  9065.       operand to match the desired target subtype, or to raise Constraint_Error 
  9066.       if the (possibly adjusted) value does not satisfy the constraints of the 
  9067.       target subtype. 
  9068.  
  9069.    5. (21) A ramification of the overload resolution rules is that the operand 
  9070.       of an (explicit) type_conversion cannot be the literal null, an 
  9071.       allocator, an aggregate, a string_literal, a character_literal, or an 
  9072.       attribute_reference for an Access or Unchecked_Access attribute. 
  9073.       Similarly, such an expression enclosed by parentheses is not allowed. A 
  9074.       qualified_expression, see 4.7, can be used instead of such a 
  9075.       type_conversion. 
  9076.  
  9077.    6. (22) The constraint of the target subtype has no effect for a 
  9078.       type_conversion of an elementary type passed as an out parameter. Hence, 
  9079.       it is recommended that the first subtype be specified as the target to 
  9080.       minimize confusion (a similar recommendation applies to renaming and 
  9081.       generic formal in out objects). 
  9082.  
  9083.             Examples
  9084.  
  9085.    7. Examples of numeric type conversion: 
  9086.  
  9087.          8.
  9088.  
  9089.                       Real(2*J)    --  value is converted to floating point
  9090.                       Integer(1.6)  --  value is 2
  9091.                       Integer(-0.4)  --  value is 0
  9092.  
  9093.    9. Example of conversion between derived types: 
  9094.  
  9095.         10.
  9096.  
  9097.                       type A_Form is new B_Form;
  9098.  
  9099.         11.
  9100.  
  9101.                       X : A_Form;
  9102.                       Y : B_Form;
  9103.  
  9104.         12.
  9105.  
  9106.                       X := A_Form(Y);
  9107.                       Y := B_Form(X);  --  the reverse conversion
  9108.  
  9109.   13. Examples of conversions between array types: 
  9110.  
  9111.         14.
  9112.  
  9113.                       type Sequence is array (Integer range <>) of Integer;
  9114.                       subtype Dozen is Sequence(1 ┬╖┬╖ 12);
  9115.                       Ledger : array(1 ┬╖┬╖ 100) of Integer;
  9116.  
  9117.         15.
  9118.  
  9119.                       Sequence(Ledger)       --  bounds are those of Ledger
  9120.                       Sequence(Ledger(31 ┬╖┬╖ 42))  --  bounds are 31 and 42
  9121.                       Dozen(Ledger(31 ┬╖┬╖ 42))   --  bounds are those of Dozen
  9122.  
  9123.  
  9124. ΓòÉΓòÉΓòÉ 7.7. Qualified Expressions ΓòÉΓòÉΓòÉ
  9125.  
  9126.    1. A qualified_expression is used to state explicitly the type, and to 
  9127.       verify the subtype, of an operand that is either an expression or an 
  9128.       aggregate. 
  9129.  
  9130.             Syntax
  9131.  
  9132.          2.
  9133.  
  9134.                       qualified_expression ::=
  9135.                         subtype_mark'(expression) | subtype_mark'aggregate
  9136.  
  9137.   Name Resolution Rules
  9138.  
  9139.    3. The operand (the expression or aggregate) shall resolve to be of the type 
  9140.       determined by the subtype_mark, or a universal type that covers it. 
  9141.  
  9142.             Dynamic Semantics
  9143.  
  9144.    4. The evaluation of a qualified_expression evaluates the operand (and if of 
  9145.       a universal type, converts it to the type determined by the subtype_mark) 
  9146.       and checks that its value belongs to the subtype denoted by the 
  9147.       subtype_mark. The exception Constraint_Error is raised if this check 
  9148.       fails. 
  9149.  
  9150.       NOTES 
  9151.  
  9152.    5. (23) When a given context does not uniquely identify an expected type, a 
  9153.       qualified_expression can be used to do so. In particular, if an 
  9154.       overloaded name or aggregate is passed to an overloaded subprogram, it 
  9155.       might be necessary to qualify the operand to resolve its type. 
  9156.  
  9157.             Examples
  9158.  
  9159.    6. Examples of disambiguating expressions using qualification: 
  9160.  
  9161.          7.
  9162.  
  9163.                       type Mask is (Fix, Dec, Exp, Signif);
  9164.                       type Code is (Fix, Cla, Dec, Tnz, Sub);
  9165.  
  9166.          8.
  9167.  
  9168.                       Print (Mask'(Dec));  --  Dec is of type Mask
  9169.                       Print (Code'(Dec));  --  Dec is of type Code
  9170.  
  9171.          9.
  9172.  
  9173.                       for J in Code'(Fix) ┬╖┬╖ Code'(Dec) loop ┬╖┬╖┬╖
  9174.                       -- qualification needed for either Fix or Dec
  9175.                       for J in Code range Fix ┬╖┬╖ Dec loop ┬╖┬╖┬╖
  9176.                       -- qualification unnecessary
  9177.                       for J in Code'(Fix) ┬╖┬╖ Dec loop ┬╖┬╖┬╖
  9178.                       -- qualification unnecessary for Dec
  9179.  
  9180.         10.
  9181.  
  9182.                       Dozen'(1 | 3 | 5 | 7 => 2, others => 0) --  see 4.6
  9183.  
  9184.  
  9185. ΓòÉΓòÉΓòÉ 7.8. Allocators ΓòÉΓòÉΓòÉ
  9186.  
  9187.    1. The evaluation of an allocator creates an object and yields an access 
  9188.       value that designates the object. 
  9189.  
  9190.             Syntax
  9191.  
  9192.          2.
  9193.  
  9194.                       allocator ::=
  9195.                         new subtype_indication | new qualified_expression
  9196.  
  9197.   Name Resolution Rules
  9198.  
  9199.    3. The expected type for an allocator shall be a single access-to-object 
  9200.       type whose designated type covers the type determined by the subtype_mark 
  9201.       of the subtype_indication or qualified_expression. 
  9202.  
  9203.             Legality Rules
  9204.  
  9205.    4. An initialized allocator is an allocator with a qualified_expression. An 
  9206.       uninitialized allocator is one with a subtype_indication. In the 
  9207.       subtype_indication of an uninitialized allocator, a constraint is 
  9208.       permitted only if the subtype_mark denotes an unconstrained composite 
  9209.       subtype; if there is no constraint, then the subtype_mark shall denote a 
  9210.       definite subtype. 
  9211.  
  9212.    5. If the type of the allocator is an access-to-constant type, the allocator 
  9213.       shall be an initialized allocator. If the designated type is limited, the 
  9214.       allocator shall be an uninitialized allocator. 
  9215.  
  9216.             Static Semantics
  9217.  
  9218.    6. If the designated type of the type of the allocator is elementary, then 
  9219.       the subtype of the created object is the designated subtype. If the 
  9220.       designated type is composite, then the created object is always 
  9221.       constrained; if the designated subtype is constrained, then it provides 
  9222.       the constraint of the created object; otherwise, the object is 
  9223.       constrained by its initial value (even if the designated subtype is 
  9224.       unconstrained with defaults). 
  9225.  
  9226.             Dynamic Semantics
  9227.  
  9228.    7. For the evaluation of an allocator, the elaboration of the 
  9229.       subtype_indication or the evaluation of the qualified_expression is 
  9230.       performed first. For the evaluation of an initialized allocator, an 
  9231.       object of the designated type is created and the value of the 
  9232.       qualified_expression is converted to the designated subtype and assigned 
  9233.       to the object. 
  9234.  
  9235.    8. For the evaluation of an uninitialized allocator: 
  9236.  
  9237.         a. If the designated type is elementary, an object of the designated 
  9238.            subtype is created and any implicit initial value is assigned; 
  9239.  
  9240.         b. If the designated type is composite, an object of the designated 
  9241.            type is created with tag, if any, determined by the subtype_mark of 
  9242.            the subtype_indication; any per-object constraints on subcomponents 
  9243.            are elaborated and any implicit initial values for the subcomponents 
  9244.            of the object are obtained as determined by the subtype_indication 
  9245.            and assigned to the corresponding subcomponents. A check is made 
  9246.            that the value of the object belongs to the designated subtype. 
  9247.            Constraint_Error is raised if this check fails. This check and the 
  9248.            initialization of the object are performed in an arbitrary order. 
  9249.  
  9250.    1. If the created object contains any tasks, they are activated (see 9.2). 
  9251.       Finally, an access value that designates the created object is returned. 
  9252.  
  9253.       NOTES 
  9254.  
  9255.    2. (24) Allocators cannot create objects of an abstract type (see 3.9.3). 
  9256.  
  9257.    3. (25) If any part of the created object is controlled, the initialization 
  9258.       includes calls on corresponding Initialize or Adjust procedures (see 
  9259.       7.6). 
  9260.  
  9261.    4. (26) As explained in 13.11: ``Storage Management'', the storage for an 
  9262.       object allocated by an allocator comes from a storage pool (possibly user 
  9263.       defined). The exception Storage_Error is raised by an allocator if there 
  9264.       is not enough storage. Instances of Unchecked_Deallocation may be used to 
  9265.       explicitly reclaim storage. 
  9266.  
  9267.    5. (27) Implementations are permitted, but not required, to provide garbage 
  9268.       collection, see 13.11.3. 
  9269.  
  9270.             Examples
  9271.  
  9272.    6. Examples of allocators: 
  9273.  
  9274.          7.
  9275.  
  9276.                       new Cell'(0, null, null)
  9277.                       -- initialized explicitly, see 3.10.1
  9278.                       new Cell'(Value => 0, Succ => null, Pred => null)
  9279.                       -- initialized explicitly
  9280.                       new Cell
  9281.                       -- not initialized
  9282.  
  9283.          8.
  9284.  
  9285.                       new Matrix(1 ┬╖┬╖ 10, 1 ┬╖┬╖ 20)
  9286.                       -- the bounds only are given
  9287.                       new Matrix'(1 ┬╖┬╖ 10 => (1 ┬╖┬╖ 20 => 0.0))
  9288.                       -- initialized explicitly
  9289.  
  9290.          9.
  9291.  
  9292.                       new Buffer(100)
  9293.                       -- the discriminant only is given
  9294.                       new Buffer'(Size => 80, Pos => 0, Value => (1 ┬╖┬╖ 80 => 'A'))
  9295.                       -- initialized explicitly
  9296.  
  9297.         10.
  9298.  
  9299.                       Expr_Ptr'(new Literal)
  9300.                       -- allocator for access-to-class-wide type, see 3.9.1
  9301.                       Expr_Ptr'(new Literal'(Expression with 3.5))
  9302.                       -- initialized explicitly
  9303.  
  9304.  
  9305. ΓòÉΓòÉΓòÉ 7.9. Static Expressions and Static Subtypes ΓòÉΓòÉΓòÉ
  9306.  
  9307.    1. Certain expressions of a scalar or string type are defined to be static. 
  9308.       Similarly, certain discrete ranges are defined to be static, and certain 
  9309.       scalar and string subtypes are defined to be static subtypes. Static 
  9310.       means determinable at compile time, using the declared properties or 
  9311.       values of the program entities. 
  9312.  
  9313.    2. A static expression is a scalar or string expression that is one of the 
  9314.       following: 
  9315.  
  9316.         a. a numeric_literal; 
  9317.  
  9318.         b. a string_literal of a static string subtype; 
  9319.  
  9320.         c. a name that denotes the declaration of a named number or a static 
  9321.            constant; 
  9322.  
  9323.         d. a function_call whose function_name or function_prefix statically 
  9324.            denotes a static function, and whose actual parameters, if any 
  9325.            (whether given explicitly or by default), are all static 
  9326.            expressions; 
  9327.  
  9328.         e. an attribute_reference that denotes a scalar value, and whose prefix 
  9329.            denotes a static scalar subtype; 
  9330.  
  9331.         f. an attribute_reference whose prefix statically denotes a statically 
  9332.            constrained array object or array subtype, and whose 
  9333.            attribute_designator is First, Last, or Length, with an optional 
  9334.            dimension; 
  9335.  
  9336.         g. a type_conversion whose subtype_mark denotes a static scalar 
  9337.            subtype, and whose operand is a static expression; 
  9338.  
  9339.         h. a qualified_expression whose subtype_mark denotes a static (scalar 
  9340.            or string) subtype, and whose operand is a static expression; 
  9341.  
  9342.         i. a membership test whose simple_expression is a static expression, 
  9343.            and whose range is a static range or whose subtype_mark denotes a 
  9344.            static (scalar or string) subtype; 
  9345.  
  9346.         j. a short-circuit control form both of whose relations are static 
  9347.            expressions; 
  9348.  
  9349.         k. a static expression enclosed in parentheses. 
  9350.  
  9351.    1. A name statically denotes an entity if it denotes the entity and: 
  9352.  
  9353.         a. It is a direct_name, expanded name, or character_literal, and it 
  9354.            denotes a declaration other than a renaming_declaration; or 
  9355.  
  9356.         b. It is an attribute_reference whose prefix statically denotes some 
  9357.            entity; or 
  9358.  
  9359.         c. It denotes a renaming_declaration with a name that statically 
  9360.            denotes the renamed entity. 
  9361.  
  9362.    1. A static function is one of the following: 
  9363.  
  9364.         a. a predefined operator whose parameter and result types are all 
  9365.            scalar types none of which are descendants of formal scalar types; 
  9366.  
  9367.         b. a predefined concatenation operator whose result type is a string 
  9368.            type; 
  9369.  
  9370.         c. an enumeration literal; 
  9371.  
  9372.         d. a language-defined attribute that is a function, if the prefix 
  9373.            denotes a static scalar subtype, and if the parameter and result 
  9374.            types are scalar. 
  9375.  
  9376.    1. In any case, a generic formal subprogram is not a static function. 
  9377.  
  9378.    2. A static constant is a constant view declared by a full constant 
  9379.       declaration or an object_renaming_declaration with a static nominal 
  9380.       subtype, having a value defined by a static scalar expression or by a 
  9381.       static string expression whose value has a length not exceeding the 
  9382.       maximum length of a string_literal in the implementation. 
  9383.  
  9384.    3. A static range is a range whose bounds are static expressions, or a 
  9385.       range_attribute_reference that is equivalent to such a range. A static 
  9386.       discrete_range is one that is a static range or is a subtype_indication 
  9387.       that defines a static scalar subtype. The base range of a scalar type is 
  9388.       a static range, unless the type is a descendant of a formal scalar type. 
  9389.  
  9390.    4. A static subtype is either a static scalar subtype or a static string 
  9391.       subtype. A static scalar subtype is an unconstrained scalar subtype whose 
  9392.       type is not a descendant of a formal scalar type, or a constrained scalar 
  9393.       subtype formed by imposing a compatible static constraint on a static 
  9394.       scalar subtype. A static string subtype is an unconstrained string 
  9395.       subtype whose index subtype and component subtype are static (and whose 
  9396.       type is not a descendant of a formal array type), or a constrained string 
  9397.       subtype formed by imposing a compatible static constraint on a static 
  9398.       string subtype. In any case, the subtype of a generic formal object of 
  9399.       mode in out, and the result subtype of a generic formal function, are not 
  9400.       static. 
  9401.  
  9402.    5. The different kinds of static constraint are defined as follows: 
  9403.  
  9404.         a. A null constraint is always static; 
  9405.  
  9406.         b. A scalar constraint is static if it has no range_constraint, or one 
  9407.            with a static range; 
  9408.  
  9409.         c. An index constraint is static if each discrete_range is static, and 
  9410.            each index subtype of the corresponding array type is static; 
  9411.  
  9412.         d. A discriminant constraint is static if each expression of the 
  9413.            constraint is static, and the subtype of each discriminant is 
  9414.            static. 
  9415.  
  9416.    1. A subtype is statically constrained if it is constrained, and its 
  9417.       constraint is static. An object is statically constrained if its nominal 
  9418.       subtype is statically constrained, or if it is a static string constant. 
  9419.  
  9420.             Legality Rules
  9421.  
  9422.    2. A static expression is evaluated at compile time except when it is part 
  9423.       of the right operand of a static short-circuit control form whose value 
  9424.       is determined by its left operand. This evaluation is performed exactly, 
  9425.       without performing Overflow_Checks. For a static expression that is 
  9426.       evaluated: 
  9427.  
  9428.         a. The expression is illegal if its evaluation fails a language-defined 
  9429.            check other than Overflow_Check. 
  9430.  
  9431.         b. If the expression is not part of a larger static expression, then 
  9432.            its value shall be within the base range of its expected type. 
  9433.            Otherwise, the value may be arbitrarily large or small. 
  9434.  
  9435.         c. If the expression is of type universal_real and its expected type is 
  9436.            a decimal fixed point type, then its value shall be a multiple of 
  9437.            the small of the decimal type. 
  9438.  
  9439.    1. The last two restrictions above do not apply if the expected type is a 
  9440.       descendant of a formal scalar type (or a corresponding actual type in an 
  9441.       instance). 
  9442.  
  9443.             Implementation Requirements
  9444.  
  9445.    2. For a real static expression that is not part of a larger static 
  9446.       expression, and whose expected type is not a descendant of a formal 
  9447.       scalar type, the implementation shall round or truncate the value 
  9448.       (according to the Machine_Rounds attribute of the expected type) to the 
  9449.       nearest machine number of the expected type; if the value is exactly 
  9450.       half-way between two machine numbers, any rounding shall be performed 
  9451.       away from zero. If the expected type is a descendant of a formal scalar 
  9452.       type, no special rounding or truncating is required -- normal accuracy 
  9453.       rules apply, see G. 
  9454.  
  9455.       NOTES 
  9456.  
  9457.    3. (28) An expression can be static even if it occurs in a context where 
  9458.       staticness is not required. 
  9459.  
  9460.    4. (29) A static (or run-time) type_conversion from a real type to an 
  9461.       integer type performs rounding. If the operand value is exactly half-way 
  9462.       between two integers, the rounding is performed away from zero. 
  9463.  
  9464.             Examples
  9465.  
  9466.    5. Examples of static expressions: 
  9467.  
  9468.          6.
  9469.  
  9470.                       1 + 1    -- 2
  9471.                       abs(-10)*3  -- 30
  9472.  
  9473.          7.
  9474.  
  9475.                       Kilo : constant := 1000;
  9476.                       Mega : constant := Kilo*Kilo;  -- 1_000_000
  9477.                       Long : constant := Float'Digits*2;
  9478.  
  9479.          8.
  9480.  
  9481.                       Half_Pi   : constant := Pi/2;
  9482.                       --  see 3.3.2.
  9483.                       Deg_To_Rad : constant := Half_Pi/90;
  9484.                       Rad_To_Deg : constant := 1.0/Deg_To_Rad;
  9485.                       -- equivalent to 1.0/((3.14159_26536/2)/90)
  9486.  
  9487.  4.9.1                         Statically Matching Constraints and Subtypes 
  9488.  
  9489.  
  9490. ΓòÉΓòÉΓòÉ 7.9.1. Statically Matching Constraints and Subtypes ΓòÉΓòÉΓòÉ
  9491.  
  9492.  
  9493.   Static Semantics
  9494.  
  9495.    1. A constraint statically matches another constraint if both are null 
  9496.       constraints, both are static and have equal corresponding bounds or 
  9497.       discriminant values, or both are nonstatic and result from the same 
  9498.       elaboration of a constraint of a subtype_indication or the same 
  9499.       evaluation of a range of a discrete_subtype_definition. 
  9500.  
  9501.    2. A subtype statically matches another subtype of the same type if they 
  9502.       have statically matching constraints. Two anonymous access subtypes 
  9503.       statically match if their designated subtypes statically match. 
  9504.  
  9505.    3. Two ranges of the same type statically match if both result from the same 
  9506.       evaluation of a range, or if both are static and have equal corresponding 
  9507.       bounds. 
  9508.  
  9509.    4. A constraint is statically compatible with a scalar subtype if it 
  9510.       statically matches the constraint of the subtype, or if both are static 
  9511.       and the constraint is compatible with the subtype. A constraint is 
  9512.       statically compatible with an access or composite subtype if it 
  9513.       statically matches the constraint of the subtype, or if the subtype is 
  9514.       unconstrained. One subtype is statically compatible with a second subtype 
  9515.       if the constraint of the first is statically compatible with the second 
  9516.       subtype. 
  9517.  
  9518.  
  9519. ΓòÉΓòÉΓòÉ 8. Statements ΓòÉΓòÉΓòÉ
  9520.  
  9521.    1. A statement defines an action to be performed upon its execution. 
  9522.  
  9523.    2. This section describes the general rules applicable to all statements. 
  9524.       Some statements are discussed in later sections: 
  9525.       Procedure_call_statements and return_statements are described in 6: 
  9526.       ``Subprograms''. Entry_call_statements, requeue_statements, 
  9527.       delay_statements, accept_statements, select_statements, and 
  9528.       abort_statements are described in 9: ``Tasks and Synchronization''. 
  9529.       Raise_statements are described in 11: ``Exceptions'', and code_statements 
  9530.       in 13. The remaining forms of statements are presented in this section. 
  9531.  
  9532.  5.1                           Simple and Compound Statements - Sequences of 
  9533.                                Statements 
  9534.  5.2                           Assignment Statements 
  9535.  5.3                           If Statements 
  9536.  5.4                           Case Statements 
  9537.  5.5                           Loop Statements 
  9538.  5.6                           Block Statements 
  9539.  5.7                           Exit Statements 
  9540.  5.8                           Goto Statements 
  9541.  
  9542.  
  9543. ΓòÉΓòÉΓòÉ 8.1. Simple and Compound Statements - Sequences of Statements ΓòÉΓòÉΓòÉ
  9544.  
  9545.    1. A statement is either simple or compound. A simple_statement encloses no 
  9546.       other statement. A compound_statement can enclose simple_statements and 
  9547.       other compound_statements. 
  9548.  
  9549.             Syntax
  9550.  
  9551.          2.
  9552.  
  9553.                       sequence_of_statements ::= statement {statement}
  9554.  
  9555.          3.
  9556.  
  9557.                       statement ::=
  9558.                         {label} simple_statement | {label} compound_statement
  9559.  
  9560.          4.
  9561.  
  9562.                       simple_statement ::= null_statement
  9563.                         | assignment_statement  | exit_statement
  9564.                         | goto_statement     | procedure_call_statement
  9565.                         | return_statement    | entry_call_statement
  9566.                         | requeue_statement    | delay_statement
  9567.                         | abort_statement     | raise_statement
  9568.                         | code_statement
  9569.  
  9570.          5.
  9571.  
  9572.                       compound_statement ::=
  9573.                          if_statement      | case_statement
  9574.                         | loop_statement     | block_statement
  9575.                         | accept_statement    | select_statement
  9576.  
  9577.          6.
  9578.  
  9579.                       null_statement ::= null;
  9580.  
  9581.          7.
  9582.  
  9583.                       label ::= <<label_statement_identifier>>
  9584.  
  9585.          8.
  9586.  
  9587.                       statement_identifier ::= direct_name
  9588.  
  9589.         a. The direct_name of a statement_identifier shall be an identifier 
  9590.            (not an operator_symbol). 
  9591.  
  9592.   Name Resolution Rules
  9593.  
  9594.    1. The direct_name of a statement_identifier shall resolve to denote its 
  9595.       corresponding implicit declaration (see below). 
  9596.  
  9597.             Legality Rules
  9598.  
  9599.    2. Distinct identifiers shall be used for all statement_identifiers that 
  9600.       appear in the same body, including inner block_statements but excluding 
  9601.       inner program units. 
  9602.  
  9603.             Static Semantics
  9604.  
  9605.    3. For each statement_identifier, there is an implicit declaration (with the 
  9606.       specified identifier) at the end of the declarative_part of the innermost 
  9607.       block_statement or body that encloses the statement_identifier. The 
  9608.       implicit declarations occur in the same order as the 
  9609.       statement_identifiers occur in the source text. If a usage name denotes 
  9610.       such an implicit declaration, the entity it denotes is the label, 
  9611.       loop_statement, or block_statement with the given statement_identifier. 
  9612.  
  9613.             Dynamic Semantics
  9614.  
  9615.    4. The execution of a null_statement has no effect. 
  9616.  
  9617.    5. A transfer of control is the run-time action of an exit_statement, 
  9618.       return_statement, goto_statement, or requeue_statement, selection of a 
  9619.       terminate_alternative, raising of an exception, or an abort, which causes 
  9620.       the next action performed to be one other than what would normally be 
  9621.       expected from the other rules of the language. As explained in 7.6.1, a 
  9622.       transfer of control can cause the execution of constructs to be completed 
  9623.       and then left, which may trigger finalization. 
  9624.  
  9625.    6. The execution of a sequence_of_statements consists of the execution of 
  9626.       the individual statements in succession until the sequence_ is completed. 
  9627.  
  9628.       NOTES 
  9629.  
  9630.    7. (1) A statement_identifier that appears immediately within the 
  9631.       declarative region of a named loop_statement or an accept_statement is 
  9632.       nevertheless implicitly declared immediately within the declarative 
  9633.       region of the innermost enclosing body or block_statement; in other 
  9634.       words, the expanded name for a named statement is not affected by whether 
  9635.       the statement occurs inside or outside a named loop or an 
  9636.       accept_statement -- only nesting within block_statements is relevant to 
  9637.       the form of its expanded name. 
  9638.  
  9639.             Examples
  9640.  
  9641.    8. Examples of labeled statements: 
  9642.  
  9643.          9.
  9644.  
  9645.                       <<Here>> <<Ici>> <<Aqui>> <<Hier>> null;
  9646.  
  9647.         10.
  9648.  
  9649.                       <<After>> X := 1;
  9650.  
  9651.  
  9652. ΓòÉΓòÉΓòÉ 8.2. Assignment Statements ΓòÉΓòÉΓòÉ
  9653.  
  9654.    1. An assignment_statement replaces the current value of a variable with the 
  9655.       result of evaluating an expression. 
  9656.  
  9657.             Syntax
  9658.  
  9659.          2.
  9660.  
  9661.                       assignment_statement ::= variable_name := expression;
  9662.  
  9663.    3. The execution of an assignment_statement includes the evaluation of the 
  9664.       expression and the assignment of the value of the expression into the 
  9665.       target. An assignment operation (as opposed to an assignment_statement) 
  9666.       is performed in other contexts as well, including object initialization 
  9667.       and by-copy parameter passing. The target of an assignment operation is 
  9668.       the view of the object to which a value is being assigned; the target of 
  9669.       an assignment_statement is the variable denoted by the variable_name. 
  9670.  
  9671.             Name Resolution Rules
  9672.  
  9673.    4. The variable_name of an assignment_statement is expected to be of any 
  9674.       nonlimited type. The expected type for the expression is the type of the 
  9675.       target. 
  9676.  
  9677.             Legality Rules
  9678.  
  9679.    5. The target denoted by the variable_name shall be a variable. 
  9680.  
  9681.    6. If the target is of a tagged class-wide type T'Class, then the expression 
  9682.       shall either be dynamically tagged, or of type T and tag-indeterminate, 
  9683.       see 3.9.2. 
  9684.  
  9685.             Dynamic Semantics
  9686.  
  9687.    7. For the execution of an assignment_statement, the variable_name and the 
  9688.       expression are first evaluated in an arbitrary order. 
  9689.  
  9690.    8. When the type of the target is class-wide: 
  9691.  
  9692.         a. If the expression is tag-indeterminate, see 3.9.2, then the 
  9693.            controlling tag value for the expression is the tag of the target; 
  9694.  
  9695.         b. Otherwise (the expression is dynamically tagged), a check is made 
  9696.            that the tag of the value of the expression is the same as that of 
  9697.            the target; if this check fails, Constraint_Error is raised. 
  9698.  
  9699.    1. The value of the expression is converted to the subtype of the target. 
  9700.       The conversion might raise an exception, see 4.6. 
  9701.  
  9702.    2. In cases involving controlled types, the target is finalized, and an 
  9703.       anonymous object might be used as an intermediate in the assignment, as 
  9704.       described in 7.6.1: ``Completion and Finalization''. In any case, the 
  9705.       converted value of the expression is then assigned to the target, which 
  9706.       consists of the following two steps: 
  9707.  
  9708.         a. The value of the target becomes the converted value. 
  9709.  
  9710.         b. If any part of the target is controlled, its value is adjusted as 
  9711.            explained in 7.6. 
  9712.   NOTES 
  9713.  
  9714.    1. (2) The tag of an object never changes; in particular, an 
  9715.       assignment_statement does not change the tag of the target. 
  9716.  
  9717.    2. (3) The values of the discriminants of an object designated by an access 
  9718.       value cannot be changed (not even by assigning a complete value to the 
  9719.       object itself) since such objects are always constrained; however, 
  9720.       subcomponents of such objects may be unconstrained. 
  9721.  
  9722.             Examples
  9723.  
  9724.    3. Examples of assignment statements: 
  9725.  
  9726.          4.
  9727.  
  9728.                       Value := Max_Value - 1;
  9729.                       Shade := Blue;
  9730.  
  9731.          5.
  9732.  
  9733.                       Next_Frame(F)(M, N) := 2.5;  --  see 4.1.1
  9734.                       U := Dot_Product(V, W);    --  see 6.3
  9735.  
  9736.          6.
  9737.  
  9738.                       Writer := (Status => Open, Unit => Printer, Line_Count => 60);
  9739.                       --  see 3.8.1
  9740.                       Next_Car.all := (72074, null);
  9741.                       --  see 3.10.1
  9742.  
  9743.    7. Examples involving scalar subtype conversions: 
  9744.  
  9745.          8.
  9746.  
  9747.                       I, J : Integer range 1 ┬╖┬╖ 10 := 5;
  9748.                       K   : Integer range 1 ┬╖┬╖ 20 := 15;
  9749.                        ┬╖┬╖┬╖
  9750.  
  9751.          9.
  9752.  
  9753.                       I := J;  --  identical ranges
  9754.                       K := J;  --  compatible ranges
  9755.                       J := K;  --  will raise Constraint_Error if K > 10
  9756.  
  9757.   10. Examples involving array subtype conversions: 
  9758.  
  9759.         11.
  9760.  
  9761.                       A : String(1 ┬╖┬╖ 31);
  9762.                       B : String(3 ┬╖┬╖ 33);
  9763.                        ┬╖┬╖┬╖
  9764.  
  9765.         12.
  9766.  
  9767.                       A := B;  --  same number of components
  9768.  
  9769.         13.
  9770.  
  9771.                       A(1 ┬╖┬╖ 9)  := "tar sauce";
  9772.                       A(4 ┬╖┬╖ 12) := A(1 ┬╖┬╖ 9);  --  A(1 ┬╖┬╖ 12) = "tartar sauce"
  9773.  
  9774.  NOTES 
  9775.  
  9776.   14. (4) Notes on the examples: Assignment_statements are allowed even in the 
  9777.       case of overlapping slices of the same array, because the variable_name 
  9778.       and expression are both evaluated before copying the value into the 
  9779.       variable. In the above example, an implementation yielding A(1 ┬╖┬╖ 12) = 
  9780.       "tartartartar" would be incorrect. 
  9781.  
  9782.  
  9783. ΓòÉΓòÉΓòÉ 8.3. If Statements ΓòÉΓòÉΓòÉ
  9784.  
  9785.    1. An if_statement selects for execution at most one of the enclosed 
  9786.       sequences_of_statements, depending on the (truth) value of one or more 
  9787.       corresponding conditions. 
  9788.  
  9789.             Syntax
  9790.  
  9791.          2.
  9792.  
  9793.                       if_statement ::=
  9794.                         if condition then
  9795.                           sequence_of_statements
  9796.                         {elsif condition then
  9797.                           sequence_of_statements}
  9798.                         [else
  9799.                           sequence_of_statements]
  9800.                         end if;
  9801.  
  9802.          3.
  9803.  
  9804.                       condition ::= boolean_expression
  9805.  
  9806.   Name Resolution Rules
  9807.  
  9808.    4. A condition is expected to be of any boolean type. 
  9809.  
  9810.             Dynamic Semantics
  9811.  
  9812.    5. For the execution of an if_statement, the condition specified after if, 
  9813.       and any conditions specified after elsif, are evaluated in succession 
  9814.       (treating a final else as elsif True then), until one evaluates to True 
  9815.       or all conditions are evaluated and yield False. If a condition evaluates 
  9816.       to True, then the corresponding sequence_of_statements is executed; 
  9817.       otherwise none of them is executed. 
  9818.  
  9819.             Examples
  9820.  
  9821.    6. Examples of if statements: 
  9822.  
  9823.          7.
  9824.  
  9825.                       if Month = December and Day = 31 then
  9826.                         Month := January;
  9827.                         Day  := 1;
  9828.                         Year  := Year + 1;
  9829.                       end if;
  9830.  
  9831.          8.
  9832.  
  9833.                       if Line_Too_Short then
  9834.                         raise Layout_Error;
  9835.                       elsif Line_Full then
  9836.                         New_Line;
  9837.                         Put(Item);
  9838.                       else
  9839.                         Put(Item);
  9840.                       end if;
  9841.  
  9842.          9.
  9843.  
  9844.                       if My_Car.Owner.Vehicle /= My_Car then  --  see 3.10.1
  9845.                         Report ("Incorrect data");
  9846.                       end if;
  9847.  
  9848.  
  9849. ΓòÉΓòÉΓòÉ 8.4. Case Statements ΓòÉΓòÉΓòÉ
  9850.  
  9851.    1. A case_statement selects for execution one of a number of alternative 
  9852.       sequences_of_statements; the chosen alternative is defined by the value 
  9853.       of an expression. 
  9854.  
  9855.             Syntax
  9856.  
  9857.          2.
  9858.  
  9859.                       case_statement ::=
  9860.                         case expression is
  9861.                          case_statement_alternative
  9862.                          {case_statement_alternative}
  9863.                         end case;
  9864.  
  9865.          3.
  9866.  
  9867.                       case_statement_alternative ::=
  9868.                         when discrete_choice_list =>
  9869.                          sequence_of_statements
  9870.  
  9871.   Name Resolution Rules
  9872.  
  9873.    4. The expression is expected to be of any discrete type. The expected type 
  9874.       for each discrete_choice is the type of the expression. 
  9875.  
  9876.             Legality Rules
  9877.  
  9878.    5. The expressions and discrete_ranges given as discrete_choices of a 
  9879.       case_statement shall be static. A discrete_choice others, if present, 
  9880.       shall appear alone and in the last discrete_choice_list. 
  9881.  
  9882.    6. The possible values of the expression shall be covered as follows: 
  9883.  
  9884.         a. If the expression is a name (including a type_conversion or a 
  9885.            function_call) having a static and constrained nominal subtype, or 
  9886.            is a qualified_expression whose subtype_mark denotes a static and 
  9887.            constrained scalar subtype, then each non-others discrete_choice 
  9888.            shall cover only values in that subtype, and each value of that 
  9889.            subtype shall be covered by some discrete_choice (either explicitly 
  9890.            or by others). 
  9891.  
  9892.         b. If the type of the expression is root_integer, universal_integer, or 
  9893.            a descendant of a formal scalar type, then the case_statement shall 
  9894.            have an others discrete_choice. 
  9895.  
  9896.         c. Otherwise, each value of the base range of the type of the 
  9897.            expression shall be covered (either explicitly or by others). 
  9898.  
  9899.    1. Two distinct discrete_choices of a case_statement shall not cover the 
  9900.       same value. 
  9901.  
  9902.             Dynamic Semantics
  9903.  
  9904.    2. For the execution of a case_statement the expression is first evaluated. 
  9905.  
  9906.    3. If the value of the expression is covered by the discrete_choice_list of 
  9907.       some case_statement_alternative, then the sequence_of_statements of the 
  9908.       _alternative is executed. 
  9909.  
  9910.    4. Otherwise (the value is not covered by any discrete_choice_list, perhaps 
  9911.       due to being outside the base range), Constraint_Error is raised. 
  9912.  
  9913.       NOTES 
  9914.  
  9915.    5. (5) The execution of a case_statement chooses one and only one 
  9916.       alternative. Qualification of the expression of a case_statement by a 
  9917.       static subtype can often be used to limit the number of choices that need 
  9918.       be given explicitly. 
  9919.  
  9920.             Examples
  9921.  
  9922.    6. Examples of case statements: 
  9923.  
  9924.          7.
  9925.  
  9926.                       case Sensor is
  9927.                         when Elevation  => Record_Elevation(Sensor_Value);
  9928.                         when Azimuth   => Record_Azimuth  (Sensor_Value);
  9929.                         when Distance  => Record_Distance (Sensor_Value);
  9930.                         when others   => null;
  9931.                       end case;
  9932.  
  9933.          8.
  9934.  
  9935.                       case Today is
  9936.                         when Mon     => Compute_Initial_Balance;
  9937.                         when Fri     => Compute_Closing_Balance;
  9938.                         when Tue ┬╖┬╖ Thu => Generate_Report(Today);
  9939.                         when Sat ┬╖┬╖ Sun => null;
  9940.                       end case;
  9941.  
  9942.          9.
  9943.  
  9944.                       case Bin_Number(Count) is
  9945.                         when 1    => Update_Bin(1);
  9946.                         when 2    => Update_Bin(2);
  9947.                         when 3 | 4  =>
  9948.                          Empty_Bin(1);
  9949.                          Empty_Bin(2);
  9950.                         when others => raise Error;
  9951.                       end case;
  9952.  
  9953.  
  9954. ΓòÉΓòÉΓòÉ 8.5. Loop Statements ΓòÉΓòÉΓòÉ
  9955.  
  9956.    1. A loop_statement includes a sequence_of_statements that is to be executed 
  9957.       repeatedly, zero or more times. 
  9958.  
  9959.             Syntax
  9960.  
  9961.          2.
  9962.  
  9963.                       loop_statement ::=
  9964.                         [loop_statement_identifier:]
  9965.                          [iteration_scheme] loop
  9966.                            sequence_of_statements
  9967.                          end loop [loop_identifier];
  9968.  
  9969.          3.
  9970.  
  9971.                       iteration_scheme ::= while condition
  9972.                         | for loop_parameter_specification
  9973.  
  9974.          4.
  9975.  
  9976.                       loop_parameter_specification ::=
  9977.                         defining_identifier in [reverse] discrete_subtype_definition
  9978.  
  9979.         a. If a loop_statement has a loop_statement_identifier, then the 
  9980.            identifier shall be repeated after the end loop; otherwise, there 
  9981.            shall not be an identifier after the end loop. 
  9982.  
  9983.   Static Semantics
  9984.  
  9985.    1. A loop_parameter_specification declares a loop parameter, which is an 
  9986.       object whose subtype is that defined by the discrete_subtype_definition. 
  9987.  
  9988.             Dynamic Semantics
  9989.  
  9990.    2. For the execution of a loop_statement, the sequence_of_statements is 
  9991.       executed repeatedly, zero or more times, until the loop_statement is 
  9992.       complete. The loop_statement is complete when a transfer of control 
  9993.       occurs that transfers control out of the loop, or, in the case of an 
  9994.       iteration_scheme, as specified below. 
  9995.  
  9996.    3. For the execution of a loop_statement with a while iteration_scheme, the 
  9997.       condition is evaluated before each execution of the 
  9998.       sequence_of_statements; if the value of the condition is True, the 
  9999.       sequence_of_statements is executed; if False, the execution of the 
  10000.       loop_statement is complete. 
  10001.  
  10002.    4. For the execution of a loop_statement with a for iteration_scheme, the 
  10003.       loop_parameter_specification is first elaborated. This elaboration 
  10004.       creates the loop parameter and elaborates the 
  10005.       discrete_subtype_definition. If the discrete_subtype_definition defines a 
  10006.       subtype with a null range, the execution of the loop_statement is 
  10007.       complete. Otherwise, the sequence_of_statements is executed once for each 
  10008.       value of the discrete subtype defined by the discrete_subtype_definition 
  10009.       (or until the loop is left as a consequence of a transfer of control). 
  10010.       Prior to each such iteration, the corresponding value of the discrete 
  10011.       subtype is assigned to the loop parameter. These values are assigned in 
  10012.       increasing order unless the reserved word reverse is present, in which 
  10013.       case the values are assigned in decreasing order. 
  10014.  
  10015.       NOTES 
  10016.  
  10017.    5. (6) A loop parameter is a constant; it cannot be updated within the 
  10018.       sequence_of_statements of the loop, see 3.3. 
  10019.  
  10020.    6. (7) An object_declaration should not be given for a loop parameter, since 
  10021.       the loop parameter is automatically declared by the 
  10022.       loop_parameter_specification. The scope of a loop parameter extends from 
  10023.       the loop_parameter_specification to the end of the loop_statement, and 
  10024.       the visibility rules are such that a loop parameter is only visible 
  10025.       within the sequence_of_statements of the loop. 
  10026.  
  10027.    7. (8) The discrete_subtype_definition of a for loop is elaborated just 
  10028.       once. Use of the reserved word reverse does not alter the discrete 
  10029.       subtype defined, so that the following iteration_schemes are not 
  10030.       equivalent; the first has a null range. 
  10031.  
  10032.          8.
  10033.  
  10034.                       for J in reverse 1 ┬╖┬╖  0
  10035.                       for J in 0 ┬╖┬╖ 1
  10036.  
  10037.   Examples
  10038.  
  10039.    9. Example of a loop statement without an iteration scheme: 
  10040.  
  10041.         10.
  10042.  
  10043.                       loop
  10044.                         Get(Current_Character);
  10045.                         exit when Current_Character = '*';
  10046.                       end loop;
  10047.  
  10048.   11. Example of a loop statement with a while iteration scheme: 
  10049.  
  10050.         12.
  10051.  
  10052.                       while Bid(N).Price < Cut_Off.Price loop
  10053.                         Record_Bid(Bid(N).Price);
  10054.                         N := N + 1;
  10055.                       end loop;
  10056.  
  10057.   13. Example of a loop statement with a for iteration scheme: 
  10058.  
  10059.         14.
  10060.  
  10061.                       for J in Buffer'Range loop  --  works even with a null range
  10062.                         if Buffer(J) /= Space then
  10063.                          Put(Buffer(J));
  10064.                         end if;
  10065.                       end loop;
  10066.  
  10067.   15. Example of a loop statement with a name: 
  10068.  
  10069.         16.
  10070.  
  10071.                       Summation:
  10072.                         while Next /= Head loop  --  see 3.10.1
  10073.                          Sum  := Sum + Next.Value;
  10074.                          Next := Next.Succ;
  10075.                         end loop Summation;
  10076.  
  10077.  
  10078. ΓòÉΓòÉΓòÉ 8.6. Block Statements ΓòÉΓòÉΓòÉ
  10079.  
  10080.    1. A block_statement encloses a handled_sequence_of_statements optionally 
  10081.       preceded by a declarative_part. 
  10082.  
  10083.             Syntax
  10084.  
  10085.          2.
  10086.  
  10087.                       block_statement ::=
  10088.                         [block_statement_identifier:]
  10089.                          [declare
  10090.                            declarative_part]
  10091.                          begin
  10092.                            handled_sequence_of_statements
  10093.                          end [block_identifier];
  10094.  
  10095.         a. If a block_statement has a block_statement_identifier, then the 
  10096.            identifier shall be repeated after the end; otherwise, there shall 
  10097.            not be an identifier after the end. 
  10098.  
  10099.   Static Semantics
  10100.  
  10101.    1. A block_statement that has no explicit declarative_part has an implicit 
  10102.       empty declarative_part. 
  10103.  
  10104.             Dynamic Semantics
  10105.  
  10106.    2. The execution of a block_statement consists of the elaboration of its 
  10107.       declarative_part followed by the execution of its 
  10108.       handled_sequence_of_statements. 
  10109.  
  10110.             Examples
  10111.  
  10112.    3. Example of a block statement with a local variable: 
  10113.  
  10114.          4.
  10115.  
  10116.                       Swap:
  10117.                         declare
  10118.                          Temp : Integer;
  10119.                         begin
  10120.                          Temp := V; V := U; U := Temp;
  10121.                         end Swap;
  10122.  
  10123.  
  10124. ΓòÉΓòÉΓòÉ 8.7. Exit Statements ΓòÉΓòÉΓòÉ
  10125.  
  10126.    1. An exit_statement is used to complete the execution of an enclosing 
  10127.       loop_statement; the completion is conditional if the exit_statement 
  10128.       includes a condition. 
  10129.  
  10130.             Syntax
  10131.  
  10132.          2.
  10133.  
  10134.                       exit_statement ::= exit [loop_name] [when condition];
  10135.  
  10136.   Name Resolution Rules
  10137.  
  10138.    3. The loop_name, if any, in an exit_statement shall resolve to denote a 
  10139.       loop_statement. 
  10140.  
  10141.             Legality Rules
  10142.  
  10143.    4. Each exit_statement applies to a loop_statement; this is the 
  10144.       loop_statement being exited. An exit_statement with a name is only 
  10145.       allowed within the loop_statement denoted by the name, and applies to 
  10146.       that loop_statement. An exit_statement without a name is only allowed 
  10147.       within a loop_statement, and applies to the innermost enclosing one. An 
  10148.       exit_statement that applies to a given loop_statement shall not appear 
  10149.       within a body or accept_statement, if this construct is itself enclosed 
  10150.       by the given loop_statement. 
  10151.  
  10152.             Dynamic Semantics
  10153.  
  10154.    5. For the execution of an exit_statement, the condition, if present, is 
  10155.       first evaluated. If the value of the condition is True, or if there is no 
  10156.       condition, a transfer of control is done to complete the loop_statement. 
  10157.       If the value of the condition is False, no transfer of control takes 
  10158.       place. 
  10159.  
  10160.       NOTES 
  10161.  
  10162.    6. (9) Several nested loops can be exited by an exit_statement that names 
  10163.       the outer loop. 
  10164.  
  10165.             Examples
  10166.  
  10167.    7. Examples of loops with exit statements: 
  10168.  
  10169.          8.
  10170.  
  10171.                       for N in 1 ┬╖┬╖ Max_Num_Items loop
  10172.                         Get_New_Item(New_Item);
  10173.                         Merge_Item(New_Item, Storage_File);
  10174.                         exit when New_Item = Terminal_Item;
  10175.                       end loop;
  10176.  
  10177.          9.
  10178.  
  10179.                       Main_Cycle:
  10180.                         loop
  10181.                          --  initial statements
  10182.                          exit Main_Cycle when Found;
  10183.                          --  final statements
  10184.                         end loop Main_Cycle;
  10185.  
  10186.  
  10187. ΓòÉΓòÉΓòÉ 8.8. Goto Statements ΓòÉΓòÉΓòÉ
  10188.  
  10189.    1. A goto_statement specifies an explicit transfer of control from this 
  10190.       statement to a target statement with a given label. 
  10191.  
  10192.             Syntax
  10193.  
  10194.          2.
  10195.  
  10196.                       goto_statement ::= goto label_name;
  10197.  
  10198.   Name Resolution Rules
  10199.  
  10200.    3. The label_name shall resolve to denote a label; the statement with that 
  10201.       label is the target statement. 
  10202.  
  10203.             Legality Rules
  10204.  
  10205.    4. The innermost sequence_of_statements that encloses the target statement 
  10206.       shall also enclose the goto_statement. Furthermore, if a goto_statement 
  10207.       is enclosed by an accept_statement or a body, then the target statement 
  10208.       shall not be outside this enclosing construct. 
  10209.  
  10210.             Dynamic Semantics
  10211.  
  10212.    5. The execution of a goto_statement transfers control to the target 
  10213.       statement, completing the execution of any compound_statement that 
  10214.       encloses the goto_statement but does not enclose the target. 
  10215.  
  10216.       NOTES 
  10217.  
  10218.    6. (10) The above rules allow transfer of control to a statement of an 
  10219.       enclosing sequence_of_statements but not the reverse. Similarly, they 
  10220.       prohibit transfers of control such as between alternatives of a 
  10221.       case_statement, if_statement, or select_statement; between 
  10222.       exception_handlers; or from an exception_handler of a 
  10223.       handled_sequence_of_statements back to its sequence_of_statements. 
  10224.  
  10225.             Examples
  10226.  
  10227.    7. Example of a loop containing a goto statement: 
  10228.  
  10229.          8.
  10230.  
  10231.                       <<Sort>>
  10232.                       for I in 1 ┬╖┬╖ N-1 loop
  10233.                         if A(I) > A(I+1) then
  10234.                          Exchange(A(I), A(I+1));
  10235.                          goto Sort;
  10236.                         end if;
  10237.                       end loop;
  10238.  
  10239.  
  10240. ΓòÉΓòÉΓòÉ 9. Subprograms ΓòÉΓòÉΓòÉ
  10241.  
  10242.    1. A subprogram is a program unit or intrinsic operation whose execution is 
  10243.       invoked by a subprogram call. There are two forms of subprogram: 
  10244.       procedures and functions. A procedure call is a statement; a function 
  10245.       call is an expression and returns a value. The definition of a subprogram 
  10246.       can be given in two parts: a subprogram declaration defining its 
  10247.       interface, and a subprogram_body defining its execution. Operators and 
  10248.       enumeration literals are functions. 
  10249.  
  10250.    2. A callable entity is a subprogram or entry, see 9. A callable entity is 
  10251.       invoked by a call; that is, a subprogram call or entry call. A callable 
  10252.       construct is a construct that defines the action of a call upon a 
  10253.       callable entity: a subprogram_body, entry_body, or accept_statement. 
  10254.  
  10255.  6.1                           Subprogram Declarations 
  10256.  6.2                           Formal Parameter Modes 
  10257.  6.3                           Subprogram Bodies 
  10258.  6.4                           Subprogram Calls 
  10259.  6.5                           Return Statements 
  10260.  6.6                           Overloading of Operators --- The Detailed Node 
  10261.                                Listing --- 
  10262.  6.1                           Subprogram Declarations 
  10263.  6.2                           Formal Parameter Modes 
  10264.  6.3                           Subprogram Bodies 
  10265.  6.3.1                         Conformance Rules 
  10266.  6.3.2                         Inline Expansion of Subprograms 
  10267.  6.4                           Subprogram Calls 
  10268.  6.4.1                         Parameter Associations 
  10269.  6.5                           Return Statements 
  10270.  6.6                           Overloading of Operators 
  10271.  
  10272.  
  10273. ΓòÉΓòÉΓòÉ 9.1. Subprogram Declarations ΓòÉΓòÉΓòÉ
  10274.  
  10275.    1. A subprogram_declaration declares a procedure or function. 
  10276.  
  10277.             Syntax
  10278.  
  10279.          2.
  10280.  
  10281.                       subprogram_declaration ::= subprogram_specification;
  10282.  
  10283.          3.
  10284.  
  10285.                       abstract_subprogram_declaration ::=
  10286.                         subprogram_specification is abstract;
  10287.  
  10288.          4.
  10289.  
  10290.                       subprogram_specification ::=
  10291.                          procedure defining_program_unit_name parameter_profile
  10292.                         | function defining_designator parameter_and_result_profile
  10293.  
  10294.          5.
  10295.  
  10296.                       designator ::= [parent_unit_name . ]identifier | operator_symbol
  10297.  
  10298.          6.
  10299.  
  10300.                       defining_designator ::=
  10301.                         defining_program_unit_name | defining_operator_symbol
  10302.  
  10303.          7.
  10304.  
  10305.                       defining_program_unit_name ::=
  10306.                         [parent_unit_name . ]defining_identifier
  10307.  
  10308.         a. The optional parent_unit_name is only allowed for library units (see 
  10309.            10.1.1). 
  10310.  
  10311.          1.
  10312.  
  10313.                       operator_symbol ::= string_literal
  10314.  
  10315.         a. The sequence of characters in an operator_symbol shall correspond to 
  10316.            an operator belonging to one of the six classes of operators defined 
  10317.            in clause 4.5 (spaces are not allowed and the case of letters is not 
  10318.            significant). 
  10319.  
  10320.          1.
  10321.  
  10322.                       defining_operator_symbol ::= operator_symbol
  10323.  
  10324.          2.
  10325.  
  10326.                       parameter_profile ::= [formal_part]
  10327.  
  10328.          3.
  10329.  
  10330.                       parameter_and_result_profile ::= [formal_part] return subtype_mark
  10331.  
  10332.          4.
  10333.  
  10334.                       formal_part ::=
  10335.                         (parameter_specification {; parameter_specification{)
  10336.  
  10337.          5.
  10338.  
  10339.                       parameter_specification ::=
  10340.                         defining_identifier_list : mode subtype_mark
  10341.                          [:= default_expression]
  10342.                        | defining_identifier_list : access_definition
  10343.                          [:= default_expression]
  10344.  
  10345.          6.
  10346.  
  10347.                       mode ::= [in] | in out | out
  10348.  
  10349.   Name Resolution Rules
  10350.  
  10351.    7. A formal parameter is an object directly visible within a subprogram_body 
  10352.       that represents the actual parameter passed to the subprogram in a call; 
  10353.       it is declared by a parameter_specification. For a formal parameter, the 
  10354.       expected type for its default_expression, if any, is that of the formal 
  10355.       parameter. 
  10356.  
  10357.             Legality Rules
  10358.  
  10359.    8. The parameter mode of a formal parameter conveys the direction of 
  10360.       information transfer with the actual parameter: in, in out, or out. Mode 
  10361.       in is the default, and is the mode of a parameter defined by an 
  10362.       access_definition. The formal parameters of a function, if any, shall 
  10363.       have the mode in. 
  10364.  
  10365.    9. A default_expression is only allowed in a parameter_specification for a 
  10366.       formal parameter of mode in. 
  10367.  
  10368.   10. A subprogram_declaration or a generic_subprogram_declaration requires a 
  10369.       completion: a body, a renaming_declaration, see 8.5, or a pragma Import, 
  10370.       see B.1. A completion is not allowed for an 
  10371.       abstract_subprogram_declaration. 
  10372.  
  10373.   11. A name that denotes a formal parameter is not allowed within the 
  10374.       formal_part in which it is declared, nor within the formal_part of a 
  10375.       corresponding body or accept_statement. 
  10376.  
  10377.             Static Semantics
  10378.  
  10379.   12. The profile of (a view of) a callable entity is either a 
  10380.       parameter_profile or parameter_and_result_profile; it embodies 
  10381.       information about the interface to that entity -- for example, the 
  10382.       profile includes information about parameters passed to the callable 
  10383.       entity. All callable entities have a profile -- enumeration literals, 
  10384.       other subprograms, and entries. An access-to-subprogram type has a 
  10385.       designated profile. Associated with a profile is a calling convention. A 
  10386.       subprogram_declaration declares a procedure or a function, as indicated 
  10387.       by the initial reserved word, with name and profile as given by its 
  10388.       specification. 
  10389.  
  10390.   13. The nominal subtype of a formal parameter is the subtype denoted by the 
  10391.       subtype_mark, or defined by the access_definition, in the 
  10392.       parameter_specification. 
  10393.  
  10394.   14. An access parameter is a formal in parameter specified by an 
  10395.       access_definition. An access parameter is of an anonymous general 
  10396.       access-to-variable type, see 3.10. Access parameters allow dispatching 
  10397.       calls to be controlled by access values. 
  10398.  
  10399.   15. The subtypes of a profile are: 
  10400.  
  10401.         a. For any non-access parameters, the nominal subtype of the parameter. 
  10402.  
  10403.         b. For any access parameters, the designated subtype of the parameter 
  10404.            type. 
  10405.  
  10406.         c. For any result, the result subtype. 
  10407.  
  10408.    1. The types of a profile are the types of those subtypes. 
  10409.  
  10410.    2. A subprogram declared by an abstract_subprogram_declaration is abstract; 
  10411.       a subprogram declared by a subprogram_declaration is not (see 3.9.3: 
  10412.       ``Abstract Types and Subprograms''). 
  10413.  
  10414.             Dynamic Semantics
  10415.  
  10416.    3. The elaboration of a subprogram_declaration or an 
  10417.       abstract_subprogram_declaration has no effect. 
  10418.  
  10419.       NOTES 
  10420.  
  10421.    4. (1) A parameter_specification with several identifiers is equivalent to a 
  10422.       sequence of single parameter_specifications, as explained in 3.3. 
  10423.  
  10424.    5. (2) Abstract subprograms do not have bodies, and cannot be used in a 
  10425.       nondispatching call, see 3.9.3: ``Abstract Types and Subprograms''. 
  10426.  
  10427.    6. (3) The evaluation of default_expressions is caused by certain calls, as 
  10428.       described in 6.4.1. They are not evaluated during the elaboration of the 
  10429.       subprogram declaration. 
  10430.  
  10431.    7. (4) Subprograms can be called recursively and can be called concurrently 
  10432.       from multiple tasks. 
  10433.  
  10434.             Examples
  10435.  
  10436.    8. Examples of subprogram declarations: 
  10437.  
  10438.          9.
  10439.  
  10440.                       procedure Traverse_Tree;
  10441.                       procedure Increment(X : in out Integer);
  10442.                       procedure Right_Indent(Margin : out Line_Size); --  see 3.5.4
  10443.                       procedure Switch(From, To : in out Link);    --  see 3.10.1
  10444.  
  10445.         10.
  10446.  
  10447.                       function Random return Probability;       --  see 3.5.7
  10448.  
  10449.         11.
  10450.  
  10451.                       function Min_Cell(X : Link) return Cell;     --  see 3.10.1
  10452.                       function Next_Frame(K : Positive) return Frame; --  see 3.10
  10453.                       function Dot_Product(Left, Right : Vector) return Real;
  10454.                       --  see 3.6
  10455.  
  10456.         12.
  10457.  
  10458.                       function "*"(Left, Right : Matrix) return Matrix;
  10459.                       --  see 3.6
  10460.  
  10461.   13. Examples of in parameters with default expressions: 
  10462.  
  10463.         14.
  10464.  
  10465.                       procedure Print_Header
  10466.                        (Pages  : in Natural;
  10467.                         Header : in Line   :=  (1 ┬╖┬╖ Line'Last => ' '); --  see 3.6
  10468.                         Center : in Boolean := True);
  10469.  
  10470.  
  10471. ΓòÉΓòÉΓòÉ 9.2. Formal Parameter Modes ΓòÉΓòÉΓòÉ
  10472.  
  10473.    1. A parameter_specification declares a formal parameter of mode in, in out, 
  10474.       or out. 
  10475.  
  10476.             Static Semantics
  10477.  
  10478.    2. A parameter is passed either by copy or by reference. When a parameter is 
  10479.       passed by copy, the formal parameter denotes a separate object from the 
  10480.       actual parameter, and any information transfer between the two occurs 
  10481.       only before and after executing the subprogram. When a parameter is 
  10482.       passed by reference, the formal parameter denotes (a view of) the object 
  10483.       denoted by the actual parameter; reads and updates of the formal 
  10484.       parameter directly reference the actual parameter object. 
  10485.  
  10486.    3. A type is a by-copy type if it is an elementary type, or if it is a 
  10487.       descendant of a private type whose full type is a by-copy type. A 
  10488.       parameter of a by-copy type is passed by copy. 
  10489.  
  10490.    4. A type is a by-reference type if it is a descendant of one of the 
  10491.       following: 
  10492.  
  10493.         a. a tagged type; 
  10494.  
  10495.         b. a task or protected type; 
  10496.  
  10497.         c. a nonprivate type with the reserved word limited in its declaration; 
  10498.  
  10499.         d. a composite type with a subcomponent of a by-reference type; 
  10500.  
  10501.         e. a private type whose full type is a by-reference type. 
  10502.  
  10503.    1. A parameter of a by-reference type is passed by reference. Each value of 
  10504.       a by-reference type has an associated object. For a parenthesized 
  10505.       expression, qualified_expression, or type_conversion, this object is the 
  10506.       one associated with the operand. 
  10507.  
  10508.    2. For parameters of other types, it is unspecified whether the parameter is 
  10509.       passed by copy or by reference. 
  10510.  
  10511.             Bounded (Run-Time) Errors
  10512.  
  10513.    3. If one name denotes a part of a formal parameter, and a second name 
  10514.       denotes a part of a distinct formal parameter or an object that is not 
  10515.       part of a formal parameter, then the two names are considered distinct 
  10516.       access paths. If an object is of a type for which the parameter passing 
  10517.       mechanism is not specified, then it is a bounded error to assign to the 
  10518.       object via one access path, and then read the value of the object via a 
  10519.       distinct access path, unless the first access path denotes a part of a 
  10520.       formal parameter that no longer exists at the point of the second access 
  10521.       (due to leaving the corresponding callable construct). The possible 
  10522.       consequences are that Program_Error is raised, or the newly assigned 
  10523.       value is read, or some old value of the object is read. 
  10524.  
  10525.       NOTES 
  10526.  
  10527.    4. (5) A formal parameter of mode in is a constant view, see 3.3, it cannot 
  10528.       be updated within the subprogram_body. 
  10529.  
  10530.  
  10531. ΓòÉΓòÉΓòÉ 9.3. Subprogram Bodies ΓòÉΓòÉΓòÉ
  10532.  
  10533.    1. A subprogram_body specifies the execution of a subprogram. 
  10534.  
  10535.             Syntax
  10536.  
  10537.          2.
  10538.  
  10539.                       subprogram_body ::=
  10540.                         subprogram_specification is
  10541.                          declarative_part
  10542.                         begin
  10543.                          handled_sequence_of_statements
  10544.                         end [designator];
  10545.  
  10546.         a. If a designator appears at the end of a subprogram_body, it shall 
  10547.            repeat the defining_designator of the subprogram_specification. 
  10548.  
  10549.   Legality Rules
  10550.  
  10551.    1. In contrast to other bodies, a subprogram_body need not be the completion 
  10552.       of a previous declaration, in which case the body declares the 
  10553.       subprogram. If the body is a completion, it shall be the completion of a 
  10554.       subprogram_declaration or generic_subprogram_declaration. The profile of 
  10555.       a subprogram_body that completes a declaration shall conform fully to 
  10556.       that of the declaration. 
  10557.  
  10558.             Static Semantics
  10559.  
  10560.    2. A subprogram_body is considered a declaration. It can either complete a 
  10561.       previous declaration, or itself be the initial declaration of the 
  10562.       subprogram. 
  10563.  
  10564.             Dynamic Semantics
  10565.  
  10566.    3. The elaboration of a non-generic subprogram_body has no other effect than 
  10567.       to establish that the subprogram can from then on be called without 
  10568.       failing the Elaboration_Check. 
  10569.  
  10570.    4. The execution of a subprogram_body is invoked by a subprogram call. For 
  10571.       this execution the declarative_part is elaborated, and the 
  10572.       handled_sequence_of_statements is then executed. 
  10573.  
  10574.             Examples
  10575.  
  10576.    5. Example of procedure body: 
  10577.  
  10578.          6.
  10579.  
  10580.                       procedure Push(E : in Element_Type; S : in out Stack) is
  10581.                       begin
  10582.                         if S.Index = S.Size then
  10583.                          raise Stack_Overflow;
  10584.                         else
  10585.                          S.Index := S.Index + 1;
  10586.                          S.Space(S.Index) := E;
  10587.                         end if;
  10588.                       end Push;
  10589.  
  10590.    7. Example of a function body: 
  10591.  
  10592.          8.
  10593.  
  10594.                       function Dot_Product(Left, Right : Vector) return Real is
  10595.                         Sum : Real := 0.0;
  10596.                       begin
  10597.                         Check(Left'First = Right'First and Left'Last = Right'Last);
  10598.                         for J in Left'Range loop
  10599.                          Sum := Sum + Left(J)*Right(J);
  10600.                         end loop;
  10601.                         return Sum;
  10602.                       end Dot_Product;
  10603.  
  10604.  6.3.1                         Conformance Rules 
  10605.  6.3.2                         Inline Expansion of Subprograms 
  10606.  
  10607.  
  10608. ΓòÉΓòÉΓòÉ 9.3.1. Conformance Rules ΓòÉΓòÉΓòÉ
  10609.  
  10610.    1. When subprogram profiles are given in more than one place, they are 
  10611.       required to conform in one of four ways: type conformance, mode 
  10612.       conformance, subtype conformance, or full conformance. 
  10613.  
  10614.             Static Semantics
  10615.  
  10616.    2. As explained in B.1: ``Interfacing Pragmas'', a convention can be 
  10617.       specified for an entity. For a callable entity or access-to-subprogram 
  10618.       type, the convention is called the calling convention. The following 
  10619.       conventions are defined by the language: 
  10620.  
  10621.         a. The default calling convention for any subprogram not listed below 
  10622.            is Ada. A pragma Convention, Import, or Export may be used to 
  10623.            override the default calling convention, see B.1. 
  10624.  
  10625.         b. The Intrinsic calling convention represents subprograms that are 
  10626.            ``built in'' to the compiler. The default calling convention is 
  10627.            Intrinsic for the following: 
  10628.  
  10629.                   a. an enumeration literal; 
  10630.  
  10631.                   b. a "/=" operator declared implicitly due to the declaration 
  10632.                      of "=" (see 6.6); 
  10633.  
  10634.                   c. any other implicitly declared subprogram unless it is a 
  10635.                      dispatching operation of a tagged type; 
  10636.  
  10637.                   d. an inherited subprogram of a generic formal tagged type 
  10638.                      with unknown discriminants; 
  10639.  
  10640.                   e. an attribute that is a subprogram; 
  10641.  
  10642.                   f. a subprogram declared immediately within a protected_body. 
  10643.  
  10644.              1. The Access attribute is not allowed for Intrinsic subprograms. 
  10645.  
  10646.         a. The default calling convention is protected for a protected 
  10647.            subprogram, and for an access-to-subprogram type with the reserved 
  10648.            word protected in its definition. 
  10649.  
  10650.         b. The default calling convention is entry for an entry. 
  10651.  
  10652.    1. Of these four conventions, only Ada and Intrinsic are allowed as a 
  10653.       convention_identifier in a pragma Convention, Import, or Export. 
  10654.  
  10655.    2. Two profiles are type conformant if they have the same number of 
  10656.       parameters, and both have a result if either does, and corresponding 
  10657.       parameter and result types are the same, or, for access parameters, 
  10658.       corresponding designated types are the same. 
  10659.  
  10660.    3. Two profiles are mode conformant if they are type-conformant, and 
  10661.       corresponding parameters have identical modes, and, for access 
  10662.       parameters, the designated subtypes statically match. 
  10663.  
  10664.    4. Two profiles are subtype conformant if they are mode-conformant, 
  10665.       corresponding subtypes of the profile statically match, and the 
  10666.       associated calling conventions are the same. The profile of a generic 
  10667.       formal subprogram is not subtype-conformant with any other profile. 
  10668.  
  10669.    5. Two profiles are fully conformant if they are subtype-conformant, and 
  10670.       corresponding parameters have the same names and have default_expressions 
  10671.       that are fully conformant with one another. 
  10672.  
  10673.    6. Two expressions are fully conformant if, after replacing each use of an 
  10674.       operator with the equivalent function_call: 
  10675.  
  10676.         a. each constituent construct of one corresponds to an instance of the 
  10677.            same syntactic category in the other, except that an expanded name 
  10678.            may correspond to a direct_name (or character_literal) or to a 
  10679.            different expanded name in the other; and 
  10680.  
  10681.         b. each direct_name, character_literal, and selector_name that is not 
  10682.            part of the prefix of an expanded name in one denotes the same 
  10683.            declaration as the corresponding direct_name, character_literal, or 
  10684.            selector_name in the other; and 
  10685.  
  10686.         c. each primary that is a literal in one has the same value as the 
  10687.            corresponding literal in the other. 
  10688.  
  10689.    1. Two known_discriminant_parts are fully conformant if they have the same 
  10690.       number of discriminants, and discriminants in the same positions have the 
  10691.       same names, statically matching subtypes, and default_expressions that 
  10692.       are fully conformant with one another. 
  10693.  
  10694.    2. Two discrete_subtype_definitions are fully conformant if they are both 
  10695.       subtype_indications or are both ranges, the subtype_marks (if any) denote 
  10696.       the same subtype, and the corresponding simple_expressions of the ranges 
  10697.       (if any) fully conform. 
  10698.  
  10699.             Implementation Permissions
  10700.  
  10701.    3. An implementation may declare an operator declared in a language-defined 
  10702.       library unit to be intrinsic. 
  10703.  
  10704.  
  10705. ΓòÉΓòÉΓòÉ 9.3.2. Inline Expansion of Subprograms ΓòÉΓòÉΓòÉ
  10706.  
  10707.    1. Subprograms may be expanded in line at the call site. 
  10708.  
  10709.             Syntax
  10710.  
  10711.    2. The form of a pragma Inline, which is a program unit pragma (see 10.1.5) 
  10712.       is as follows: 
  10713.  
  10714.          3.
  10715.  
  10716.                       pragma Inline(name {, name{);
  10717.  
  10718.   Legality Rules
  10719.  
  10720.    4. The pragma shall apply to one or more callable entities or generic 
  10721.       subprograms. 
  10722.  
  10723.             Static Semantics
  10724.  
  10725.    5. If a pragma Inline applies to a callable entity, this indicates that 
  10726.       inline expansion is desired for all calls to that entity. If a pragma 
  10727.       Inline applies to a generic subprogram, this indicates that inline 
  10728.       expansion is desired for all calls to all instances of that generic 
  10729.       subprogram. 
  10730.  
  10731.             Implementation Permissions
  10732.  
  10733.    6. For each call, an implementation is free to follow or to ignore the 
  10734.       recommendation expressed by the pragma. 
  10735.  
  10736.       NOTES 
  10737.  
  10738.    7. (6) The name in a pragma Inline can denote more than one entity in the 
  10739.       case of overloading. Such a pragma applies to all of the denoted 
  10740.       entities. 
  10741.  
  10742.  
  10743. ΓòÉΓòÉΓòÉ 9.4. Subprogram Calls ΓòÉΓòÉΓòÉ
  10744.  
  10745.    1. A subprogram call is either a procedure_call_statement or a 
  10746.       function_call; it invokes the execution of the subprogram_body. The call 
  10747.       specifies the association of the actual parameters, if any, with formal 
  10748.       parameters of the subprogram. 
  10749.  
  10750.             Syntax
  10751.  
  10752.          2.
  10753.  
  10754.                       procedure_call_statement ::=
  10755.                          procedure_name;
  10756.                         | procedure_prefix actual_parameter_part;
  10757.  
  10758.          3.
  10759.  
  10760.                       function_call ::=
  10761.                          function_name
  10762.                         | function_prefix actual_parameter_part
  10763.  
  10764.          4.
  10765.  
  10766.                       actual_parameter_part ::=
  10767.                         (parameter_association {, parameter_association{)
  10768.  
  10769.          5.
  10770.  
  10771.                       parameter_association ::=
  10772.                         [formal_parameter_selector_name =>] explicit_actual_parameter
  10773.  
  10774.          6.
  10775.  
  10776.                       explicit_actual_parameter ::= expression | variable_name
  10777.  
  10778.         a. A parameter_association is named or positional according to whether 
  10779.            or not the formal_parameter_selector_name is specified. Any 
  10780.            positional associations shall precede any named associations. Named 
  10781.            associations are not allowed if the prefix in a subprogram call is 
  10782.            an attribute_reference. 
  10783.  
  10784.   Name Resolution Rules
  10785.  
  10786.    1. The name or prefix given in a procedure_call_statement shall resolve to 
  10787.       denote a callable entity that is a procedure, or an entry renamed as 
  10788.       (viewed as) a procedure. The name or prefix given in a function_call 
  10789.       shall resolve to denote a callable entity that is a function. When there 
  10790.       is an actual_parameter_part, the prefix can be an implicit_dereference of 
  10791.       an access-to-subprogram value. 
  10792.  
  10793.    2. A subprogram call shall contain at most one association for each formal 
  10794.       parameter. Each formal parameter without an association shall have a 
  10795.       default_expression (in the profile of the view denoted by the name or 
  10796.       prefix). This rule is an overloading rule, see 8.6. 
  10797.  
  10798.             Dynamic Semantics
  10799.  
  10800.    3. For the execution of a subprogram call, the name or prefix of the call is 
  10801.       evaluated, and each parameter_association is evaluated, see 6.4.1. If a 
  10802.       default_expression is used, an implicit parameter_association is assumed 
  10803.       for this rule. These evaluations are done in an arbitrary order. The 
  10804.       subprogram_body is then executed. Finally, if the subprogram completes 
  10805.       normally, then after it is left, any necessary assigning back of formal 
  10806.       to actual parameters occurs, see 6.4.1. 
  10807.  
  10808.    4. The exception Program_Error is raised at the point of a function_call if 
  10809.       the function completes normally without executing a return_statement. 
  10810.  
  10811.    5. A function_call denotes a constant, as defined in 6.5, the nominal 
  10812.       subtype of the constant is given by the result subtype of the function. 
  10813.  
  10814.             Examples
  10815.  
  10816.    6. Examples of procedure calls: 
  10817.  
  10818.          7.
  10819.  
  10820.                       Traverse_Tree;          --  see 6.1
  10821.                       Print_Header(128, Title, True);  --  see 6.1
  10822.  
  10823.          8.
  10824.  
  10825.                       Switch(From => X, To => Next);
  10826.                       --  see 6.1.
  10827.                       Print_Header(128, Header => Title, Center => True);
  10828.                       --  see 6.1.
  10829.                       Print_Header(Header => Title, Center => True, Pages => 128);
  10830.                       --  see 6.1.
  10831.  
  10832.    9. Examples of function calls: 
  10833.  
  10834.         10.
  10835.  
  10836.                       Dot_Product(U, V)  --  see 6.1, and 6.3.
  10837.                       Clock        --  see 9.6.
  10838.                       F.all
  10839.                       --  presuming F is of an access-to-subprogram type
  10840.                       --  see 3.10.
  10841.  
  10842.   11. Examples of procedures with default expressions: 
  10843.  
  10844.         12.
  10845.  
  10846.                       procedure Activate(Process : in Process_Name;
  10847.                                 After  : in Process_Name := No_Process;
  10848.                                 Wait   : in Duration := 0.0;
  10849.                                 Prior  : in Boolean := False);
  10850.  
  10851.         13.
  10852.  
  10853.                       procedure Pair(Left, Right : in Person_Name := new Person);
  10854.                       --  see 3.10.1.
  10855.  
  10856.   14. Examples of their calls: 
  10857.  
  10858.         15.
  10859.  
  10860.                       Activate(X);
  10861.                       Activate(X, After => Y);
  10862.                       Activate(X, Wait => 60.0, Prior => True);
  10863.                       Activate(X, Y, 10.0, False);
  10864.  
  10865.         16.
  10866.  
  10867.                       Pair;
  10868.                       Pair(Left => new Person, Right => new Person);
  10869.  
  10870.  NOTES 
  10871.  
  10872.   17. (7) If a default_expression is used for two or more parameters in a 
  10873.       multiple parameter_specification, the default_expression is evaluated 
  10874.       once for each omitted parameter. Hence in the above examples, the two 
  10875.       calls of Pair are equivalent. 
  10876.  
  10877.             Examples
  10878.  
  10879.   18. Examples of overloaded subprograms: 
  10880.  
  10881.         19.
  10882.  
  10883.                       procedure Put(X : in Integer);
  10884.                       procedure Put(X : in String);
  10885.  
  10886.         20.
  10887.  
  10888.                       procedure Set(Tint  : in Color);
  10889.                       procedure Set(Signal : in Light);
  10890.  
  10891.   21. Examples of their calls: 
  10892.  
  10893.         22.
  10894.  
  10895.                       Put(28);
  10896.                       Put("no possible ambiguity here");
  10897.  
  10898.         23.
  10899.  
  10900.                       Set(Tint  => Red);
  10901.                       Set(Signal => Red);
  10902.                       Set(Color'(Red));
  10903.  
  10904.         24.
  10905.  
  10906.                       --  Set(Red) would be ambiguous since Red may
  10907.                       --  denote a value either of type Color or of type Light
  10908.  
  10909.  6.4.1                         Parameter Associations 
  10910.  
  10911.  
  10912. ΓòÉΓòÉΓòÉ 9.4.1. Parameter Associations ΓòÉΓòÉΓòÉ
  10913.  
  10914.    1. A parameter association defines the association between an actual 
  10915.       parameter and a formal parameter. 
  10916.  
  10917.             Name Resolution Rules
  10918.  
  10919.    2. The formal_parameter_selector_name of a parameter_association shall 
  10920.       resolve to denote a parameter_specification of the view being called. 
  10921.  
  10922.    3. The actual parameter is either the explicit_actual_parameter given in a 
  10923.       parameter_association for a given formal parameter, or the corresponding 
  10924.       default_expression if no parameter_association is given for the formal 
  10925.       parameter. The expected type for an actual parameter is the type of the 
  10926.       corresponding formal parameter. 
  10927.  
  10928.    4. If the mode is in, the actual is interpreted as an expression; otherwise, 
  10929.       the actual is interpreted only as a name, if possible. 
  10930.  
  10931.             Legality Rules
  10932.  
  10933.    5. If the mode is in out or out, the actual shall be a name that denotes a 
  10934.       variable. 
  10935.  
  10936.    6. The type of the actual parameter associated with an access parameter 
  10937.       shall be convertible, see 4.6, to its anonymous access type. 
  10938.  
  10939.             Dynamic Semantics
  10940.  
  10941.    7. For the evaluation of a parameter_association: 
  10942.  
  10943.         a. The actual parameter is first evaluated. 
  10944.  
  10945.         b. For an access parameter, the access_definition is elaborated, which 
  10946.            creates the anonymous access type. 
  10947.  
  10948.         c. For a parameter (of any mode) that is passed by reference, see 6.2, 
  10949.            a view conversion of the actual parameter to the nominal subtype of 
  10950.            the formal parameter is evaluated, and the formal parameter denotes 
  10951.            that conversion. 
  10952.  
  10953.         d. For an in or in out parameter that is passed by copy, see 6.2, the 
  10954.            formal parameter object is created, and the value of the actual 
  10955.            parameter is converted to the nominal subtype of the formal 
  10956.            parameter and assigned to the formal. 
  10957.  
  10958.         e. For an out parameter that is passed by copy, the formal parameter 
  10959.            object is created, and: 
  10960.  
  10961.              1. For an access type, the formal parameter is initialized from 
  10962.                 the value of the actual, without a constraint check; 
  10963.  
  10964.              2. For a composite type with discriminants or that has implicit 
  10965.                 initial values for any subcomponents, see 3.3.1, the behavior 
  10966.                 is as for an in out parameter passed by copy. 
  10967.  
  10968.              3. For any other type, the formal parameter is uninitialized. If 
  10969.                 composite, a view conversion of the actual parameter to the 
  10970.                 nominal subtype of the formal is evaluated (which might raise 
  10971.                 Constraint_Error), and the actual subtype of the formal is that 
  10972.                 of the view conversion. If elementary, the actual subtype of 
  10973.                 the formal is given by its nominal subtype. 
  10974.  
  10975.    1. A formal parameter of mode in out or out with discriminants is 
  10976.       constrained if either its nominal subtype or the actual parameter is 
  10977.       constrained. 
  10978.  
  10979.    2. After normal completion and leaving of a subprogram, for each in out or 
  10980.       out parameter that is passed by copy, the value of the formal parameter 
  10981.       is converted to the subtype of the variable given as the actual parameter 
  10982.       and assigned to it. These conversions and assignments occur in an 
  10983.       arbitrary order. 
  10984.  
  10985.  
  10986. ΓòÉΓòÉΓòÉ 9.5. Return Statements ΓòÉΓòÉΓòÉ
  10987.  
  10988.    1. A return_statement is used to complete the execution of the innermost 
  10989.       enclosing subprogram_body, entry_body, or accept_statement. 
  10990.  
  10991.             Syntax
  10992.  
  10993.          2.
  10994.  
  10995.                       return_statement ::= return [expression];
  10996.  
  10997.   Name Resolution Rules
  10998.  
  10999.    3. The expression, if any, of a return_statement is called the return 
  11000.       expression. The result subtype of a function is the subtype denoted by 
  11001.       the subtype_mark after the reserved word return in the profile of the 
  11002.       function. The expected type for a return expression is the result type of 
  11003.       the corresponding function. 
  11004.  
  11005.             Legality Rules
  11006.  
  11007.    4. A return_statement shall be within a callable construct, and it applies 
  11008.       to the innermost one. A return_statement shall not be within a body that 
  11009.       is within the construct to which the return_statement applies. 
  11010.  
  11011.    5. A function body shall contain at least one return_statement that applies 
  11012.       to the function body, unless the function contains code_statements. A 
  11013.       return_statement shall include a return expression if and only if it 
  11014.       applies to a function body. 
  11015.  
  11016.             Dynamic Semantics
  11017.  
  11018.    6. For the execution of a return_statement, the expression (if any) is first 
  11019.       evaluated and converted to the result subtype. 
  11020.  
  11021.    7. If the result type is class-wide, then the tag of the result is the tag 
  11022.       of the value of the expression. 
  11023.  
  11024.    8. If the result type is a specific tagged type: 
  11025.  
  11026.         a. If it is limited, then a check is made that the tag of the value of 
  11027.            the return expression identifies the result type. Constraint_Error 
  11028.            is raised if this check fails. 
  11029.  
  11030.         b. If it is nonlimited, then the tag of the result is that of the 
  11031.            result type. 
  11032.  
  11033.    1. A type is a return-by-reference type if it is a descendant of one of the 
  11034.       following: 
  11035.  
  11036.         a. a tagged limited type; 
  11037.  
  11038.         b. a task or protected type; 
  11039.  
  11040.         c. a nonprivate type with the reserved word limited in its declaration; 
  11041.  
  11042.         d. a composite type with a subcomponent of a return-by-reference type; 
  11043.  
  11044.         e. a private type whose full type is a return-by-reference type. 
  11045.  
  11046.    1. If the result type is a return-by-reference type, then a check is made 
  11047.       that the return expression is one of the following: 
  11048.  
  11049.         a. a name that denotes an object view whose accessibility level is not 
  11050.            deeper than that of the master that elaborated the function body; or 
  11051.  
  11052.         b. a parenthesized expression or qualified_expression whose operand is 
  11053.            one of these kinds of expressions. 
  11054.  
  11055.    1. The exception Program_Error is raised if this check fails. 
  11056.  
  11057.    2. For a function with a return-by-reference result type the result is 
  11058.       returned by reference; that is, the function call denotes a constant view 
  11059.       of the object associated with the value of the return expression. For any 
  11060.       other function, the result is returned by copy; that is, the converted 
  11061.       value is assigned into an anonymous constant created at the point of the 
  11062.       return_statement, and the function call denotes that object. 
  11063.  
  11064.    3. Finally, a transfer of control is performed which completes the execution 
  11065.       of the callable construct to which the return_statement applies, and 
  11066.       returns to the caller. 
  11067.  
  11068.             Examples
  11069.  
  11070.    4. Examples of return statements: 
  11071.  
  11072.          5.
  11073.  
  11074.                       return;
  11075.                       -- in a procedure body, entry_body, or accept_statement
  11076.                       return Key_Value(Last_Index);
  11077.                       -- in a function body
  11078.  
  11079.  
  11080. ΓòÉΓòÉΓòÉ 9.6. Overloading of Operators ΓòÉΓòÉΓòÉ
  11081.  
  11082.    1. An operator is a function whose designator is an operator_symbol. 
  11083.       Operators, like other functions, may be overloaded. 
  11084.  
  11085.             Name Resolution Rules
  11086.  
  11087.    2. Each use of a unary or binary operator is equivalent to a function_call 
  11088.       with function_prefix being the corresponding operator_symbol, and with 
  11089.       (respectively) one or two positional actual parameters being the 
  11090.       operand(s) of the operator (in order). 
  11091.  
  11092.             Legality Rules
  11093.  
  11094.    3. The subprogram_specification of a unary or binary operator shall have one 
  11095.       or two parameters, respectively. A generic function instantiation whose 
  11096.       designator is an operator_symbol is only allowed if the specification of 
  11097.       the generic function has the corresponding number of parameters. 
  11098.  
  11099.    4. Default_expressions are not allowed for the parameters of an operator 
  11100.       (whether the operator is declared with an explicit 
  11101.       subprogram_specification or by a generic_instantiation). 
  11102.  
  11103.    5. An explicit declaration of "/=" shall not have a result type of the 
  11104.       predefined type Boolean. 
  11105.  
  11106.             Static Semantics
  11107.  
  11108.    6. A declaration of "=" whose result type is Boolean implicitly declares a 
  11109.       declaration of "/=" that gives the complementary result. 
  11110.  
  11111.       NOTES 
  11112.  
  11113.    7. (8) The operators "+" and "-" are both unary and binary operators, and 
  11114.       hence may be overloaded with both one- and two-parameter functions. 
  11115.  
  11116.             Examples
  11117.  
  11118.    8. Examples of user-defined operators: 
  11119.  
  11120.          9.
  11121.  
  11122.                       function "+" (Left, Right : Matrix) return Matrix;
  11123.                       function "+" (Left, Right : Vector) return Vector;
  11124.                       --  assuming that A, B, and C are of the type Vector
  11125.                       --  the following two statements are equivalent:
  11126.                       A := B + C;
  11127.                       A := "+"(B, C);
  11128.  
  11129.  
  11130. ΓòÉΓòÉΓòÉ 10. Packages ΓòÉΓòÉΓòÉ
  11131.  
  11132.    1. Packages are program units that allow the specification of groups of 
  11133.       logically related entities. Typically, a package contains the declaration 
  11134.       of a type (often a private type or private extension) along with the 
  11135.       declarations of primitive subprograms of the type, which can be called 
  11136.       from outside the package, while their inner workings remain hidden from 
  11137.       outside users. 
  11138.  
  11139.  7.1                           Package Specifications and Declarations 
  11140.  7.2                           Package Bodies 
  11141.  7.3                           Private Types and Private Extensions 
  11142.  7.4                           Deferred Constants 
  11143.  7.5                           Limited Types 
  11144.  7.6                           User-Defined Assignment and Finalization --- The 
  11145.                                Detailed Node Listing --- 
  11146.  7.1                           Package Specifications and Declarations 
  11147.  7.2                           Package Bodies 
  11148.  7.3                           Private Types and Private Extensions 
  11149.  7.3.1                         Private Operations 
  11150.  7.4                           Deferred Constants 
  11151.  7.5                           Limited Types 
  11152.  7.6                           User-Defined Assignment and Finalization 
  11153.  7.6.1                         Completion and Finalization 
  11154.  
  11155.  
  11156. ΓòÉΓòÉΓòÉ 10.1. Package Specifications and Declarations ΓòÉΓòÉΓòÉ
  11157.  
  11158.    1. A package is generally provided in two parts: a package_specification and 
  11159.       a package_body. Every package has a package_specification, but not all 
  11160.       packages have a package_body. 
  11161.  
  11162.             Syntax
  11163.  
  11164.          2.
  11165.  
  11166.                       package_declaration ::= package_specification;
  11167.  
  11168.          3.
  11169.  
  11170.                       package_specification ::=
  11171.                         package defining_program_unit_name is
  11172.                          {basic_declarative_item}
  11173.                         [private
  11174.                          {basic_declarative_item}]
  11175.                         end [[parent_unit_name.]identifier]
  11176.  
  11177.         a. If an identifier or parent_unit_name.identifier appears at the end 
  11178.            of a package_specification, then this sequence of lexical elements 
  11179.            shall repeat the defining_program_unit_name. 
  11180.  
  11181.   Legality Rules
  11182.  
  11183.    1. A package_declaration or generic_package_declaration requires a 
  11184.       completion (a body) if it contains any declarative_item that requires a 
  11185.       completion, but whose completion is not in its package_specification. 
  11186.  
  11187.             Static Semantics
  11188.  
  11189.    2. The first list of declarative_items of a package_specification of a 
  11190.       package other than a generic formal package is called the visible part of 
  11191.       the package. The optional list of declarative_items after the reserved 
  11192.       word private (of any package_specification) is called the private part of 
  11193.       the package. If the reserved word private does not appear, the package 
  11194.       has an implicit empty private part. 
  11195.  
  11196.    3. An entity declared in the private part of a package is visible only 
  11197.       within the declarative region of the package itself (including any child 
  11198.       units --  see 10.1.1. In contrast, expanded names denoting entities 
  11199.       declared in the visible part can be used even outside the package; 
  11200.       furthermore, direct visibility of such entities can be achieved by means 
  11201.       of use_clauses, see 4.1.3, and 8.4. 
  11202.  
  11203.             Dynamic Semantics
  11204.  
  11205.    4. The elaboration of a package_declaration consists of the elaboration of 
  11206.       its basic_declarative_items in the given order. 
  11207.  
  11208.       NOTES 
  11209.  
  11210.    5. (1) The visible part of a package contains all the information that 
  11211.       another program unit is able to know about the package. 
  11212.  
  11213.    6. (2) If a declaration occurs immediately within the specification of a 
  11214.       package, and the declaration has a corresponding completion that is a 
  11215.       body, then that body has to occur immediately within the body of the 
  11216.       package. 
  11217.  
  11218.             Examples
  11219.  
  11220.    7. Example of a package declaration: 
  11221.  
  11222.          8.
  11223.  
  11224.                       package Rational_Numbers is
  11225.  
  11226.          9.
  11227.  
  11228.                       type Rational is
  11229.                         record
  11230.                          Numerator  : Integer;
  11231.                          Denominator : Positive;
  11232.                         end record;
  11233.  
  11234.         10.
  11235.  
  11236.                         function "="(X,Y : Rational) return Boolean;
  11237.  
  11238.         11.
  11239.  
  11240.                         function "/"  (X,Y : Integer)  return Rational;
  11241.                         --  to construct a rational number
  11242.  
  11243.         12.
  11244.  
  11245.                         function "+"  (X,Y : Rational) return Rational;
  11246.                         function "-"  (X,Y : Rational) return Rational;
  11247.                         function "*"  (X,Y : Rational) return Rational;
  11248.                         function "/"  (X,Y : Rational) return Rational;
  11249.                       end Rational_Numbers;
  11250.  
  11251.   13. There are also many examples of package declarations in the predefined 
  11252.       language environment, see A: ``Annex A''. 
  11253.  
  11254.  
  11255. ΓòÉΓòÉΓòÉ 10.2. Package Bodies ΓòÉΓòÉΓòÉ
  11256.  
  11257.    1. In contrast to the entities declared in the visible part of a package, 
  11258.       the entities declared in the package_body are visible only within the 
  11259.       package_body itself. As a consequence, a package with a package_body can 
  11260.       be used for the construction of a group of related subprograms in which 
  11261.       the logical operations available to clients are clearly isolated from the 
  11262.       internal entities. 
  11263.  
  11264.             Syntax
  11265.  
  11266.          2.
  11267.  
  11268.                       package_body ::=
  11269.                         package body defining_program_unit_name is
  11270.                          declarative_part
  11271.                         [begin
  11272.                          handled_sequence_of_statements]
  11273.                         end [[parent_unit_name.]identifier];
  11274.  
  11275.         a. If an identifier or parent_unit_name.identifier appears at the end 
  11276.            of a package_body, then this sequence of lexical elements shall 
  11277.            repeat the defining_program_unit_name. 
  11278.  
  11279.   Legality Rules
  11280.  
  11281.    1. A package_body shall be the completion of a previous package_declaration 
  11282.       or generic_package_declaration. A library package_declaration or library 
  11283.       generic_package_declaration shall not have a body unless it requires a 
  11284.       body; pragma Elaborate_Body can be used to require a 
  11285.       library_unit_declaration to have a body, see 10.2.1, if it would not 
  11286.       otherwise require one. 
  11287.  
  11288.             Static Semantics
  11289.  
  11290.    2. In any package_body without statements there is an implicit 
  11291.       null_statement. For any package_declaration without an explicit 
  11292.       completion, there is an implicit package_body containing a single 
  11293.       null_statement. For a noninstance, nonlibrary package, this body occurs 
  11294.       at the end of the declarative_part of the innermost enclosing program 
  11295.       unit or block_statement; if there are several such packages, the order of 
  11296.       the implicit package_bodies is unspecified. (For an instance, the 
  11297.       implicit package_body occurs at the place of the instantiation (see 
  11298.       12.3). For a library package, the place is partially determined by the 
  11299.       elaboration dependences, see 10: ``Section 10''. 
  11300.  
  11301.             Dynamic Semantics
  11302.  
  11303.    3. For the elaboration of a nongeneric package_body, its declarative_part is 
  11304.       first elaborated, and its handled_sequence_of_statements is then 
  11305.       executed. 
  11306.  
  11307.       NOTES 
  11308.  
  11309.    4. (3) A variable declared in the body of a package is only visible within 
  11310.       this body and, consequently, its value can only be changed within the 
  11311.       package_body. In the absence of local tasks, the value of such a variable 
  11312.       remains unchanged between calls issued from outside the package to 
  11313.       subprograms declared in the visible part. The properties of such a 
  11314.       variable are similar to those of a ``static'' variable of C. 
  11315.  
  11316.    5. (4) The elaboration of the body of a subprogram explicitly declared in 
  11317.       the visible part of a package is caused by the elaboration of the body of 
  11318.       the package. Hence a call of such a subprogram by an outside program unit 
  11319.       raises the exception Program_Error if the call takes place before the 
  11320.       elaboration of the package_body, see 3.11. 
  11321.  
  11322.             Examples
  11323.  
  11324.    6. Example of a package body, see 7.1 
  11325.  
  11326.          7.
  11327.  
  11328.                       package body Rational_Numbers is
  11329.  
  11330.          8.
  11331.  
  11332.                         procedure Same_Denominator (X,Y : in out Rational) is
  11333.                         begin
  11334.                          --  reduces X and Y to the same denominator:
  11335.                          ┬╖┬╖┬╖
  11336.                         end Same_Denominator;
  11337.  
  11338.          9.
  11339.  
  11340.                         function "="(X,Y : Rational) return Boolean is
  11341.                          U : Rational := X;
  11342.                          V : Rational := Y;
  11343.                         begin
  11344.                          Same_Denominator (U,V);
  11345.                          return U.Numerator = V.Numerator;
  11346.                         end "=";
  11347.  
  11348.         10.
  11349.  
  11350.                         function "/" (X,Y : Integer) return Rational is
  11351.                         begin
  11352.                          if Y > 0 then
  11353.                            return (Numerator => X,  Denominator => Y);
  11354.                          else
  11355.                            return (Numerator => -X, Denominator => -Y);
  11356.                          end if;
  11357.                         end "/";
  11358.  
  11359.         11.
  11360.  
  11361.                         function "+" (X,Y : Rational) return Rational is ┬╖┬╖┬╖  end "+";
  11362.                         function "-" (X,Y : Rational) return Rational is ┬╖┬╖┬╖  end "-";
  11363.                         function "*" (X,Y : Rational) return Rational is ┬╖┬╖┬╖  end "*";
  11364.                         function "/" (X,Y : Rational) return Rational is ┬╖┬╖┬╖  end "/";
  11365.  
  11366.         12.
  11367.  
  11368.                       end Rational_Numbers;
  11369.  
  11370.  
  11371. ΓòÉΓòÉΓòÉ 10.3. Private Types and Private Extensions ΓòÉΓòÉΓòÉ
  11372.  
  11373.    1. The declaration (in the visible part of a package) of a type as a private 
  11374.       type or private extension serves to separate the characteristics that can 
  11375.       be used directly by outside program units (that is, the logical 
  11376.       properties) from other characteristics whose direct use is confined to 
  11377.       the package (the details of the definition of the type itself). See 
  11378.       3.9.1, for an overview of type extensions. 
  11379.  
  11380.             Syntax
  11381.  
  11382.          2.
  11383.  
  11384.                       private_type_declaration ::=
  11385.                         type defining_identifier [discriminant_part] is
  11386.                          [[abstract] tagged] [limited] private;
  11387.  
  11388.          3.
  11389.  
  11390.                       private_extension_declaration ::=
  11391.                         type defining_identifier [discriminant_part] is
  11392.                          [abstract] new ancestor_subtype_indication with private;
  11393.  
  11394.   Legality Rules
  11395.  
  11396.    4. A private_type_declaration or private_extension_declaration declares a 
  11397.       partial view of the type; such a declaration is allowed only as a 
  11398.       declarative_item of the visible part of a package, and it requires a 
  11399.       completion, which shall be a full_type_declaration that occurs as a 
  11400.       declarative_item of the private part of the package. The view of the type 
  11401.       declared by the full_type_declaration is called the full view. A generic 
  11402.       formal private type or a generic formal private extension is also a 
  11403.       partial view. 
  11404.  
  11405.    5. A type shall be completely defined before it is frozen, see 3.11.1, and 
  11406.       13.14. Thus, neither the declaration of a variable of a partial view of a 
  11407.       type, nor the creation by an allocator of an object of the partial view 
  11408.       are allowed before the full declaration of the type. Similarly, before 
  11409.       the full declaration, the name of the partial view cannot be used in a 
  11410.       generic_instantiation or in a representation item. 
  11411.  
  11412.    6. A private type is limited if its declaration includes the reserved word 
  11413.       limited; a private extension is limited if its ancestor type is limited. 
  11414.       If the partial view is nonlimited, then the full view shall be 
  11415.       nonlimited. If a tagged partial view is limited, then the full view shall 
  11416.       be limited. On the other hand, if an untagged partial view is limited, 
  11417.       the full view may be limited or nonlimited. 
  11418.  
  11419.    7. If the partial view is tagged, then the full view shall be tagged. On the 
  11420.       other hand, if the partial view is untagged, then the full view may be 
  11421.       tagged or untagged. In the case where the partial view is untagged and 
  11422.       the full view is tagged, no derivatives of the partial view are allowed 
  11423.       within the immediate scope of the partial view; derivatives of the full 
  11424.       view are allowed. 
  11425.  
  11426.    8. The ancestor subtype of a private_extension_declaration is the subtype 
  11427.       defined by the ancestor_subtype_indication; the ancestor type shall be a 
  11428.       specific tagged type. The full view of a private extension shall be 
  11429.       derived (directly or indirectly) from the ancestor type. In addition to 
  11430.       the places where Legality Rules normally apply, see 12.3, the requirement 
  11431.       that the ancestor be specific applies also in the private part of an 
  11432.       instance of a generic unit. 
  11433.  
  11434.    9. If the declaration of a partial view includes a known_discriminant_part, 
  11435.       then the full_type_declaration shall have a fully conforming (explicit) 
  11436.       known_discriminant_part, see 6.3.1: ``Conformance Rules''. The ancestor 
  11437.       subtype may be unconstrained; the parent subtype of the full view is 
  11438.       required to be constrained, see 3.7. 
  11439.  
  11440.   10. If a private extension inherits known discriminants from the ancestor 
  11441.       subtype, then the full view shall also inherit its discriminants from the 
  11442.       ancestor subtype, and the parent subtype of the full view shall be 
  11443.       constrained if and only if the ancestor subtype is constrained. 
  11444.  
  11445.   11. If a partial view has unknown discriminants, then the 
  11446.       full_type_declaration may define a definite or an indefinite subtype, 
  11447.       with or without discriminants. 
  11448.  
  11449.   12. If a partial view has neither known nor unknown discriminants, then the 
  11450.       full_type_declaration shall define a definite subtype. 
  11451.  
  11452.   13. If the ancestor subtype of a private extension has constrained 
  11453.       discriminants, then the parent subtype of the full view shall impose a 
  11454.       statically matching constraint on those discriminants. 
  11455.  
  11456.             Static Semantics
  11457.  
  11458.   14. A private_type_declaration declares a private type and its first subtype. 
  11459.       Similarly, a private_extension_declaration declares a private extension 
  11460.       and its first subtype. 
  11461.  
  11462.   15. A declaration of a partial view and the corresponding 
  11463.       full_type_declaration define two views of a single type. The declaration 
  11464.       of a partial view together with the visible part define the operations 
  11465.       that are available to outside program units; the declaration of the full 
  11466.       view together with the private part define other operations whose direct 
  11467.       use is possible only within the declarative region of the package itself. 
  11468.       Moreover, within the scope of the declaration of the full view, the 
  11469.       characteristics of the type are determined by the full view; in 
  11470.       particular, within its scope, the full view determines the classes that 
  11471.       include the type, which components, entries, and protected subprograms 
  11472.       are visible, what attributes and other predefined operations are allowed, 
  11473.       and whether the first subtype is static (see 7.3.1). 
  11474.  
  11475.   16. A private extension inherits components (including discriminants unless 
  11476.       there is a new discriminant_part specified) and user-defined primitive 
  11477.       subprograms from its ancestor type, in the same way that a record 
  11478.       extension inherits components and user-defined primitive subprograms from 
  11479.       its parent type, see 3.4. 
  11480.  
  11481.             Dynamic Semantics
  11482.  
  11483.   17. The elaboration of a private_type_declaration creates a partial view of a 
  11484.       type. The elaboration of a private_extension_declaration elaborates the 
  11485.       ancestor_subtype_indication, and creates a partial view of a type. 
  11486.  
  11487.       NOTES 
  11488.  
  11489.   18. (5) The partial view of a type as declared by a private_type_declaration 
  11490.       is defined to be a composite view (in 3.2). The full view of the type 
  11491.       might or might not be composite. A private extension is also composite, 
  11492.       as is its full view. 
  11493.  
  11494.   19. (6) Declaring a private type with an unknown_discriminant_part is a way 
  11495.       of preventing clients from creating uninitialized objects of the type; 
  11496.       they are then forced to initialize each object by calling some operation 
  11497.       declared in the visible part of the package. If such a type is also 
  11498.       limited, then no objects of the type can be declared outside the scope of 
  11499.       the full_type_declaration, restricting all object creation to the package 
  11500.       defining the type. This allows complete control over all storage 
  11501.       allocation for the type. Objects of such a type can still be passed as 
  11502.       parameters, however. 
  11503.  
  11504.   20. (7) The ancestor type specified in a private_extension_declaration and 
  11505.       the parent type specified in the corresponding declaration of a record 
  11506.       extension given in the private part need not be the same -- the parent 
  11507.       type of the full view can be any descendant of the ancestor type. In this 
  11508.       case, for a primitive subprogram that is inherited from the ancestor type 
  11509.       and not overridden, the formal parameter names and default expressions 
  11510.       (if any) come from the corresponding primitive subprogram of the 
  11511.       specified ancestor type, while the body comes from the corresponding 
  11512.       primitive subprogram of the parent type of the full view (see 3.9.2). 
  11513.  
  11514.             Examples
  11515.  
  11516.   21. Examples of private type declarations: 
  11517.  
  11518.         22.
  11519.  
  11520.                       type Key is private;
  11521.                       type File_Name is limited private;
  11522.  
  11523.   23. Example of a private extension declaration: 
  11524.  
  11525.         24.
  11526.  
  11527.                       type List is new Ada.Finalization.Controlled with private;
  11528.  
  11529.  7.3.1                         Private Operations 
  11530.  
  11531.  
  11532. ΓòÉΓòÉΓòÉ 10.3.1. Private Operations ΓòÉΓòÉΓòÉ
  11533.  
  11534.    1. For a type declared in the visible part of a package or generic package, 
  11535.       certain operations on the type do not become visible until later in the 
  11536.       package -- either in the private part or the body. Such private 
  11537.       operations are available only inside the declarative region of the 
  11538.       package or generic package. 
  11539.  
  11540.             Static Semantics
  11541.  
  11542.    2. The predefined operators that exist for a given type are determined by 
  11543.       the classes to which the type belongs. For example, an integer type has a 
  11544.       predefined "+" operator. In most cases, the predefined operators of a 
  11545.       type are declared immediately after the definition of the type; the 
  11546.       exceptions are explained below. Inherited subprograms are also implicitly 
  11547.       declared immediately after the definition of the type, except as stated 
  11548.       below. 
  11549.  
  11550.    3. For a composite type, the characteristics, see 7.3 of the type are 
  11551.       determined in part by the characteristics of its component types. At the 
  11552.       place where the composite type is declared, the only characteristics of 
  11553.       component types used are those characteristics visible at that place. If 
  11554.       later within the immediate scope of the composite type additional 
  11555.       characteristics become visible for a component type, then any 
  11556.       corresponding characteristics become visible for the composite type. Any 
  11557.       additional predefined operators are implicitly declared at that place. 
  11558.  
  11559.    4. The corresponding rule applies to a type defined by a 
  11560.       derived_type_definition, if there is a place within its immediate scope 
  11561.       where additional characteristics of its parent type become visible. 
  11562.  
  11563.    5. For example, an array type whose component type is limited private 
  11564.       becomes nonlimited if the full view of the component type is nonlimited 
  11565.       and visible at some later place within the immediate scope of the array 
  11566.       type. In such a case, the predefined "=" operator is implicitly declared 
  11567.       at that place, and assignment is allowed after that place. 
  11568.  
  11569.    6. Inherited primitive subprograms follow a different rule. For a 
  11570.       derived_type_definition, each inherited primitive subprogram is 
  11571.       implicitly declared at the earliest place, if any, within the immediate 
  11572.       scope of the type_declaration, but after the type_declaration, where the 
  11573.       corresponding declaration from the parent is visible. If there is no such 
  11574.       place, then the inherited subprogram is not declared at all. An inherited 
  11575.       subprogram that is not declared at all cannot be named in a call and 
  11576.       cannot be overridden, but for a tagged type, it is possible to dispatch 
  11577.       to it. 
  11578.  
  11579.    7. For a private_extension_declaration, each inherited subprogram is 
  11580.       declared immediately after the private_extension_declaration if the 
  11581.       corresponding declaration from the ancestor is visible at that place. 
  11582.       Otherwise, the inherited subprogram is not declared for the private 
  11583.       extension, though it might be for the full type. 
  11584.  
  11585.    8. The Class attribute is defined for tagged subtypes in 3.9. In addition, 
  11586.       for every subtype S of an untagged private type whose full view is 
  11587.       tagged, the following attribute is defined: 
  11588.  
  11589.    9. S'Class 
  11590.  
  11591.                       Denotes the class-wide subtype corresponding to the full view
  11592.                       of S. This attribute is allowed only from the beginning of
  11593.                       the private part in which the full view is declared, until
  11594.                       the declaration of the full view. After the full view, the
  11595.                       Class attribute of the full view can be used.
  11596.  
  11597.  NOTES 
  11598.  
  11599.   10. (8) Because a partial view and a full view are two different views of one 
  11600.       and the same type, outside of the defining package the characteristics of 
  11601.       the type are those defined by the visible part. Within these outside 
  11602.       program units the type is just a private type or private extension, and 
  11603.       any language rule that applies only to another class of types does not 
  11604.       apply. The fact that the full declaration might implement a private type 
  11605.       with a type of a particular class (for example, as an array type) is 
  11606.       relevant only within the declarative region of the package itself 
  11607.       including any child units. 
  11608.  
  11609.   11. The consequences of this actual implementation are, however, valid 
  11610.       everywhere. For example: any default initialization of components takes 
  11611.       place; the attribute Size provides the size of the full view; 
  11612.       finalization is still done for controlled components of the full view; 
  11613.       task dependence rules still apply to components that are task objects. 
  11614.  
  11615.   12. (9) Partial views provide assignment (unless the view is limited), 
  11616.       membership tests, selected components for the selection of discriminants 
  11617.       and inherited components, qualification, and explicit conversion. 
  11618.  
  11619.   13. (10) For a subtype S of a partial view, S'Size is defined, see 13.3. For 
  11620.       an object A of a partial view, the attributes A'Size and A'Address are 
  11621.       defined, see 13.3. The Position, First_Bit, and Last_Bit attributes are 
  11622.       also defined for discriminants and inherited components. 
  11623.  
  11624.             Examples
  11625.  
  11626.   14. Example of a type with private operations: 
  11627.  
  11628.         15.
  11629.  
  11630.                       package Key_Manager is
  11631.                         type Key is private;
  11632.                         Null_Key : constant Key;
  11633.                         -- a deferred constant declaration, see 7.4
  11634.                         procedure Get_Key(K : out Key);
  11635.                         function "<" (X, Y : Key) return Boolean;
  11636.                       private
  11637.                         type Key is new Natural;
  11638.                         Null_Key : constant Key := Key'First;
  11639.                       end Key_Manager;
  11640.  
  11641.         16.
  11642.  
  11643.                       package body Key_Manager is
  11644.                         Last_Key : Key := Null_Key;
  11645.                         procedure Get_Key(K : out Key) is
  11646.                         begin
  11647.                          Last_Key := Last_Key + 1;
  11648.                          K := Last_Key;
  11649.                         end Get_Key;
  11650.  
  11651.         17.
  11652.  
  11653.                         function "<" (X, Y : Key) return Boolean is
  11654.                         begin
  11655.                          return Natural(X) < Natural(Y);
  11656.                         end "<";
  11657.                       end Key_Manager;
  11658.  
  11659.  NOTES 
  11660.  
  11661.   18. (11) Notes on the example: Outside of the package Key_Manager, the 
  11662.       operations available for objects of type Key include assignment, the 
  11663.       comparison for equality or inequality, the procedure Get_Key and the 
  11664.       operator "<"; they do not include other relational operators such as 
  11665.       ">=", or arithmetic operators. 
  11666.  
  11667.   19. The explicitly declared operator "<" hides the predefined operator "<" 
  11668.       implicitly declared by the full_type_declaration. Within the body of the 
  11669.       function, an explicit conversion of X and Y to the subtype Natural is 
  11670.       necessary to invoke the "<" operator of the parent type. Alternatively, 
  11671.       the result of the function could be written as not (X >= Y), since the 
  11672.       operator ">=" is not redefined. 
  11673.  
  11674.   20. The value of the variable Last_Key, declared in the package body, remains 
  11675.       unchanged between calls of the procedure Get_Key (See also the NOTES of 
  11676.       7.2) 
  11677.  
  11678.  
  11679. ΓòÉΓòÉΓòÉ 10.4. Deferred Constants ΓòÉΓòÉΓòÉ
  11680.  
  11681.    1. Deferred constant declarations may be used to declare constants in the 
  11682.       visible part of a package, but with the value of the constant given in 
  11683.       the private part. They may also be used to declare constants imported 
  11684.       from other languages, see B: ``Annex B''. 
  11685.  
  11686.             Legality Rules
  11687.  
  11688.    2. A deferred constant declaration is an object_declaration with the 
  11689.       reserved word constant but no initialization expression. The constant 
  11690.       declared by a deferred constant declaration is called a deferred 
  11691.       constant. A deferred constant declaration requires a completion, which 
  11692.       shall be a full constant declaration (called the full declaration of the 
  11693.       deferred constant), or a pragma Import (see B: ``Annex B''). 
  11694.  
  11695.    3. A deferred constant declaration that is completed by a full constant 
  11696.       declaration shall occur immediately within the visible part of a package_ 
  11697.       specification. For this case, the following additional rules apply to the 
  11698.       corresponding full declaration: 
  11699.  
  11700.         a. The full declaration shall occur immediately within the private part 
  11701.            of the same package; 
  11702.  
  11703.         b. The deferred and full constants shall have the same type; 
  11704.  
  11705.         c. If the subtype defined by the subtype_indication in the deferred 
  11706.            declaration is constrained, then the subtype defined by the 
  11707.            subtype_indication in the full declaration shall match it 
  11708.            statically. On the other hand, if the subtype of the deferred 
  11709.            constant is unconstrained, then the full declaration is still 
  11710.            allowed to impose a constraint. The constant itself will be 
  11711.            constrained, like all constants; 
  11712.  
  11713.         d. If the deferred constant declaration includes the reserved word 
  11714.            aliased, then the full declaration shall also. 
  11715.  
  11716.    1. A deferred constant declaration that is completed by a pragma Import need 
  11717.       not appear in the visible part of a package_specification, and has no 
  11718.       full constant declaration. 
  11719.  
  11720.    2. The completion of a deferred constant declaration shall occur before the 
  11721.       constant is frozen, see 7.4. 
  11722.  
  11723.             Dynamic Semantics
  11724.  
  11725.    3. The elaboration of a deferred constant declaration elaborates the 
  11726.       subtype_indication or (only allowed in the case of an imported constant) 
  11727.       the array_type_definition. 
  11728.  
  11729.       NOTES 
  11730.  
  11731.    4. (12) The full constant declaration for a deferred constant that is of a 
  11732.       given private type or private extension is not allowed before the 
  11733.       corresponding full_type_declaration. This is a consequence of the 
  11734.       freezing rules for types, see 13.14. 
  11735.  
  11736.             Examples
  11737.  
  11738.    5. Examples of deferred constant declarations: 
  11739.  
  11740.          6.
  11741.  
  11742.                       Null_Key : constant Key;    --  see 7.3.1
  11743.  
  11744.          7.
  11745.  
  11746.                       CPU_Identifier : constant String(1┬╖┬╖8);
  11747.                       pragma Import(Assembler, CPU_Identifier, Link_Name => "CPU_ID");
  11748.                       --  see B.1
  11749.  
  11750.  
  11751. ΓòÉΓòÉΓòÉ 10.5. Limited Types ΓòÉΓòÉΓòÉ
  11752.  
  11753.    1. A limited type is (a view of) a type for which the assignment operation 
  11754.       is not allowed. A nonlimited type is a (view of a) type for which the 
  11755.       assignment operation is allowed. 
  11756.  
  11757.             Legality Rules
  11758.  
  11759.    2. If a tagged record type has any limited components, then the reserved 
  11760.       word limited shall appear in its record_type_definition. 
  11761.  
  11762.             Static Semantics
  11763.  
  11764.    3. A type is limited if it is a descendant of one of the following: 
  11765.  
  11766.         a. a type with the reserved word limited in its definition; 
  11767.  
  11768.         b. a task or protected type; 
  11769.  
  11770.         c. a composite type with a limited component. 
  11771.  
  11772.    1. Otherwise, the type is nonlimited. 
  11773.  
  11774.    2. There are no predefined equality operators for a limited type. 
  11775.  
  11776.       NOTES 
  11777.  
  11778.    3. (13) The following are consequences of the rules for limited types: 
  11779.  
  11780.         a. An initialization expression is not allowed in an object_declaration 
  11781.            if the type of the object is limited. 
  11782.  
  11783.         b. A default expression is not allowed in a component_declaration if 
  11784.            the type of the record component is limited. 
  11785.  
  11786.         c. An initialized allocator is not allowed if the designated type is 
  11787.            limited. 
  11788.  
  11789.         d. A generic formal parameter of mode in must not be of a limited type. 
  11790.  
  11791.    1. (14) Aggregates are not available for a limited composite type. 
  11792.       Concatenation is not available for a limited array type. 
  11793.  
  11794.    2. (15) The rules do not exclude a default_expression for a formal parameter 
  11795.       of a limited type; they do not exclude a deferred constant of a limited 
  11796.       type if the full declaration of the constant is of a nonlimited type. 
  11797.  
  11798.    3. (16) As illustrated in 7.3.1, an untagged limited type can become 
  11799.       nonlimited under certain circumstances. 
  11800.  
  11801.             Examples
  11802.  
  11803.    4. Example of a package with a limited type: 
  11804.  
  11805.          5.
  11806.  
  11807.                       package IO_Package is
  11808.                         type File_Name is limited private;
  11809.  
  11810.          6.
  11811.  
  11812.                         procedure Open (F : in out File_Name);
  11813.                         procedure Close(F : in out File_Name);
  11814.                         procedure Read (F : in File_Name; Item : out Integer);
  11815.                         procedure Write(F : in File_Name; Item : in  Integer);
  11816.                       private
  11817.                         type File_Name is
  11818.                          limited record
  11819.                            Internal_Name : Integer := 0;
  11820.                          end record;
  11821.                       end IO_Package;
  11822.  
  11823.          7.
  11824.  
  11825.                       package body IO_Package is
  11826.                         Limit : constant := 200;
  11827.                         type File_Descriptor is record  ┬╖┬╖┬╖  end record;
  11828.                         Directory : array (1 ┬╖┬╖ Limit) of File_Descriptor;
  11829.                         ┬╖┬╖┬╖
  11830.                         procedure Open (F : in out File_Name) is  ┬╖┬╖┬╖  end;
  11831.                         procedure Close(F : in out File_Name) is  ┬╖┬╖┬╖  end;
  11832.                         procedure Read (F : in File_Name; Item : out Integer) is ┬╖┬╖┬╖ end;
  11833.                         procedure Write(F : in File_Name; Item : in  Integer) is ┬╖┬╖┬╖ end;
  11834.                       begin
  11835.                         ┬╖┬╖┬╖
  11836.                       end IO_Package;
  11837.  
  11838.  NOTES 
  11839.  
  11840.    8. (17) Notes on the example: In the example above, an outside subprogram 
  11841.       making use of IO_Package may obtain a file name by calling Open and later 
  11842.       use it in calls to Read and Write. Thus, outside the package, a file name 
  11843.       obtained from Open acts as a kind of password; its internal properties 
  11844.       (such as containing a numeric value) are not known and no other 
  11845.       operations (such as addition or comparison of internal names) can be 
  11846.       performed on a file name. Most importantly, clients of the package cannot 
  11847.       make copies of objects of type File_Name. 
  11848.  
  11849.    9. This example is characteristic of any case where complete control over 
  11850.       the operations of a type is desired. Such packages serve a dual purpose. 
  11851.       They prevent a user from making use of the internal structure of the 
  11852.       type. They also implement the notion of an encapsulated data type where 
  11853.       the only operations on the type are those given in the package 
  11854.       specification. 
  11855.  
  11856.   10. The fact that the full view of File_Name is explicitly declared limited 
  11857.       means that parameter passing and function return will always be by 
  11858.       reference, see 6.2, and 6.5. 
  11859.  
  11860.  
  11861. ΓòÉΓòÉΓòÉ 10.6. User-Defined Assignment and Finalization ΓòÉΓòÉΓòÉ
  11862.  
  11863.    1. Three kinds of actions are fundamental to the manipulation of objects: 
  11864.       initialization, finalization, and assignment. Every object is 
  11865.       initialized, either explicitly or by default, after being created (for 
  11866.       example, by an object_declaration or allocator). Every object is 
  11867.       finalized before being destroyed (for example, by leaving a 
  11868.       subprogram_body containing an object_declaration, or by a call to an 
  11869.       instance of Unchecked_Deallocation). An assignment operation is used as 
  11870.       part of assignment_statements, explicit initialization, parameter 
  11871.       passing, and other operations. 
  11872.  
  11873.    2. Default definitions for these three fundamental operations are provided 
  11874.       by the language, but a controlled type gives the user additional control 
  11875.       over parts of these operations. In particular, the user can define, for a 
  11876.       controlled type, an Initialize procedure which is invoked immediately 
  11877.       after the normal default initialization of a controlled object, a 
  11878.       Finalize procedure which is invoked immediately before finalization of 
  11879.       any of the components of a controlled object, and an Adjust procedure 
  11880.       which is invoked as the last step of an assignment to a (nonlimited) 
  11881.       controlled object. 
  11882.  
  11883.             Static Semantics
  11884.  
  11885.    3. The following language-defined library package exists: 
  11886.  
  11887.          4.
  11888.  
  11889.                       package Ada.Finalization is
  11890.                         pragma Preelaborate(Finalization);
  11891.  
  11892.          5.
  11893.  
  11894.                          type Controlled is abstract tagged private;
  11895.  
  11896.          6.
  11897.  
  11898.                          procedure Initialize(Object : in out Controlled);
  11899.                         procedure Adjust         (Object : in out Controlled);
  11900.                         procedure Finalize        (Object : in out Controlled);
  11901.  
  11902.          7.
  11903.  
  11904.                          type Limited_Controlled is abstract tagged limited private;
  11905.  
  11906.          8.
  11907.  
  11908.                          procedure Initialize(Object : in out Limited_Controlled);
  11909.                         procedure Finalize  (Object : in out Limited_Controlled);
  11910.                       private
  11911.                         ┬╖┬╖┬╖ -- not specified by the language
  11912.                       end Ada.Finalization;
  11913.  
  11914.    9. A controlled type is a descendant of Controlled or Limited_Controlled. 
  11915.       The (default) implementations of Initialize, Adjust, and Finalize have no 
  11916.       effect. The predefined "=" operator of type Controlled always returns 
  11917.       True, since this operator is incorporated into the implementation of the 
  11918.       predefined equality operator of types derived from Controlled, as 
  11919.       explained in 4.5.2. The type Limited_Controlled is like Controlled, 
  11920.       except that it is limited and it lacks the primitive subprogram Adjust. 
  11921.  
  11922.             Dynamic Semantics
  11923.  
  11924.   10. During the elaboration of an object_declaration, for every controlled 
  11925.       subcomponent of the object that is not assigned an initial value (as 
  11926.       defined in 3.3.1), Initialize is called on that subcomponent. Similarly, 
  11927.       if the object as a whole is controlled and is not assigned an initial 
  11928.       value, Initialize is called on the object. The same applies to the 
  11929.       evaluation of an allocator, as explained in 4.8. 
  11930.  
  11931.   11. For an extension_aggregate whose ancestor_part is a subtype_mark, 
  11932.       Initialize is called on all controlled subcomponents of the ancestor 
  11933.       part; if the type of the ancestor part is itself controlled, the 
  11934.       Initialize procedure of the ancestor type is called, unless that 
  11935.       Initialize procedure is abstract. 
  11936.  
  11937.   12. Initialize and other initialization operations are done in an arbitrary 
  11938.       order, except as follows. Initialize is applied to an object after 
  11939.       initialization of its subcomponents, if any (including both implicit 
  11940.       initialization and Initialize calls). If an object has a component with 
  11941.       an access discriminant constrained by a per-object expression, Initialize 
  11942.       is applied to this component after any components that do not have such 
  11943.       discriminants. For an object with several components with such a 
  11944.       discriminant, Initialize is applied to them in order of their 
  11945.       component_declarations. For an allocator, any task activations follow all 
  11946.       calls on Initialize. 
  11947.  
  11948.   13. When a target object with any controlled parts is assigned a value, 
  11949.       either when created or in a subsequent assignment_statement, the 
  11950.       assignment operation proceeds as follows: 
  11951.  
  11952.         a. The value of the target becomes the assigned value. 
  11953.  
  11954.         b. The value of the target is adjusted. 
  11955.  
  11956.    1. To adjust the value of a (nonlimited) composite object, the values of the 
  11957.       components of the object are first adjusted in an arbitrary order, and 
  11958.       then, if the object is controlled, Adjust is called. Adjusting the value 
  11959.       of an elementary object has no effect, nor does adjusting the value of a 
  11960.       composite object with no controlled parts. 
  11961.  
  11962.    2. For an assignment_statement, after the name and expression have been 
  11963.       evaluated, and any conversion (including constraint checking) has been 
  11964.       done, an anonymous object is created, and the value is assigned into it; 
  11965.       that is, the assignment operation is applied. (Assignment includes value 
  11966.       adjustment.) The target of the assignment_statement is then finalized. 
  11967.       The value of the anonymous object is then assigned into the target of the 
  11968.       assignment_statement. Finally, the anonymous object is finalized. As 
  11969.       explained below, the implementation may eliminate the intermediate 
  11970.       anonymous object, so this description subsumes the one given in 5.2: 
  11971.       ``Assignment Statements''. 
  11972.  
  11973.             Implementation Permissions
  11974.  
  11975.    3. An implementation is allowed to relax the above rules (for nonlimited 
  11976.       controlled types) in the following ways: 
  11977.  
  11978.         a. For an assignment_statement that assigns to an object the value of 
  11979.            that same object, the implementation need not do anything. 
  11980.  
  11981.         b. For an assignment_statement for a noncontrolled type, the 
  11982.            implementation may finalize and assign each component of the 
  11983.            variable separately (rather than finalizing the entire variable and 
  11984.            assigning the entire new value) unless a discriminant of the 
  11985.            variable is changed by the assignment. 
  11986.  
  11987.         c. For an aggregate or function call whose value is assigned into a 
  11988.            target object, the implementation need not create a separate 
  11989.            anonymous object if it can safely create the value of the aggregate 
  11990.            or function call directly in the target object. Similarly, for an 
  11991.            assignment_statement, the implementation need not create an 
  11992.            anonymous object if the value being assigned is the result of 
  11993.            evaluating a name denoting an object (the source object) whose 
  11994.            storage cannot overlap with the target. If the source object might 
  11995.            overlap with the target object, then the implementation can avoid 
  11996.            the need for an intermediary anonymous object by exercising one of 
  11997.            the above permissions and perform the assignment one component at a 
  11998.            time (for an overlapping array assignment), or not at all (for an 
  11999.            assignment where the target and the source of the assignment are the 
  12000.            same object). Even if an anonymous object is created, the 
  12001.            implementation may move its value to the target object as part of 
  12002.            the assignment without re-adjusting so long as the anonymous object 
  12003.            has no aliased subcomponents. 
  12004.  
  12005.  7.6.1                         Completion and Finalization 
  12006.  
  12007.  
  12008. ΓòÉΓòÉΓòÉ 10.6.1. Completion and Finalization ΓòÉΓòÉΓòÉ
  12009.  
  12010.    1. This subclause defines completion and leaving of the execution of 
  12011.       constructs and entities. A master is the execution of a construct that 
  12012.       includes finalization of local objects after it is complete (and after 
  12013.       waiting for any local tasks --  see 9.3.), but before leaving. Other 
  12014.       constructs and entities are left immediately upon completion. 
  12015.  
  12016.             Dynamic Semantics
  12017.  
  12018.    2. The execution of a construct or entity is complete when the end of that 
  12019.       execution has been reached, or when a transfer of control, see 5.1, 
  12020.       causes it to be abandoned. Completion due to reaching the end of 
  12021.       execution, or due to the transfer of control of an exit_, return_, goto_, 
  12022.       or requeue_statement or of the selection of a terminate_alternative is 
  12023.       normal completion. Completion is abnormal otherwise -- when control is 
  12024.       transferred out of a construct due to abort or the raising of an 
  12025.       exception. 
  12026.  
  12027.    3. After execution of a construct or entity is complete, it is left, meaning 
  12028.       that execution continues with the next action, as defined for the 
  12029.       execution that is taking place. Leaving an execution happens immediately 
  12030.       after its completion, except in the case of a master: the execution of a 
  12031.       task_body, a block_statement, a subprogram_body, an entry_body, or an 
  12032.       accept_statement. A master is finalized after it is complete, and before 
  12033.       it is left. 
  12034.  
  12035.    4. For the finalization of a master, dependent tasks are first awaited, as 
  12036.       explained in 9.3. Then each object whose accessibility level is the same 
  12037.       as that of the master is finalized if the object was successfully 
  12038.       initialized and still exists. These actions are performed whether the 
  12039.       master is left by reaching the last statement or via a transfer of 
  12040.       control. When a transfer of control causes completion of an execution, 
  12041.       each included master is finalized in order, from innermost outward. 
  12042.  
  12043.    5. For the finalization of an object: 
  12044.  
  12045.         a. If the object is of an elementary type, finalization has no effect; 
  12046.  
  12047.         b. If the object is of a controlled type, the Finalize procedure is 
  12048.            called; 
  12049.  
  12050.         c. If the object is of a protected type, the actions defined in 9.4 are 
  12051.            performed; 
  12052.  
  12053.         d. If the object is of a composite type, then after performing the 
  12054.            above actions, if any, every component of the object is finalized in 
  12055.            an arbitrary order, except as follows: if the object has a component 
  12056.            with an access discriminant constrained by a per-object expression, 
  12057.            this component is finalized before any components that do not have 
  12058.            such discriminants; for an object with several components with such 
  12059.            a discriminant, they are finalized in the reverse of the order of 
  12060.            their component_declarations. 
  12061.  
  12062.    1. Immediately before an instance of Unchecked_Deallocation reclaims the 
  12063.       storage of an object, the object is finalized. If an instance of 
  12064.       Unchecked_Deallocation is never applied to an object created by an 
  12065.       allocator, the object will still exist when the corresponding master 
  12066.       completes, and it will be finalized then. 
  12067.  
  12068.    2. The order in which the finalization of a master performs finalization of 
  12069.       objects is as follows: Objects created by declarations in the master are 
  12070.       finalized in the reverse order of their creation. For objects that were 
  12071.       created by allocators for an access type whose ultimate ancestor is 
  12072.       declared in the master, this rule is applied as though each such object 
  12073.       that still exists had been created in an arbitrary order at the first 
  12074.       freezing point, see 13.14, of the ultimate ancestor type. 
  12075.  
  12076.    3. The target of an assignment statement is finalized before copying in the 
  12077.       new value, as explained in 7.6. 
  12078.  
  12079.    4. The anonymous objects created by function calls and by aggregates are 
  12080.       finalized no later than the end of the innermost enclosing 
  12081.       declarative_item or statement; if that is a compound_statement, they are 
  12082.       finalized before starting the execution of any statement within the 
  12083.       compound_statement. 
  12084.  
  12085.             Bounded (Run-Time) Errors
  12086.  
  12087.    5. It is a bounded error for a call on Finalize or Adjust to propagate an 
  12088.       exception. The possible consequences depend on what action invoked the 
  12089.       Finalize or Adjust operation: 
  12090.  
  12091.         a. For a Finalize invoked as part of an assignment_statement, 
  12092.            Program_Error is raised at that point. 
  12093.  
  12094.         b. For an Adjust invoked as part of an assignment operation, any other 
  12095.            adjustments due to be performed are performed, and then 
  12096.            Program_Error is raised. 
  12097.  
  12098.         c. For a Finalize invoked as part of a call on an instance of 
  12099.            Unchecked_Deallocation, any other finalizations due to be performed 
  12100.            are performed, and then Program_Error is raised. 
  12101.  
  12102.         d. For a Finalize invoked by the transfer of control of an exit_, 
  12103.            return_, goto_, or requeue_statement, Program_Error is raised no 
  12104.            earlier than after the finalization of the master being finalized 
  12105.            when the exception occurred, and no later than the point where 
  12106.            normal execution would have continued. Any other finalizations due 
  12107.            to be performed up to that point are performed before raising 
  12108.            Program_Error. 
  12109.  
  12110.         e. For a Finalize invoked by a transfer of control that is due to 
  12111.            raising an exception, any other finalizations due to be performed 
  12112.            for the same master are performed; Program_Error is raised 
  12113.            immediately after leaving the master. 
  12114.  
  12115.         f. For a Finalize invoked by a transfer of control due to an abort or 
  12116.            selection of a terminate alternative, the exception is ignored; any 
  12117.            other finalizations due to be performed are performed. 
  12118.   NOTES 
  12119.  
  12120.    1. (18) The rules in 10: ``Section 10'', imply that immediately prior to 
  12121.       partition termination, Finalize operations are applied to library-level 
  12122.       controlled objects (including those created by allocators of 
  12123.       library-level access types, except those already finalized). This occurs 
  12124.       after waiting for library-level tasks to terminate. 
  12125.  
  12126.    2. (19) A constant is only constant between its initialization and 
  12127.       finalization. Both initialization and finalization are allowed to change 
  12128.       the value of a constant. 
  12129.  
  12130.    3. (20) Abort is deferred during certain operations related to controlled 
  12131.       types, as explained in 9.8. Those rules prevent an abort from causing a 
  12132.       controlled object to be left in an ill-defined state. 
  12133.  
  12134.    4. (21) The Finalize procedure is called upon finalization of a controlled 
  12135.       object, even if Finalize was called earlier, either explicitly or as part 
  12136.       of an assignment; hence, if a controlled type is visibly controlled 
  12137.       (implying that its Finalize primitive is directly callable), or is 
  12138.       nonlimited (implying that assignment is allowed), its Finalize procedure 
  12139.       should be designed to have no ill effect if it is applied a second time 
  12140.       to the same object. 
  12141.  
  12142.  
  12143. ΓòÉΓòÉΓòÉ 11. Visibility Rules ΓòÉΓòÉΓòÉ
  12144.  
  12145.    1. The rules defining the scope of declarations and the rules defining which 
  12146.       identifiers, character_literals, and operator_symbols are visible at (or 
  12147.       from) various places in the text of the program are described in this 
  12148.       section. The formulation of these rules uses the notion of a declarative 
  12149.       region. 
  12150.  
  12151.    2. As explained in 3: Section 3, a declaration declares a view of an entity 
  12152.       and associates a defining name with that view. The view comprises an 
  12153.       identification of the viewed entity, and possibly additional properties. 
  12154.       A usage name denotes a declaration. It also denotes the view declared by 
  12155.       that declaration, and denotes the entity of that view. Thus, two 
  12156.       different usage names might denote two different views of the same 
  12157.       entity; in this case they denote the same entity. 
  12158.  
  12159.  8.1                           Declarative Region 
  12160.  8.2                           Scope of Declarations 
  12161.  8.3                           Visibility 
  12162.  8.4                           Use Clauses 
  12163.  8.5                           Renaming Declarations 
  12164.  8.6                           The Context of Overload Resolution --- The 
  12165.                                Detailed Node Listing --- 
  12166.  8.1                           Declarative Region 
  12167.  8.2                           Scope of Declarations 
  12168.  8.3                           Visibility 
  12169.  8.4                           Use Clauses 
  12170.  8.5                           Renaming Declarations 
  12171.  8.5.1                         Object Renaming Declarations 
  12172.  8.5.2                         Exception Renaming Declarations 
  12173.  8.5.3                         Package Renaming Declarations 
  12174.  8.5.4                         Subprogram Renaming Declarations 
  12175.  8.5.5                         Generic Renaming Declarations 
  12176.  8.6                           The Context of Overload Resolution 
  12177.  
  12178.  
  12179. ΓòÉΓòÉΓòÉ 11.1. Declarative Region ΓòÉΓòÉΓòÉ
  12180.  
  12181.  
  12182.   Static Semantics
  12183.  
  12184.    1. For each of the following constructs, there is a portion of the program 
  12185.       text called its declarative region, within which nested declarations can 
  12186.       occur: 
  12187.  
  12188.         a. any declaration, other than that of an enumeration type, that is not 
  12189.            a completion of a previous declaration; 
  12190.  
  12191.         b. a block_statement; 
  12192.  
  12193.         c. a loop_statement; 
  12194.  
  12195.         d. an accept_statement; 
  12196.  
  12197.         e. an exception_handler. 
  12198.  
  12199.    1. The declarative region includes the text of the construct together with 
  12200.       additional text determined (recursively), as follows: 
  12201.  
  12202.         a. If a declaration is included, so is its completion, if any. 
  12203.  
  12204.         b. If the declaration of a library unit (including Standard -- see 
  12205.            10.1.1, is included, so are the declarations of any child units (and 
  12206.            their completions, by the previous rule). The child declarations 
  12207.            occur after the declaration. 
  12208.  
  12209.         c. If a body_stub is included, so is the corresponding subunit. 
  12210.  
  12211.         d. If a type_declaration is included, then so is a corresponding 
  12212.            record_representation_clause, if any. 
  12213.  
  12214.    1. The declarative region of a declaration is also called the declarative 
  12215.       region of any view or entity declared by the declaration. 
  12216.  
  12217.    2. A declaration occurs immediately within a declarative region if this 
  12218.       region is the innermost declarative region that encloses the declaration 
  12219.       (the immediately enclosing declarative region), not counting the 
  12220.       declarative region (if any) associated with the declaration itself. 
  12221.  
  12222.    3. A declaration is local to a declarative region if the declaration occurs 
  12223.       immediately within the declarative region. An entity is local to a 
  12224.       declarative region if the entity is declared by a declaration that is 
  12225.       local to the declarative region. 
  12226.  
  12227.    4. A declaration is global to a declarative region if the declaration occurs 
  12228.       immediately within another declarative region that encloses the 
  12229.       declarative region. An entity is global to a declarative region if the 
  12230.       entity is declared by a declaration that is global to the declarative 
  12231.       region. 
  12232.  
  12233.       NOTES 
  12234.  
  12235.    5. (1) The children of a parent library unit are inside the parent's 
  12236.       declarative region, even though they do not occur inside the parent's 
  12237.       declaration or body. This implies that one can use (for example) "P.Q" to 
  12238.       refer to a child of P whose defining name is Q, and that after "use P;" Q 
  12239.       can refer (directly) to that child. 
  12240.  
  12241.    6. (2) As explained above and in 10.1.1: ``Compilation Units - Library 
  12242.       Units'', all library units are descendants of Standard, and so are 
  12243.       contained in the declarative region of Standard. They are not inside the 
  12244.       declaration or body of Standard, but they are inside its declarative 
  12245.       region. 
  12246.  
  12247.    7. (3) For a declarative region that comes in multiple parts, the text of 
  12248.       the declarative region does not contain any text that might appear 
  12249.       between the parts. Thus, when a portion of a declarative region is said 
  12250.       to extend from one place to another in the declarative region, the 
  12251.       portion does not contain any text that might appear between the parts of 
  12252.       the declarative region. 
  12253.  
  12254.  
  12255. ΓòÉΓòÉΓòÉ 11.2. Scope of Declarations ΓòÉΓòÉΓòÉ
  12256.  
  12257.    1. For each declaration, the language rules define a certain portion of the 
  12258.       program text called the scope of the declaration. The scope of a 
  12259.       declaration is also called the scope of any view or entity declared by 
  12260.       the declaration. Within the scope of an entity, and only there, there are 
  12261.       places where it is legal to refer to the declared entity. These places 
  12262.       are defined by the rules of visibility and overloading. 
  12263.  
  12264.             Static Semantics
  12265.  
  12266.    2. The immediate scope of a declaration is a portion of the declarative 
  12267.       region immediately enclosing the declaration. The immediate scope starts 
  12268.       at the beginning of the declaration, except in the case of an 
  12269.       overloadable declaration, in which case the immediate scope starts just 
  12270.       after the place where the profile of the callable entity is determined 
  12271.       (which is at the end of the _specification for the callable entity, or at 
  12272.       the end of the generic_instantiation if an instance). The immediate scope 
  12273.       extends to the end of the declarative region, with the following 
  12274.       exceptions: 
  12275.  
  12276.         a. The immediate scope of a library_item includes only its semantic 
  12277.            dependents. 
  12278.  
  12279.         b. The immediate scope of a declaration in the private part of a 
  12280.            library unit does not include the visible part of any public 
  12281.            descendant of that library unit. 
  12282.  
  12283.    1. The visible part of (a view of) an entity is a portion of the text of its 
  12284.       declaration containing declarations that are visible from outside. The 
  12285.       private part of (a view of) an entity that has a visible part contains 
  12286.       all declarations within the declaration of (the view of) the entity, 
  12287.       except those in the visible part; these are not visible from outside. 
  12288.       Visible and private parts are defined only for these kinds of entities: 
  12289.       callable entities, other program units, and composite types. 
  12290.  
  12291.         a. The visible part of a view of a callable entity is its profile. 
  12292.  
  12293.         b. The visible part of a composite type other than a task or protected 
  12294.            type consists of the declarations of all components declared 
  12295.            (explicitly or implicitly) within the type_declaration. 
  12296.  
  12297.         c. The visible part of a generic unit includes the generic_formal_part. 
  12298.            For a generic package, it also includes the first list of 
  12299.            basic_declarative_items of the package_specification. For a generic 
  12300.            subprogram, it also includes the profile. 
  12301.  
  12302.         d. The visible part of a package, task unit, or protected unit consists 
  12303.            of declarations in the program unit's declaration other than those 
  12304.            following the reserved word private, if any; see 7.1, and 12.7, for 
  12305.            packages, see 9.1, for task units, and 9.4, for protected units. 
  12306.  
  12307.    1. The scope of a declaration always contains the immediate scope of the 
  12308.       declaration. In addition, for a given declaration that occurs immediately 
  12309.       within the visible part of an outer declaration, or is a public child of 
  12310.       an outer declaration, the scope of the given declaration extends to the 
  12311.       end of the scope of the outer declaration, except that the scope of a 
  12312.       library_item includes only its semantic dependents. 
  12313.  
  12314.    2. The immediate scope of a declaration is also the immediate scope of the 
  12315.       entity or view declared by the declaration. Similarly, the scope of a 
  12316.       declaration is also the scope of the entity or view declared by the 
  12317.       declaration. 
  12318.  
  12319.       NOTES 
  12320.  
  12321.    3. (4) There are notations for denoting visible declarations that are not 
  12322.       directly visible. For example, parameter_specifications are in the 
  12323.       visible part of a subprogram_declaration so that they can be used in 
  12324.       named-notation calls appearing outside the called subprogram. For another 
  12325.       example, declarations of the visible part of a package can be denoted by 
  12326.       expanded names appearing outside the package, and can be made directly 
  12327.       visible by a use_clause. 
  12328.  
  12329.  
  12330. ΓòÉΓòÉΓòÉ 11.3. Visibility ΓòÉΓòÉΓòÉ
  12331.  
  12332.    1. The visibility rules, given below, determine which declarations are 
  12333.       visible and directly visible at each place within a program. The 
  12334.       visibility rules apply to both explicit and implicit declarations. 
  12335.  
  12336.             Static Semantics
  12337.  
  12338.    2. A declaration is defined to be directly visible at places where a name 
  12339.       consisting of only an identifier or operator_symbol is sufficient to 
  12340.       denote the declaration; that is, no selected_component notation or 
  12341.       special context (such as preceding => in a named association) is 
  12342.       necessary to denote the declaration. A declaration is defined to be 
  12343.       visible wherever it is directly visible, as well as at other places where 
  12344.       some name (such as a selected_component) can denote the declaration. 
  12345.  
  12346.    3. The syntactic category direct_name is used to indicate contexts where 
  12347.       direct visibility is required. The syntactic category selector_name is 
  12348.       used to indicate contexts where visibility, but not direct visibility, is 
  12349.       required. 
  12350.  
  12351.    4. There are two kinds of direct visibility: immediate visibility and 
  12352.       use-visibility. A declaration is immediately visible at a place if it is 
  12353.       directly visible because the place is within its immediate scope. A 
  12354.       declaration is use-visible if it is directly visible because of a 
  12355.       use_clause, see 8.4. Both conditions can apply. 
  12356.  
  12357.    5. A declaration can be hidden, either from direct visibility, or from all 
  12358.       visibility, within certain parts of its scope. Where hidden from all 
  12359.       visibility, it is not visible at all (neither using a direct_name nor a 
  12360.       selector_name). Where hidden from direct visibility, only direct 
  12361.       visibility is lost; visibility using a selector_name is still possible. 
  12362.  
  12363.    6. Two or more declarations are overloaded if they all have the same 
  12364.       defining name and there is a place where they are all directly visible. 
  12365.  
  12366.    7. The declarations of callable entities (including enumeration literals) 
  12367.       are overloadable, meaning that overloading is allowed for them. 
  12368.  
  12369.    8. Two declarations are homographs if they have the same defining name, and, 
  12370.       if both are overloadable, their profiles are type conformant. An inner 
  12371.       declaration hides any outer homograph from direct visibility. 
  12372.  
  12373.    9. Two homographs are not generally allowed immediately within the same 
  12374.       declarative region unless one overrides the other (see Legality Rules 
  12375.       below). A declaration overrides another homograph that occurs immediately 
  12376.       within the same declarative region in the following cases: 
  12377.  
  12378.         a. An explicit declaration overrides an implicit declaration of a 
  12379.            primitive subprogram, regardless of which declaration occurs first; 
  12380.  
  12381.         b. The implicit declaration of an inherited operator overrides that of 
  12382.            a predefined operator; 
  12383.  
  12384.         c. An implicit declaration of an inherited subprogram overrides a 
  12385.            previous implicit declaration of an inherited subprogram. 
  12386.  
  12387.         d. For an implicit declaration of a primitive subprogram in a generic 
  12388.            unit, there is a copy of this declaration in an instance. However, a 
  12389.            whole new set of primitive subprograms is implicitly declared for 
  12390.            each type declared within the visible part of the instance. These 
  12391.            new declarations occur immediately after the type declaration, and 
  12392.            override the copied ones. The copied ones can be called only from 
  12393.            within the instance; the new ones can be called only from outside 
  12394.            the instance, although for tagged types, the body of a new one can 
  12395.            be executed by a call to an old one. 
  12396.  
  12397.    1. A declaration is visible within its scope, except where hidden from all 
  12398.       visibility, as follows: 
  12399.  
  12400.         a. An overridden declaration is hidden from all visibility within the 
  12401.            scope of the overriding declaration. 
  12402.  
  12403.         b. A declaration is hidden from all visibility until the end of the 
  12404.            declaration, except: 
  12405.  
  12406.              1. For a record type or record extension, the declaration is 
  12407.                 hidden from all visibility only until the reserved word record; 
  12408.  
  12409.              2. For a package_declaration, task declaration, protected 
  12410.                 declaration, generic_package_declaration, or subprogram_body, 
  12411.                 the declaration is hidden from all visibility only until the 
  12412.                 reserved word is of the declaration. 
  12413.  
  12414.         a. If the completion of a declaration is a declaration, then within the 
  12415.            scope of the completion, the first declaration is hidden from all 
  12416.            visibility. Similarly, a discriminant_specification or 
  12417.            parameter_specification is hidden within the scope of a 
  12418.            corresponding discriminant_specification or parameter_specification 
  12419.            of a corresponding completion, or of a corresponding 
  12420.            accept_statement. 
  12421.  
  12422.         b. The declaration of a library unit (including a 
  12423.            library_unit_renaming_declaration) is hidden from all visibility 
  12424.            except at places that are within its declarative region or within 
  12425.            the scope of a with_clause that mentions it. For each declaration or 
  12426.            renaming of a generic unit as a child of some parent generic 
  12427.            package, there is a corresponding declaration nested immediately 
  12428.            within each instance of the parent. Such a nested declaration is 
  12429.            hidden from all visibility except at places that are within the 
  12430.            scope of a with_clause that mentions the child. 
  12431.  
  12432.    1. A declaration with a defining_identifier or defining_operator_symbol is 
  12433.       immediately visible (and hence directly visible) within its immediate 
  12434.       scope except where hidden from direct visibility, as follows: 
  12435.  
  12436.         a. A declaration is hidden from direct visibility within the immediate 
  12437.            scope of a homograph of the declaration, if the homograph occurs 
  12438.            within an inner declarative region; 
  12439.  
  12440.         b. A declaration is also hidden from direct visibility where hidden 
  12441.            from all visibility. 
  12442.  
  12443.   Name Resolution Rules
  12444.  
  12445.    1. A direct_name shall resolve to denote a directly visible declaration 
  12446.       whose defining name is the same as the direct_name. A selector_name shall 
  12447.       resolve to denote a visible declaration whose defining name is the same 
  12448.       as the selector_name. 
  12449.  
  12450.    2. These rules on visibility and direct visibility do not apply in a 
  12451.       context_clause, a parent_unit_name, or a pragma that appears at the place 
  12452.       of a compilation_unit. For those contexts, see the rules in 10.1.6: 
  12453.       ``Environment-Level Visibility Rules''. 
  12454.  
  12455.             Legality Rules
  12456.  
  12457.    3. An explicit declaration is illegal if there is a homograph occurring 
  12458.       immediately within the same declarative region that is visible at the 
  12459.       place of the declaration, and is not hidden from all visibility by the 
  12460.       explicit declaration. Similarly, the context_clause for a subunit is 
  12461.       illegal if it mentions (in a with_clause) some library unit, and there is 
  12462.       a homograph of the library unit that is visible at the place of the 
  12463.       corresponding stub, and the homograph and the mentioned library unit are 
  12464.       both declared immediately within the same declarative region. These rules 
  12465.       also apply to dispatching operations declared in the visible part of an 
  12466.       instance of a generic unit. However, they do not apply to other 
  12467.       overloadable declarations in an instance; such declarations may have type 
  12468.       conformant profiles in the instance, so long as the corresponding 
  12469.       declarations in the generic were not type conformant. 
  12470.  
  12471.       NOTES 
  12472.  
  12473.    4. (5) Visibility for compilation units follows from the definition of the 
  12474.       environment in 10.1.4, except that it is necessary to apply a with_clause 
  12475.       to obtain visibility to a library_unit_declaration or 
  12476.       library_unit_renaming_declaration. 
  12477.  
  12478.    5. (6) In addition to the visibility rules given above, the meaning of the 
  12479.       occurrence of a direct_name or selector_name at a given place in the text 
  12480.       can depend on the overloading rules, see 8.6. 
  12481.  
  12482.    6. (7) Not all contexts where an identifier, character_literal, or 
  12483.       operator_symbol are allowed require visibility of a corresponding 
  12484.       declaration. Contexts where visibility is not required are identified by 
  12485.       using one of these three syntactic categories directly in a syntax rule, 
  12486.       rather than using direct_name or selector_name. 
  12487.  
  12488.  
  12489. ΓòÉΓòÉΓòÉ 11.4. Use Clauses ΓòÉΓòÉΓòÉ
  12490.  
  12491.    1. A use_package_clause achieves direct visibility of declarations that 
  12492.       appear in the visible part of a package; a use_type_clause achieves 
  12493.       direct visibility of the primitive operators of a type. 
  12494.  
  12495.             Syntax
  12496.  
  12497.          2.
  12498.  
  12499.                       use_clause ::= use_package_clause | use_type_clause
  12500.  
  12501.          3.
  12502.  
  12503.                       use_package_clause ::= use package_name {, package_name};
  12504.  
  12505.          4.
  12506.  
  12507.                       use_type_clause ::= use type subtype_mark {, subtype_mark};
  12508.  
  12509.   Legality Rules
  12510.  
  12511.    5. A package_name of a use_package_clause shall denote a package. 
  12512.  
  12513.             Static Semantics
  12514.  
  12515.    6. For each use_clause, there is a certain region of text called the scope 
  12516.       of the use_clause. For a use_clause within a context_clause of a 
  12517.       library_unit_declaration or library_unit_renaming_declaration, the scope 
  12518.       is the entire declarative region of the declaration. For a use_clause 
  12519.       within a context_clause of a body, the scope is the entire body and any 
  12520.       subunits (including multiply nested subunits). The scope does not include 
  12521.       context_clauses themselves. 
  12522.  
  12523.    7. For a use_clause immediately within a declarative region, the scope is 
  12524.       the portion of the declarative region starting just after the use_clause 
  12525.       and extending to the end of the declarative region. However, the scope of 
  12526.       a use_clause in the private part of a library unit does not include the 
  12527.       visible part of any public descendant of that library unit. 
  12528.  
  12529.    8. For each package denoted by a package_name of a use_package_clause whose 
  12530.       scope encloses a place, each declaration that occurs immediately within 
  12531.       the declarative region of the package is potentially use-visible at this 
  12532.       place if the declaration is visible at this place. For each type T or 
  12533.       T'Class determined by a subtype_mark of a use_type_clause whose scope 
  12534.       encloses a place, the declaration of each primitive operator of type T is 
  12535.       potentially use-visible at this place if its declaration is visible at 
  12536.       this place. 
  12537.  
  12538.    9. A declaration is use-visible if it is potentially use-visible, except in 
  12539.       these naming-conflict cases: 
  12540.  
  12541.         a. A potentially use-visible declaration is not use-visible if the 
  12542.            place considered is within the immediate scope of a homograph of the 
  12543.            declaration. 
  12544.  
  12545.         b. Potentially use-visible declarations that have the same identifier 
  12546.            are not use-visible unless each of them is an overloadable 
  12547.            declaration. 
  12548.  
  12549.   Dynamic Semantics
  12550.  
  12551.    1. The elaboration of a use_clause has no effect. 
  12552.  
  12553.             Examples
  12554.  
  12555.    2. Example of a use clause in a context clause: 
  12556.  
  12557.          3.
  12558.  
  12559.                       with Ada.Calendar; use Ada;
  12560.  
  12561.          4.
  12562.  
  12563.                       Example of a use type clause:
  12564.  
  12565.          5.
  12566.  
  12567.                       use type Rational_Numbers.Rational;  --  see 7.1
  12568.                       Two_Thirds: Rational_Numbers.Rational := 2/3;
  12569.  
  12570.  
  12571. ΓòÉΓòÉΓòÉ 11.5. Renaming Declarations ΓòÉΓòÉΓòÉ
  12572.  
  12573.    1. A renaming_declaration declares another name for an entity, such as an 
  12574.       object, exception, package, subprogram, entry, or generic unit. 
  12575.       Alternatively, a subprogram_renaming_declaration can be the completion of 
  12576.       a previous subprogram_declaration. 
  12577.  
  12578.             Syntax
  12579.  
  12580.          2.
  12581.  
  12582.                       renaming_declaration ::=
  12583.                          object_renaming_declaration
  12584.                         | exception_renaming_declaration
  12585.                         | package_renaming_declaration
  12586.                         | subprogram_renaming_declaration
  12587.                         | generic_renaming_declaration
  12588.  
  12589.   Dynamic Semantics
  12590.  
  12591.    3. The elaboration of a renaming_declaration evaluates the name that follows 
  12592.       the reserved word renames and thereby determines the view and entity 
  12593.       denoted by this name (the renamed view and renamed entity). A name that 
  12594.       denotes the renaming_declaration denotes (a new view of) the renamed 
  12595.       entity. 
  12596.  
  12597.       NOTES 
  12598.  
  12599.    4. (8) Renaming may be used to resolve name conflicts and to act as a 
  12600.       shorthand. Renaming with a different identifier or operator_symbol does 
  12601.       not hide the old name; the new name and the old name need not be visible 
  12602.       at the same places. 
  12603.  
  12604.    5. (9) A task or protected object that is declared by an explicit 
  12605.       object_declaration can be renamed as an object. However, a single task or 
  12606.       protected object cannot be renamed since the corresponding type is 
  12607.       anonymous (meaning it has no nameable subtypes). For similar reasons, an 
  12608.       object of an anonymous array or access type cannot be renamed. 
  12609.  
  12610.    6. (10) A subtype defined without any additional constraint can be used to 
  12611.       achieve the effect of renaming another subtype (including a task or 
  12612.       protected subtype) as in 
  12613.  
  12614.          7.
  12615.  
  12616.                       subtype Mode is Ada.Text_IO.File_Mode;
  12617.  
  12618.  8.5.1                         Object Renaming Declarations 
  12619.  8.5.2                         Exception Renaming Declarations 
  12620.  8.5.3                         Package Renaming Declarations 
  12621.  8.5.4                         Subprogram Renaming Declarations 
  12622.  8.5.5                         Generic Renaming Declarations 
  12623.  
  12624.  
  12625. ΓòÉΓòÉΓòÉ 11.5.1. Object Renaming Declarations ΓòÉΓòÉΓòÉ
  12626.  
  12627.    1. An object_renaming_declaration is used to rename an object. 
  12628.  
  12629.             Syntax
  12630.  
  12631.          2.
  12632.  
  12633.                       object_renaming_declaration ::=
  12634.                         defining_identifier : subtype_mark renames object_name;
  12635.  
  12636.   Name Resolution Rules
  12637.  
  12638.    3. The type of the object_name shall resolve to the type determined by the 
  12639.       subtype_mark. 
  12640.  
  12641.             Legality Rules
  12642.  
  12643.    4. The renamed entity shall be an object. 
  12644.  
  12645.    5. The renamed entity shall not be a subcomponent that depends on 
  12646.       discriminants of a variable whose nominal subtype is unconstrained, 
  12647.       unless this subtype is indefinite, or the variable is aliased. A slice of 
  12648.       an array shall not be renamed if this restriction disallows renaming of 
  12649.       the array. 
  12650.  
  12651.             Static Semantics
  12652.  
  12653.    6. An object_renaming_declaration declares a new view of the renamed object 
  12654.       whose properties are identical to those of the renamed view. Thus, the 
  12655.       properties of the renamed object are not affected by the 
  12656.       renaming_declaration. In particular, its value and whether or not it is a 
  12657.       constant are unaffected; similarly, the constraints that apply to an 
  12658.       object are not affected by renaming (any constraint implied by the 
  12659.       subtype_mark of the object_renaming_declaration is ignored). 
  12660.  
  12661.             Examples
  12662.  
  12663.    7. Example of renaming an object: 
  12664.  
  12665.          8.
  12666.  
  12667.                       declare
  12668.                         L : Person renames Leftmost_Person;  --  see 3.10.1
  12669.                       begin
  12670.                         L.Age := L.Age + 1;
  12671.                       end;
  12672.  
  12673.  
  12674. ΓòÉΓòÉΓòÉ 11.5.2. Exception Renaming Declarations ΓòÉΓòÉΓòÉ
  12675.  
  12676.    1. An exception_renaming_declaration is used to rename an exception. 
  12677.  
  12678.             Syntax
  12679.  
  12680.          2.
  12681.  
  12682.                       exception_renaming_declaration ::=
  12683.                         defining_identifier : exception renames exception_name;
  12684.  
  12685.   Legality Rules
  12686.  
  12687.    3. The renamed entity shall be an exception. 
  12688.  
  12689.             Static Semantics
  12690.  
  12691.    4. An exception_renaming_declaration declares a new view of the renamed 
  12692.       exception. 
  12693.  
  12694.             Examples
  12695.  
  12696.    5. Example of renaming an exception: 
  12697.  
  12698.          6.
  12699.  
  12700.                       EOF : exception renames Ada.IO_Exceptions.End_Error;
  12701.                       --  see A.13
  12702.  
  12703.  
  12704. ΓòÉΓòÉΓòÉ 11.5.3. Package Renaming Declarations ΓòÉΓòÉΓòÉ
  12705.  
  12706.    1. A package_renaming_declaration is used to rename a package. 
  12707.  
  12708.             Syntax
  12709.  
  12710.          2.
  12711.  
  12712.                       package_renaming_declaration ::=
  12713.                         package defining_program_unit_name renames package_name;
  12714.  
  12715.   Legality Rules
  12716.  
  12717.    3. The renamed entity shall be a package. 
  12718.  
  12719.             Static Semantics
  12720.  
  12721.    4. A package_renaming_declaration declares a new view of the renamed 
  12722.       package. 
  12723.  
  12724.             Examples
  12725.  
  12726.    5. Example of renaming a package: 
  12727.  
  12728.          6.
  12729.  
  12730.                       package TM renames Table_Manager;
  12731.  
  12732.  
  12733. ΓòÉΓòÉΓòÉ 11.5.4. Subprogram Renaming Declarations ΓòÉΓòÉΓòÉ
  12734.  
  12735.    1. A subprogram_renaming_declaration can serve as the completion of a 
  12736.       subprogram_declaration; such a renaming_declaration is called a 
  12737.       renaming-as-body. A subprogram_renaming_declaration that is not a 
  12738.       completion is called a renaming-as-declaration, and is used to rename a 
  12739.       subprogram (possibly an enumeration literal) or an entry. 
  12740.  
  12741.             Syntax
  12742.  
  12743.          2.
  12744.  
  12745.                       subprogram_renaming_declaration ::=
  12746.                         subprogram_specification renames callable_entity_name;
  12747.  
  12748.   Name Resolution Rules
  12749.  
  12750.    3. The expected profile for the callable_entity_name is the profile given in 
  12751.       the subprogram_specification. 
  12752.  
  12753.             Legality Rules
  12754.  
  12755.    4. The profile of a renaming-as-declaration shall be mode-conformant with 
  12756.       that of the renamed callable entity. 
  12757.  
  12758.    5. The profile of a renaming-as-body shall be subtype-conformant with that 
  12759.       of the renamed callable entity, and shall conform fully to that of the 
  12760.       declaration it completes. If the renaming-as-body completes that 
  12761.       declaration before the subprogram it declares is frozen, the subprogram 
  12762.       it declares takes its convention from the renamed subprogram; otherwise 
  12763.       the convention of the renamed subprogram shall not be Intrinsic. 
  12764.  
  12765.    6. A name that denotes a formal parameter of the subprogram_specification is 
  12766.       not allowed within the callable_entity_name. 
  12767.  
  12768.             Static Semantics
  12769.  
  12770.    7. A renaming-as-declaration declares a new view of the renamed entity. The 
  12771.       profile of this new view takes its subtypes, parameter modes, and calling 
  12772.       convention from the original profile of the callable entity, while taking 
  12773.       the formal parameter names and default_expressions from the profile given 
  12774.       in the subprogram_renaming_declaration. The new view is a function or 
  12775.       procedure, never an entry. 
  12776.  
  12777.             Dynamic Semantics
  12778.  
  12779.    8. For a call on a renaming of a dispatching subprogram that is overridden, 
  12780.       if the overriding occurred before the renaming, then the body executed is 
  12781.       that of the overriding declaration, even if the overriding declaration is 
  12782.       not visible at the place of the renaming; otherwise, the inherited or 
  12783.       predefined subprogram is called. 
  12784.  
  12785.       NOTES 
  12786.  
  12787.    9. (11) A procedure can only be renamed as a procedure. A function whose 
  12788.       defining_designator is either an identifier or an operator_symbol can be 
  12789.       renamed with either an identifier or an operator_symbol; for renaming as 
  12790.       an operator, the subprogram specification given in the 
  12791.       renaming_declaration is subject to the rules given in 6.6, for operator 
  12792.       declarations. Enumeration literals can be renamed as functions; 
  12793.       similarly, attribute_references that denote functions (such as references 
  12794.       to Succ and Pred) can be renamed as functions. An entry can only be 
  12795.       renamed as a procedure; the new name is only allowed to appear in 
  12796.       contexts that allow a procedure name. An entry of a family can be 
  12797.       renamed, but an entry family cannot be renamed as a whole. 
  12798.  
  12799.   10. (12) The operators of the root numeric types cannot be renamed because 
  12800.       the types in the profile are anonymous, so the corresponding 
  12801.       specifications cannot be written; the same holds for certain attributes, 
  12802.       such as Pos. 
  12803.  
  12804.   11. (13) Calls with the new name of a renamed entry are 
  12805.       procedure_call_statements and are not allowed at places where the syntax 
  12806.       requires an entry_call_statement in conditional_ and timed_entry_calls, 
  12807.       nor in an asynchronous_select; similarly, the Count attribute is not 
  12808.       available for the new name. 
  12809.  
  12810.   12. (14) The primitiveness of a renaming-as-declaration is determined by its 
  12811.       profile, and by where it occurs, as for any declaration of (a view of) a 
  12812.       subprogram; primitiveness is not determined by the renamed view. In order 
  12813.       to perform a dispatching call, the subprogram name has to denote a 
  12814.       primitive subprogram, not a non-primitive renaming of a primitive 
  12815.       subprogram. 
  12816.  
  12817.             Examples
  12818.  
  12819.   13. Examples of subprogram renaming declarations: 
  12820.  
  12821.         14.
  12822.  
  12823.                       procedure My_Write(C : in Character) renames Pool(K).Write;
  12824.                       --  see 4.1.3
  12825.  
  12826.         15.
  12827.  
  12828.                       function Real_Plus(Left, Right : Real  ) return Real   renames "+";
  12829.                       function Int_Plus (Left, Right : Integer) return Integer renames "+";
  12830.  
  12831.         16.
  12832.  
  12833.                       function Rouge return Color renames Red;  --  see 3.5.1
  12834.                       function Rot  return Color renames Red;
  12835.                       function Rosso return Color renames Rouge;
  12836.  
  12837.         17.
  12838.  
  12839.                       function Next(X : Color) return Color renames Color'Succ;
  12840.                       --  see 3.5.1
  12841.  
  12842.   18. Example of a subprogram renaming declaration with new parameter names: 
  12843.  
  12844.         19.
  12845.  
  12846.                       function "*" (X,Y : Vector) return Real renames Dot_Product;
  12847.                       --  see 6.1
  12848.  
  12849.   20. Example of a subprogram renaming declaration with a new default 
  12850.       expression: 
  12851.  
  12852.         21.
  12853.  
  12854.                       function Minimum(L : Link := Head) return Cell renames Min_Cell;
  12855.                       --  see 6.1
  12856.  
  12857.  
  12858. ΓòÉΓòÉΓòÉ 11.5.5. Generic Renaming Declarations ΓòÉΓòÉΓòÉ
  12859.  
  12860.   A generic_renaming_declaration is used to rename a generic unit. 
  12861.  
  12862.   Syntax
  12863.  
  12864.          1.
  12865.  
  12866.                       generic_renaming_declaration ::=
  12867.                         generic package defining_program_unit_name renames
  12868.                          generic_package_name;
  12869.                        | generic procedure defining_program_unit_name renames
  12870.                          generic_procedure_name;
  12871.                        | generic function defining_program_unit_name renames
  12872.                          generic_function_name;
  12873.  
  12874.   Legality Rules
  12875.  
  12876.    2. The renamed entity shall be a generic unit of the corresponding kind. 
  12877.  
  12878.             Static Semantics
  12879.  
  12880.    3. A generic_renaming_declaration declares a new view of the renamed generic 
  12881.       unit. 
  12882.  
  12883.       NOTES 
  12884.  
  12885.    4. (15) Although the properties of the new view are the same as those of the 
  12886.       renamed view, the place where the generic_renaming_declaration occurs may 
  12887.       affect the legality of subsequent renamings and instantiations that 
  12888.       denote the generic_renaming_declaration, in particular if the renamed 
  12889.       generic unit is a library unit, see 10.1.1. 
  12890.  
  12891.             Examples
  12892.  
  12893.    5. Example of renaming a generic unit: 
  12894.  
  12895.          6.
  12896.  
  12897.                       generic package Enum_IO renames Ada.Text_IO.Enumeration_IO;
  12898.                       --  see A.10.10
  12899.  
  12900.  
  12901. ΓòÉΓòÉΓòÉ 11.6. The Context of Overload Resolution ΓòÉΓòÉΓòÉ
  12902.  
  12903.    1. Because declarations can be overloaded, it is possible for an occurrence 
  12904.       of a usage name to have more than one possible interpretation; in most 
  12905.       cases, ambiguity is disallowed. This clause describes how the possible 
  12906.       interpretations resolve to the actual interpretation. 
  12907.  
  12908.    2. Certain rules of the language (the Name Resolution Rules) are considered 
  12909.       ``overloading rules''. If a possible interpretation violates an 
  12910.       overloading rule, it is assumed not to be the intended interpretation; 
  12911.       some other possible interpretation is assumed to be the actual 
  12912.       interpretation. On the other hand, violations of non-overloading rules do 
  12913.       not affect which interpretation is chosen; instead, they cause the 
  12914.       construct to be illegal. To be legal, there usually has to be exactly one 
  12915.       acceptable interpretation of a construct that is a ``complete context'', 
  12916.       not counting any nested complete contexts. 
  12917.  
  12918.    3. The syntax rules of the language and the visibility rules given in 8.3, 
  12919.       determine the possible interpretations. Most type checking rules (rules 
  12920.       that require a particular type, or a particular class of types, for 
  12921.       example) are overloading rules. Various rules for the matching of formal 
  12922.       and actual parameters are overloading rules. 
  12923.  
  12924.             Name Resolution Rules
  12925.  
  12926.    4. Overload resolution is applied separately to each complete context, not 
  12927.       counting inner complete contexts. Each of the following constructs is a 
  12928.       complete context: 
  12929.  
  12930.         a. A context_item. 
  12931.  
  12932.         b. declarative_item or declaration. 
  12933.  
  12934.         c. A statement. 
  12935.  
  12936.         d. A pragma_argument_association. 
  12937.  
  12938.         e. The expression of a case_statement. 
  12939.  
  12940.    1. An (overall) interpretation of a complete context embodies its meaning, 
  12941.       and includes the following information about the constituents of the 
  12942.       complete context, not including constituents of inner complete contexts: 
  12943.  
  12944.         a. for each constituent of the complete context, to which syntactic 
  12945.            categories it belongs, and by which syntax rules; and 
  12946.  
  12947.         b. for each usage name, which declaration it denotes (and, therefore, 
  12948.            which view and which entity it denotes); and 
  12949.  
  12950.         c. for a complete context that is a declarative_item, whether or not it 
  12951.            is a completion of a declaration, and (if so) which declaration it 
  12952.            completes. 
  12953.  
  12954.    1. A possible interpretation is one that obeys the syntax rules and the 
  12955.       visibility rules. An acceptable interpretation is a possible 
  12956.       interpretation that obeys the overloading rules, that is, those rules 
  12957.       that specify an expected type or expected profile, or specify how a 
  12958.       construct shall resolve or be interpreted. 
  12959.  
  12960.    2. The interpretation of a constituent of a complete context is determined 
  12961.       from the overall interpretation of the complete context as a whole. Thus, 
  12962.       for example, ``interpreted as a function_call,'' means that the 
  12963.       construct's interpretation says that it belongs to the syntactic category 
  12964.       function_call. 
  12965.  
  12966.    3. Each occurrence of a usage name denotes the declaration determined by its 
  12967.       interpretation. It also denotes the view declared by its denoted 
  12968.       declaration, except in the following cases: 
  12969.  
  12970.         a. If a usage name appears within the declarative region of a 
  12971.            type_declaration and denotes that same type_declaration, then it 
  12972.            denotes the current instance of the type (rather than the type 
  12973.            itself). The current instance of a type is the object or value of 
  12974.            the type that is associated with the execution that evaluates the 
  12975.            usage name. 
  12976.  
  12977.         b. If a usage name appears within the declarative region of a 
  12978.            generic_declaration (but not within its generic_formal_part) and it 
  12979.            denotes that same generic_declaration, then it denotes the current 
  12980.            instance of the generic unit (rather than the generic unit itself). 
  12981.            See also 12.3. 
  12982.  
  12983.    1. A usage name that denotes a view also denotes the entity of that view. 
  12984.  
  12985.    2. The expected type for a given expression, name, or other construct 
  12986.       determines, according to the type resolution rules given below, the types 
  12987.       considered for the construct during overload resolution. The type 
  12988.       resolution rules provide support for class-wide programming, universal 
  12989.       numeric literals, dispatching operations, and anonymous access types: 
  12990.  
  12991.         a. If a construct is expected to be of any type in a class of types, or 
  12992.            of the universal or class-wide type for a class, then the type of 
  12993.            the construct shall resolve to a type in that class or to a 
  12994.            universal type that covers the class. 
  12995.  
  12996.         b. If the expected type for a construct is a specific type T, then the 
  12997.            type of the construct shall resolve either to T, or: 
  12998.  
  12999.              1. to T'Class; or 
  13000.  
  13001.              2. to a universal type that covers T; or 
  13002.  
  13003.              3. when T is an anonymous access type, see 3.10, with designated 
  13004.                 type D, to an access-to-variable type whose designated type is 
  13005.                 D'Class or is covered by D. 
  13006.  
  13007.    1. In certain contexts, such as in a subprogram_renaming_declaration, the 
  13008.       Name Resolution Rules define an expected profile for a given name; in 
  13009.       such cases, the name shall resolve to the name of a callable entity whose 
  13010.       profile is type conformant with the expected profile. 
  13011.  
  13012.             Legality Rules
  13013.  
  13014.    2. When the expected type for a construct is required to be a single type in 
  13015.       a given class, the type expected for the construct shall be determinable 
  13016.       solely from the context in which the construct appears, excluding the 
  13017.       construct itself, but using the requirement that it be in the given 
  13018.       class; the type of the construct is then this single expected type. 
  13019.       Furthermore, the context shall not be one that expects any type in some 
  13020.       class that contains types of the given class; in particular, the 
  13021.       construct shall not be the operand of a type_conversion. 
  13022.  
  13023.    3. A complete context shall have at least one acceptable interpretation; if 
  13024.       there is exactly one, then that one is chosen. 
  13025.  
  13026.    4. There is a preference for the primitive operators (and ranges) of the 
  13027.       root numeric types root_integer and root_real. In particular, if two 
  13028.       acceptable interpretations of a constituent of a complete context differ 
  13029.       only in that one is for a primitive operator (or range) of the type 
  13030.       root_integer or root_real, and the other is not, the interpretation using 
  13031.       the primitive operator (or range) of the root numeric type is preferred. 
  13032.  
  13033.    5. For a complete context, if there is exactly one overall acceptable 
  13034.       interpretation where each constituent's interpretation is the same as or 
  13035.       preferred (in the above sense) over those in all other overall acceptable 
  13036.       interpretations, then that one overall acceptable interpretation is 
  13037.       chosen. Otherwise, the complete context is ambiguous. 
  13038.  
  13039.    6. A complete context other than a pragma_argument_association shall not be 
  13040.       ambiguous. 
  13041.  
  13042.    7. A complete context that is a pragma_argument_association is allowed to be 
  13043.       ambiguous (unless otherwise specified for the particular pragma), but 
  13044.       only if every acceptable interpretation of the pragma argument is as a 
  13045.       name that statically denotes a callable entity. Such a name denotes all 
  13046.       of the declarations determined by its interpretations, and all of the 
  13047.       views declared by these declarations. 
  13048.  
  13049.          NOTES 
  13050.  
  13051.    8. (16) If a usage name has only one acceptable interpretation, then it 
  13052.       denotes the corresponding entity. However, this does not mean that the 
  13053.       usage name is necessarily legal since other requirements exist which are 
  13054.       not considered for overload resolution; for example, the fact that an 
  13055.       expression is static, whether an object is constant, mode and subtype 
  13056.       conformance rules, freezing rules, order of elaboration, and so on. 
  13057.  
  13058.    9. Similarly, subtypes are not considered for overload resolution (the 
  13059.       violation of a constraint does not make a program illegal but raises an 
  13060.       exception during program execution). 
  13061.  
  13062.  
  13063. ΓòÉΓòÉΓòÉ 12. Tasks and Synchronization ΓòÉΓòÉΓòÉ
  13064.  
  13065.    1. The execution of an Ada program consists of the execution of one or more 
  13066.       tasks. Each task represents a separate thread of control that proceeds 
  13067.       independently and concurrently between the points where it interacts with 
  13068.       other tasks. The various forms of task interaction are described in this 
  13069.       section, and include: 
  13070.  
  13071.         a. the activation and termination of a task; 
  13072.  
  13073.         b. a call on a protected subprogram of a protected object, providing 
  13074.            exclusive read-write access, or concurrent read-only access to 
  13075.            shared data; 
  13076.  
  13077.         c. a call on an entry, either of another task, allowing for synchronous 
  13078.            communication with that task, or of a protected object, allowing for 
  13079.            asynchronous communication with one or more other tasks using that 
  13080.            same protected object; 
  13081.  
  13082.         d. a timed operation, including a simple delay statement, a timed entry 
  13083.            call or accept, or a timed asynchronous select statement (see next 
  13084.            item); 
  13085.  
  13086.         e. an asynchronous transfer of control as part of an asynchronous 
  13087.            select statement, where a task stops what it is doing and begins 
  13088.            execution at a different point in response to the completion of an 
  13089.            entry call or the expiration of a delay; 
  13090.  
  13091.         f. an abort statement, allowing one task to cause the termination of 
  13092.            another task. 
  13093.  
  13094.    1. In addition, tasks can communicate indirectly by reading and updating 
  13095.       (unprotected) shared variables, presuming the access is properly 
  13096.       synchronized through some other kind of task interaction. 
  13097.  
  13098.             Static Semantics
  13099.  
  13100.    2. The properties of a task are defined by a corresponding task declaration 
  13101.       and task_body, which together define a program unit called a task unit. 
  13102.  
  13103.             Dynamic Semantics
  13104.  
  13105.    3. Over time, tasks proceed through various states. A task is initially 
  13106.       inactive; upon activation, and prior to its termination it is either 
  13107.       blocked (as part of some task interaction) or ready to run. While ready, 
  13108.       a task competes for the available execution resources that it requires to 
  13109.       run. 
  13110.  
  13111.       NOTES 
  13112.  
  13113.    4. (1) Concurrent task execution may be implemented on multicomputers, 
  13114.       multiprocessors, or with interleaved execution on a single physical 
  13115.       processor. On the other hand, whenever an implementation can determine 
  13116.       that the required semantic effects can be achieved when parts of the 
  13117.       execution of a given task are performed by different physical processors 
  13118.       acting in parallel, it may choose to perform them in this way. 
  13119.  
  13120.  9.1                           Task Units and Task Objects 
  13121.  9.2                           Task Execution - Task Activation 
  13122.  9.3                           Task Dependence - Termination of Tasks 
  13123.  9.4                           Protected Units and Protected Objects 
  13124.  9.5                           Intertask Communication 
  13125.  9.6                           Delay Statements, Duration, and Time 
  13126.  9.7                           Select Statements 
  13127.  9.8                           Abort of a Task - Abort of a Sequence of 
  13128.                                Statements 
  13129.  9.9                           Task and Entry Attributes 
  13130.  9.10                          Shared Variables 
  13131.  9.11                          Example of Tasking and Synchronization --- The 
  13132.                                Detailed Node Listing --- 
  13133.  9.1                           Task Units and Task Objects 
  13134.  9.2                           Task Execution - Task Activation 
  13135.  9.3                           Task Dependence - Termination of Tasks 
  13136.  9.4                           Protected Units and Protected Objects 
  13137.  9.5                           Intertask Communication 
  13138.  9.5.1                         Protected Subprograms and Protected Actions 
  13139.  9.5.2                         Entries and Accept Statements 
  13140.  9.5.3                         Entry Calls 
  13141.  9.5.4                         Requeue Statements 
  13142.  9.6                           Delay Statements, Duration, and Time 
  13143.  9.7                           Select Statements 
  13144.  9.7.1                         Selective Accept 
  13145.  9.7.2                         Timed Entry Calls 
  13146.  9.7.3                         Conditional Entry Calls 
  13147.  9.7.4                         Asynchronous Transfer of Control 
  13148.  9.8                           Abort of a Task - Abort of a Sequence of 
  13149.                                Statements 
  13150.  9.9                           Task and Entry Attributes 
  13151.  9.10                          Shared Variables 
  13152.  9.11                          Example of Tasking and Synchronization 
  13153.  
  13154.  
  13155. ΓòÉΓòÉΓòÉ 12.1. Task Units and Task Objects ΓòÉΓòÉΓòÉ
  13156.  
  13157.    1. A task unit is declared by a task declaration, which has a corresponding 
  13158.       task_body. A task declaration may be a task_type_declaration, in which 
  13159.       case it declares a named task type; alternatively, it may be a 
  13160.       single_task_declaration, in which case it defines an anonymous task type, 
  13161.       as well as declaring a named task object of that type. 
  13162.  
  13163.             Syntax
  13164.  
  13165.          2.
  13166.  
  13167.                       task_type_declaration ::=
  13168.                         task type defining_identifier [known_discriminant_part]
  13169.                          [is task_definition];
  13170.  
  13171.          3.
  13172.  
  13173.                       single_task_declaration ::=
  13174.                         task defining_identifier [is task_definition];
  13175.  
  13176.          4.
  13177.  
  13178.                       task_definition ::=
  13179.                          {task_item}
  13180.                         [ private
  13181.                          {task_item}]
  13182.                         end [task_identifier]
  13183.  
  13184.          5.
  13185.  
  13186.                       task_item ::= entry_declaration | representation_clause
  13187.  
  13188.          6.
  13189.  
  13190.                       task_body ::=
  13191.                         task body defining_identifier is
  13192.                          declarative_part
  13193.                         begin
  13194.                          handled_sequence_of_statements
  13195.                         end [task_identifier];
  13196.  
  13197.         a. If a task_identifier appears at the end of a task_definition or 
  13198.            task_body, it shall repeat the defining_identifier. 
  13199.  
  13200.   Legality Rules
  13201.  
  13202.    1. A task declaration requires a completion, which shall be a task_body, and 
  13203.       every task_body shall be the completion of some task declaration. 
  13204.  
  13205.             Static Semantics
  13206.  
  13207.    2. A task_definition defines a task type and its first subtype. The first 
  13208.       list of task_items of a task_definition, together with the 
  13209.       known_discriminant_part, if any, is called the visible part of the task 
  13210.       unit. The optional list of task_items after the reserved word private is 
  13211.       called the private part of the task unit. 
  13212.  
  13213.             Dynamic Semantics
  13214.  
  13215.    3. The elaboration of a task declaration elaborates the task_definition. The 
  13216.       elaboration of a single_task_declaration also creates an object of an 
  13217.       (anonymous) task type. 
  13218.  
  13219.    4. The elaboration of a task_definition creates the task type and its first 
  13220.       subtype; it also includes the elaboration of the entry_declarations in 
  13221.       the given order. 
  13222.  
  13223.    5. As part of the initialization of a task object, any 
  13224.       representation_clauses and any per-object constraints associated with 
  13225.       entry_declarations of the corresponding task_definition are elaborated in 
  13226.       the given order. 
  13227.  
  13228.    6. The elaboration of a task_body has no effect other than to establish that 
  13229.       tasks of the type can from then on be activated without failing the 
  13230.       Elaboration_Check. 
  13231.  
  13232.    7. The execution of a task_body is invoked by the activation of a task of 
  13233.       the corresponding type, see 9.2. 
  13234.  
  13235.    8. The content of a task object of a given task type includes: 
  13236.  
  13237.         a. The values of the discriminants of the task object, if any; 
  13238.  
  13239.         b. An entry queue for each entry of the task object; 
  13240.  
  13241.         c. A representation of the state of the associated task. 
  13242.   NOTES 
  13243.  
  13244.    1. (2) Within the declaration or body of a task unit, the name of the task 
  13245.       unit denotes the current instance of the unit, see 8.6, rather than the 
  13246.       first subtype of the corresponding task type (and thus the name cannot be 
  13247.       used as a subtype_mark). 
  13248.  
  13249.    2. (3) The notation of a selected_component can be used to denote a 
  13250.       discriminant of a task, see 4.1.3. Within a task unit, the name of a 
  13251.       discriminant of the task type denotes the corresponding discriminant of 
  13252.       the current instance of the unit. 
  13253.  
  13254.    3. (4) A task type is a limited type, see 7.5, and hence has neither an 
  13255.       assignment operation nor predefined equality operators. If an application 
  13256.       needs to store and exchange task identities, it can do so by defining an 
  13257.       access type designating the corresponding task objects and by using 
  13258.       access values for identification purposes. Assignment is available for 
  13259.       such an access type as for any access type. Alternatively, if the 
  13260.       implementation supports the Systems Programming Annex, the Identity 
  13261.       attribute can be used for task identification, see C.7. 
  13262.  
  13263.             Examples
  13264.  
  13265.    4. Examples of declarations of task types: 
  13266.  
  13267.          5.
  13268.  
  13269.                       task type Server is
  13270.                         entry Next_Work_Item(WI : in Work_Item);
  13271.                         entry Shut_Down;
  13272.                       end Server;
  13273.  
  13274.          6.
  13275.  
  13276.                       task type Keyboard_Driver(ID : Keyboard_ID := New_ID) is
  13277.                         entry Read (C : out Character);
  13278.                         entry Write(C : in  Character);
  13279.                       end Keyboard_Driver;
  13280.  
  13281.    7. Examples of declarations of single tasks: 
  13282.  
  13283.          8.
  13284.  
  13285.                       task Controller is
  13286.                         entry Request(Level)(D : Item);  --  a family of entries
  13287.                       end Controller;
  13288.  
  13289.          9.
  13290.  
  13291.                       task Parser is
  13292.                         entry Next_Lexeme(L : in  Lexical_Element);
  13293.                         entry Next_Action(A : out Parser_Action);
  13294.                       end;
  13295.  
  13296.         10.
  13297.  
  13298.                       task User;  --  has no entries
  13299.  
  13300.   11. Examples of task objects: 
  13301.  
  13302.         12.
  13303.  
  13304.                       Agent  : Server;
  13305.                       Teletype : Keyboard_Driver(TTY_ID);
  13306.                       Pool   : array(1 ┬╖┬╖ 10) of Keyboard_Driver;
  13307.  
  13308.   13. Example of access type designating task objects: 
  13309.  
  13310.         14.
  13311.  
  13312.                       type Keyboard is access Keyboard_Driver;
  13313.                       Terminal : Keyboard := new Keyboard_Driver(Term_ID);
  13314.  
  13315.  
  13316. ΓòÉΓòÉΓòÉ 12.2. Task Execution - Task Activation ΓòÉΓòÉΓòÉ
  13317.  
  13318.  
  13319.   Dynamic Semantics
  13320.  
  13321.    1. The execution of a task of a given task type consists of the execution of 
  13322.       the corresponding task_body. The initial part of this execution is called 
  13323.       the activation of the task; it consists of the elaboration of the 
  13324.       declarative_part of the task_body. Should an exception be propagated by 
  13325.       the elaboration of its declarative_part, the activation of the task is 
  13326.       defined to have failed, and it becomes a completed task. 
  13327.  
  13328.    2. A task object (which represents one task) can be created either as part 
  13329.       of the elaboration of an object_declaration occurring immediately within 
  13330.       some declarative region, or as part of the evaluation of an allocator. 
  13331.       All tasks created by the elaboration of object_declarations of a single 
  13332.       declarative region (including subcomponents of the declared objects) are 
  13333.       activated together. Similarly, all tasks created by the evaluation of a 
  13334.       single allocator are activated together. The activation of a task is 
  13335.       associated with the innermost allocator or object_declaration that is 
  13336.       responsible for its creation. 
  13337.  
  13338.    3. For tasks created by the elaboration of object_declarations of a given 
  13339.       declarative region, the activations are initiated within the context of 
  13340.       the handled_sequence_of_statements (and its associated exception_handlers 
  13341.       if any --  see 11.2, just prior to executing the statements of the 
  13342.       _sequence. For a package without an explicit body or an explicit 
  13343.       handled_sequence_of_statements, an implicit body or an implicit 
  13344.       null_statement is assumed, as defined in 7.2. 
  13345.  
  13346.    4. For tasks created by the evaluation of an allocator, the activations are 
  13347.       initiated as the last step of evaluating the allocator, after completing 
  13348.       any initialization for the object created by the allocator, and prior to 
  13349.       returning the new access value. 
  13350.  
  13351.    5. The task that created the new tasks and initiated their activations (the 
  13352.       activator) is blocked until all of these activations complete 
  13353.       (successfully or not). Once all of these activations are complete, if the 
  13354.       activation of any of the tasks has failed (due to the propagation of an 
  13355.       exception), Tasking_Error is raised in the activator, at the place at 
  13356.       which it initiated the activations. Otherwise, the activator proceeds 
  13357.       with its execution normally. Any tasks that are aborted prior to 
  13358.       completing their activation are ignored when determining whether to raise 
  13359.       Tasking_Error. 
  13360.  
  13361.    6. Should the task that created the new tasks never reach the point where it 
  13362.       would initiate the activations (due to an abort or the raising of an 
  13363.       exception), the newly created tasks become terminated and are never 
  13364.       activated. 
  13365.  
  13366.       NOTES 
  13367.  
  13368.    7. (5) An entry of a task can be called before the task has been activated. 
  13369.  
  13370.    8. (6) If several tasks are activated together, the execution of any of 
  13371.       these tasks need not await the end of the activation of the other tasks. 
  13372.  
  13373.    9. (7) A task can become completed during its activation either because of 
  13374.       an exception or because it is aborted, see 9.8. 
  13375.  
  13376.             Examples
  13377.  
  13378.   10. Example of task activation: 
  13379.  
  13380.         11.
  13381.  
  13382.                       procedure P is
  13383.                         A, B : Server;   --  elaborate the task objects A, B
  13384.                         C   : Server;   --  elaborate the task object C
  13385.                       begin
  13386.                         --  the tasks A, B, C are activated together
  13387.                         --  before the first statement
  13388.                         ┬╖┬╖┬╖
  13389.                       end;
  13390.  
  13391.  
  13392. ΓòÉΓòÉΓòÉ 12.3. Task Dependence - Termination of Tasks ΓòÉΓòÉΓòÉ
  13393.  
  13394.  
  13395.   Dynamic Semantics
  13396.  
  13397.    1. Each task (other than an environment task --  see 10.2, depends on one or 
  13398.       more masters, see 7.6.1, as follows: 
  13399.  
  13400.         a. If the task is created by the evaluation of an allocator for a given 
  13401.            access type, it depends on each master that includes the elaboration 
  13402.            of the declaration of the ultimate ancestor of the given access 
  13403.            type. 
  13404.  
  13405.         b. If the task is created by the elaboration of an object_declaration, 
  13406.            it depends on each master that includes this elaboration. 
  13407.  
  13408.    1. Furthermore, if a task depends on a given master, it is defined to depend 
  13409.       on the task that executes the master, and (recursively) on any master of 
  13410.       that task. 
  13411.  
  13412.    2. A task is said to be completed when the execution of its corresponding 
  13413.       task_body is completed. A task is said to be terminated when any 
  13414.       finalization of the task_body has been performed, see 7.6.1. The first 
  13415.       step of finalizing a master (including a task_body) is to wait for the 
  13416.       termination of any tasks dependent on the master. The task executing the 
  13417.       master is blocked until all the dependents have terminated. Any remaining 
  13418.       finalization is then performed and the master is left. 
  13419.  
  13420.    3. Completion of a task (and the corresponding task_body) can occur when the 
  13421.       task is blocked at a select_statement with an an open 
  13422.       terminate_alternative, see 9.7.1, the open terminate_alternative is 
  13423.       selected if and only if the following conditions are satisfied: 
  13424.  
  13425.         a. The task depends on some completed master; 
  13426.  
  13427.         b. Each task that depends on the master considered is either already 
  13428.            terminated or similarly blocked at a select_statement with an open 
  13429.            terminate_alternative. 
  13430.  
  13431.    1. When both conditions are satisfied, the task considered becomes 
  13432.       completed, together with all tasks that depend on the master considered 
  13433.       that are not yet completed. 
  13434.  
  13435.       NOTES 
  13436.  
  13437.    2. (8) The full view of a limited private type can be a task type, or can 
  13438.       have subcomponents of a task type. Creation of an object of such a type 
  13439.       creates dependences according to the full type. 
  13440.  
  13441.    3. (9) An object_renaming_declaration defines a new view of an existing 
  13442.       entity and hence creates no further dependence. 
  13443.  
  13444.    4. (10) The rules given for the collective completion of a group of tasks 
  13445.       all blocked on select_statements with open terminate_alternatives ensure 
  13446.       that the collective completion can occur only when there are no remaining 
  13447.       active tasks that could call one of the tasks being collectively 
  13448.       completed. 
  13449.  
  13450.    5. (11) If two or more tasks are blocked on select_statements with open 
  13451.       terminate_alternatives, and become completed collectively, their 
  13452.       finalization actions proceed concurrently. 
  13453.  
  13454.    6. (12) The completion of a task can occur due to any of the following: 
  13455.  
  13456.         a. the raising of an exception during the elaboration of the 
  13457.            declarative_part of the corresponding task_body; 
  13458.  
  13459.         b. the completion of the handled_sequence_of_statements of the 
  13460.            corresponding task_body; 
  13461.  
  13462.         c. the selection of an open terminate_alternative of a select_statement 
  13463.            in the corresponding task_body; 
  13464.  
  13465.         d. the abort of the task. 
  13466.  
  13467.   Examples
  13468.  
  13469.    1. Example of task dependence: 
  13470.  
  13471.          2.
  13472.  
  13473.                       declare
  13474.                         type Global is access Server; --  see 9.1
  13475.                         A, B : Server;
  13476.                         G   : Global;
  13477.                       begin
  13478.                         --  activation of A and B
  13479.                         declare
  13480.                          type Local is access Server;
  13481.                          X : Global := new Server;  --  activation of X.all
  13482.                          L : Local  := new Server;  --  activation of L.all
  13483.                          C : Server;
  13484.                         begin
  13485.                          --  activation of C
  13486.                          G := X;  --  both G and X designate the same task object
  13487.                          ┬╖┬╖┬╖
  13488.                         end;  --  await termination of C and L.all (but not X.all)
  13489.                         ┬╖┬╖┬╖
  13490.                       end;  --  await termination of A, B, and G.all
  13491.  
  13492.  
  13493. ΓòÉΓòÉΓòÉ 12.4. Protected Units and Protected Objects ΓòÉΓòÉΓòÉ
  13494.  
  13495.    1. A protected object provides coordinated access to shared data, through 
  13496.       calls on its visible protected operations, which can be protected 
  13497.       subprograms or protected entries. A protected unit is declared by a 
  13498.       protected declaration, which has a corresponding protected_body. A 
  13499.       protected declaration may be a protected_type_declaration, in which case 
  13500.       it declares a named protected type; alternatively, it may be a 
  13501.       single_protected_declaration, in which case it defines an anonymous 
  13502.       protected type, as well as declaring a named protected object of that 
  13503.       type. 
  13504.  
  13505.             Syntax
  13506.  
  13507.          2.
  13508.  
  13509.                       protected_type_declaration ::=
  13510.                         protected type defining_identifier [known_discriminant_part] is
  13511.                          protected_definition;
  13512.  
  13513.          3.
  13514.  
  13515.                       single_protected_declaration ::=
  13516.                         protected defining_identifier is protected_definition;
  13517.  
  13518.          4.
  13519.  
  13520.                       protected_definition ::=
  13521.                          { protected_operation_declaration }
  13522.                         [ private
  13523.                          { protected_element_declaration } ]
  13524.                         end [protected_identifier]
  13525.  
  13526.          5.
  13527.  
  13528.                       protected_operation_declaration ::=
  13529.                          subprogram_declaration
  13530.                         | entry_declaration
  13531.                         | representation_clause
  13532.  
  13533.          6.
  13534.  
  13535.                       protected_element_declaration ::=
  13536.                         protected_operation_declaration | component_declaration
  13537.  
  13538.          7.
  13539.  
  13540.                       protected_body ::=
  13541.                         protected body defining_identifier is
  13542.                          { protected_operation_item }
  13543.                         end [protected_identifier];
  13544.  
  13545.          8.
  13546.  
  13547.                       protected_operation_item ::=
  13548.                          subprogram_declaration
  13549.                         | subprogram_body
  13550.                         | entry_body
  13551.                         | representation_clause
  13552.  
  13553.         a. If a protected_identifier appears at the end of a 
  13554.            protected_definition or protected_body, it shall repeat the 
  13555.            defining_identifier. 
  13556.  
  13557.   Legality Rules
  13558.  
  13559.    1. A protected declaration requires a completion, which shall be a 
  13560.       protected_body, and every protected_body shall be the completion of some 
  13561.       protected declaration. 
  13562.  
  13563.             Static Semantics
  13564.  
  13565.    2. A protected_definition defines a protected type and its first subtype. 
  13566.       The list of protected_operation_declarations of a protected_definition, 
  13567.       together with the known_discriminant_part, if any, is called the visible 
  13568.       part of the protected unit. The optional list of 
  13569.       protected_element_declarations after the reserved word private is called 
  13570.       the private part of the protected unit. 
  13571.  
  13572.             Dynamic Semantics
  13573.  
  13574.    3. The elaboration of a protected declaration elaborates the 
  13575.       protected_definition. The elaboration of a single_protected_declaration 
  13576.       also creates an object of an (anonymous) protected type. 
  13577.  
  13578.    4. The elaboration of a protected_definition creates the protected type and 
  13579.       its first subtype; it also includes the elaboration of the 
  13580.       component_declarations and protected_operation_declarations in the given 
  13581.       order. 
  13582.  
  13583.    5. As part of the initialization of a protected object, any per-object 
  13584.       constraints, see 3.8, are elaborated. 
  13585.  
  13586.    6. The elaboration of a protected_body has no other effect than to establish 
  13587.       that protected operations of the type can from then on be called without 
  13588.       failing the Elaboration_Check. 
  13589.  
  13590.    7. The content of an object of a given protected type includes: 
  13591.  
  13592.         a. The values of the components of the protected object, including 
  13593.            (implicitly) an entry queue for each entry declared for the 
  13594.            protected object; 
  13595.  
  13596.         b. A representation of the state of the execution resource associated 
  13597.            with the protected object (one such resource is associated with each 
  13598.            protected object). 
  13599.  
  13600.    1. The execution resource associated with a protected object has to be 
  13601.       acquired to read or update any components of the protected object; it can 
  13602.       be acquired (as part of a protected action --  see 9.5.1, either for 
  13603.       concurrent read-only access, or for exclusive read-write access. 
  13604.  
  13605.    2. As the first step of the finalization of a protected object, each call 
  13606.       remaining on any entry queue of the object is removed from its queue and 
  13607.       Program_Error is raised at the place of the corresponding 
  13608.       entry_call_statement. 
  13609.  
  13610.       NOTES 
  13611.  
  13612.    3. (13) Within the declaration or body of a protected unit, the name of the 
  13613.       protected unit denotes the current instance of the unit, see 8.6, rather 
  13614.       than the first subtype of the corresponding protected type (and thus the 
  13615.       name cannot be used as a subtype_mark). 
  13616.  
  13617.    4. (14) A selected_component can be used to denote a discriminant of a 
  13618.       protected object, see 4.1.3. Within a protected unit, the name of a 
  13619.       discriminant of the protected type denotes the corresponding discriminant 
  13620.       of the current instance of the unit. 
  13621.  
  13622.    5. (15) A protected type is a limited type, see 7.5, and hence has neither 
  13623.       an assignment operation nor predefined equality operators. 
  13624.  
  13625.    6. (16) The bodies of the protected operations given in the protected_body 
  13626.       define the actions that take place upon calls to the protected 
  13627.       operations. 
  13628.  
  13629.    7. (17) The declarations in the private part are only visible within the 
  13630.       private part and the body of the protected unit. 
  13631.  
  13632.             Examples
  13633.  
  13634.    8. Example of declaration of protected type and corresponding body: 
  13635.  
  13636.          9.
  13637.  
  13638.                       protected type Resource is
  13639.                         entry Seize;
  13640.                         procedure Release;
  13641.                       private
  13642.                         Busy : Boolean := False;
  13643.                       end Resource;
  13644.  
  13645.         10.
  13646.  
  13647.                       protected body Resource is
  13648.                         entry Seize when not Busy is
  13649.                         begin
  13650.                          Busy := True;
  13651.                         end Seize;
  13652.  
  13653.         11.
  13654.  
  13655.                         procedure Release is
  13656.                         begin
  13657.                          Busy := False;
  13658.                         end Release;
  13659.                       end Resource;
  13660.  
  13661.   12. Example of a single protected declaration and corresponding body: 
  13662.  
  13663.         13.
  13664.  
  13665.                       protected Shared_Array is
  13666.                         --  Index, Item, and Item_Array are global types
  13667.                         function  Component   (N : in Index) return Item;
  13668.                         procedure Set_Component(N : in Index; E : in  Item);
  13669.                       private
  13670.                         Table : Item_Array(Index) := (others => Null_Item);
  13671.                       end Shared_Array;
  13672.  
  13673.         14.
  13674.  
  13675.                       protected body Shared_Array is
  13676.                         function Component(N : in Index) return Item is
  13677.                         begin
  13678.                          return Table(N);
  13679.                         end Component;
  13680.  
  13681.         15.
  13682.  
  13683.                         procedure Set_Component(N : in Index; E : in Item) is
  13684.                         begin
  13685.                          Table(N) := E;
  13686.                         end Set_Component;
  13687.                       end Shared_Array;
  13688.  
  13689.   16. Examples of protected objects: 
  13690.  
  13691.         17.
  13692.  
  13693.                       Control : Resource;
  13694.                       Flags   : array(1 ┬╖┬╖ 100) of Resource;
  13695.  
  13696.  
  13697. ΓòÉΓòÉΓòÉ 12.5. Intertask Communication ΓòÉΓòÉΓòÉ
  13698.  
  13699.    1. The primary means for intertask communication is provided by calls on 
  13700.       entries and protected subprograms. Calls on protected subprograms allow 
  13701.       coordinated access to shared data objects. Entry calls allow for blocking 
  13702.       the caller until a given condition is satisfied (namely, that the 
  13703.       corresponding entry is open --  see 9.5.3.), and then communicating data 
  13704.       or control information directly with another task or indirectly via a 
  13705.       shared protected object. 
  13706.  
  13707.             Static Semantics
  13708.  
  13709.    2. Any call on an entry or on a protected subprogram identifies a target 
  13710.       object for the operation, which is either a task (for an entry call) or a 
  13711.       protected object (for an entry call or a protected subprogram call). The 
  13712.       target object is considered an implicit parameter to the operation, and 
  13713.       is determined by the operation name (or prefix) used in the call on the 
  13714.       operation, as follows: 
  13715.  
  13716.         a. If it is a direct_name or expanded name that denotes the declaration 
  13717.            (or body) of the operation, then the target object is implicitly 
  13718.            specified to be the current instance of the task or protected unit 
  13719.            immediately enclosing the operation; such a call is defined to be an 
  13720.            internal call; 
  13721.  
  13722.         b. If it is a selected_component that is not an expanded name, then the 
  13723.            target object is explicitly specified to be the task or protected 
  13724.            object denoted by the prefix of the name; such a call is defined to 
  13725.            be an external call; 
  13726.  
  13727.         c. If the name or prefix is a dereference (implicit or explicit) of an 
  13728.            access-to-protected-subprogram value, then the target object is 
  13729.            determined by the prefix of the Access attribute_reference that 
  13730.            produced the access value originally, and the call is defined to be 
  13731.            an external call; 
  13732.  
  13733.         d. If the name or prefix denotes a subprogram_renaming_declaration, 
  13734.            then the target object is as determined by the name of the renamed 
  13735.            entity. 
  13736.  
  13737.    1. A corresponding definition of target object applies to a 
  13738.       requeue_statement, see 9.5.4, with a corresponding distinction between an 
  13739.       internal requeue and an external requeue. 
  13740.  
  13741.             Dynamic Semantics
  13742.  
  13743.    2. Within the body of a protected operation, the current instance (see 8.6) 
  13744.       of the immediately enclosing protected unit is determined by the target 
  13745.       object specified (implicitly or explicitly) in the call (or requeue) on 
  13746.       the protected operation. 
  13747.  
  13748.    3. Any call on a protected procedure or entry of a target protected object 
  13749.       is defined to be an update to the object, as is a requeue on such an 
  13750.       entry. 
  13751.  
  13752.  9.5.1                         Protected Subprograms and Protected Actions 
  13753.  9.5.2                         Entries and Accept Statements 
  13754.  9.5.3                         Entry Calls 
  13755.  9.5.4                         Requeue Statements 
  13756.  
  13757.  
  13758. ΓòÉΓòÉΓòÉ 12.5.1. Protected Subprograms and Protected Actions ΓòÉΓòÉΓòÉ
  13759.  
  13760.    1. A protected subprogram is a subprogram declared immediately within a 
  13761.       protected_definition. Protected procedures provide exclusive read-write 
  13762.       access to the data of a protected object; protected functions provide 
  13763.       concurrent read-only access to the data. 
  13764.  
  13765.             Static Semantics
  13766.  
  13767.    2. Within the body of a protected function (or a function declared 
  13768.       immediately within a protected_body), the current instance of the 
  13769.       enclosing protected unit is defined to be a constant (that is, its 
  13770.       subcomponents may be read but not updated). Within the body of a 
  13771.       protected procedure (or a procedure declared immediately within a 
  13772.       protected_body), and within an entry_body, the current instance is 
  13773.       defined to be a variable (updating is permitted). 
  13774.  
  13775.             Dynamic Semantics
  13776.  
  13777.    3. For the execution of a call on a protected subprogram, the evaluation of 
  13778.       the name or prefix and of the parameter associations, and any assigning 
  13779.       back of in out or out parameters, proceeds as for a normal subprogram 
  13780.       call, see 6.4. If the call is an internal call, see 9.5, the body of the 
  13781.       subprogram is executed as for a normal subprogram call. If the call is an 
  13782.       external call, then the body of the subprogram is executed as part of a 
  13783.       new protected action on the target protected object; the protected action 
  13784.       completes after the body of the subprogram is executed. A protected 
  13785.       action can also be started by an entry call, see 9.5.3. 
  13786.  
  13787.    4. A new protected action is not started on a protected object while another 
  13788.       protected action on the same protected object is underway, unless both 
  13789.       actions are the result of a call on a protected function. This rule is 
  13790.       expressible in terms of the execution resource associated with the 
  13791.       protected object: 
  13792.  
  13793.         a. Starting a protected action on a protected object corresponds to 
  13794.            acquiring the execution resource associated with the protected 
  13795.            object, either for concurrent read-only access if the protected 
  13796.            action is for a call on a protected function, or for exclusive 
  13797.            read-write access otherwise; 
  13798.  
  13799.         b. Completing the protected action corresponds to releasing the 
  13800.            associated execution resource. 
  13801.  
  13802.    1. After performing an operation on a protected object other than a call on 
  13803.       a protected function, but prior to completing the associated protected 
  13804.       action, the entry queues (if any) of the protected object are serviced 
  13805.       (see 9.5.3). 
  13806.  
  13807.             Bounded (Run-Time) Errors
  13808.  
  13809.    2. During a protected action, it is a bounded error to invoke an operation 
  13810.       that is potentially blocking. The following are defined to be potentially 
  13811.       blocking operations: 
  13812.  
  13813.         a. a select_statement; 
  13814.  
  13815.         b. an accept_statement; 
  13816.  
  13817.         c. an entry_call_statement; 
  13818.  
  13819.         d. a delay_statement; 
  13820.  
  13821.         e. an abort_statement; 
  13822.  
  13823.         f. task creation or activation; 
  13824.  
  13825.         g. an external call on a protected subprogram (or an external requeue) 
  13826.            with the same target object as that of the protected action; 
  13827.  
  13828.         h. a call on a subprogram whose body contains a potentially blocking 
  13829.            operation. 
  13830.  
  13831.    1. If the bounded error is detected, Program_Error is raised. If not 
  13832.       detected, the bounded error might result in deadlock or a (nested) 
  13833.       protected action on the same target object. 
  13834.  
  13835.    2. Certain language-defined subprograms are potentially blocking. In 
  13836.       particular, the subprograms of the language-defined input-output packages 
  13837.       that manipulate files (implicitly or explicitly) are potentially 
  13838.       blocking. Other potentially blocking subprograms are identified where 
  13839.       they are defined. When not specified as potentially blocking, a 
  13840.       language-defined subprogram is nonblocking. 
  13841.  
  13842.       NOTES 
  13843.  
  13844.    3. (18) If two tasks both try to start a protected action on a protected 
  13845.       object, and at most one is calling a protected function, then only one of 
  13846.       the tasks can proceed. Although the other task cannot proceed, it is not 
  13847.       considered blocked, and it might be consuming processing resources while 
  13848.       it awaits its turn. There is no language-defined ordering or queuing 
  13849.       presumed for tasks competing to start a protected action -- on a 
  13850.       multiprocessor such tasks might use busy-waiting; for monoprocessor 
  13851.       considerations, see D.3: ``Priority Ceiling Locking''. 
  13852.  
  13853.    4. (19) The body of a protected unit may contain declarations and bodies for 
  13854.       local subprograms. These are not visible outside the protected unit. 
  13855.  
  13856.    5. (20) The body of a protected function can contain internal calls on other 
  13857.       protected functions, but not protected procedures, because the current 
  13858.       instance is a constant. On the other hand, the body of a protected 
  13859.       procedure can contain internal calls on both protected functions and 
  13860.       procedures. 
  13861.  
  13862.    6. (21) From within a protected action, an internal call on a protected 
  13863.       subprogram, or an external call on a protected subprogram with a 
  13864.       different target object is not considered a potentially blocking 
  13865.       operation. 
  13866.  
  13867.             Examples
  13868.  
  13869.    7. Examples of protected subprogram calls, see 9.4 
  13870.  
  13871.          8.
  13872.  
  13873.                       Shared_Array.Set_Component(N, E);
  13874.                       E := Shared_Array.Component(M);
  13875.                       Control.Release;
  13876.  
  13877.  
  13878. ΓòÉΓòÉΓòÉ 12.5.2. Entries and Accept Statements ΓòÉΓòÉΓòÉ
  13879.  
  13880.    1. Entry_declarations, with the corresponding entry_bodies or 
  13881.       accept_statements, are used to define potentially queued operations on 
  13882.       tasks and protected objects. 
  13883.  
  13884.             Syntax
  13885.  
  13886.          2.
  13887.  
  13888.                       entry_declaration ::=
  13889.                         entry defining_identifier [(discrete_subtype_definition)]
  13890.                          parameter_profile;
  13891.  
  13892.          3.
  13893.  
  13894.                       accept_statement ::=
  13895.                         accept entry_direct_name [(entry_index)] parameter_profile
  13896.                          [do handled_sequence_of_statements
  13897.                         end [entry_identifier]];
  13898.  
  13899.          4.
  13900.  
  13901.                       entry_index ::= expression
  13902.  
  13903.          5.
  13904.  
  13905.                       entry_body ::=
  13906.                         entry defining_identifier entry_body_formal_part entry_barrier is
  13907.                          declarative_part
  13908.                         begin
  13909.                          handled_sequence_of_statements
  13910.                         end [entry_identifier];
  13911.  
  13912.          6.
  13913.  
  13914.                       entry_body_formal_part ::=
  13915.                         [(entry_index_specification)] parameter_profile
  13916.  
  13917.          7.
  13918.  
  13919.                       entry_barrier ::= when condition
  13920.  
  13921.          8.
  13922.  
  13923.                       entry_index_specification ::=
  13924.                         for defining_identifier in discrete_subtype_definition
  13925.  
  13926.         a. If an entry_identifier appears at the end of an accept_statement, it 
  13927.            shall repeat the entry_direct_name. If an entry_identifier appears 
  13928.            at the end of an entry_body, it shall repeat the 
  13929.            defining_identifier. 
  13930.  
  13931.         b. An entry_declaration is allowed only in a protected or task 
  13932.            declaration. 
  13933.  
  13934.   Name Resolution Rules
  13935.  
  13936.    1. In an accept_statement, the expected profile for the entry_direct_name is 
  13937.       that of the entry_declaration; the expected type for an entry_index is 
  13938.       that of the subtype defined by the discrete_subtype_definition of the 
  13939.       corresponding entry_declaration. 
  13940.  
  13941.    2. Within the handled_sequence_of_statements of an accept_statement, if a 
  13942.       selected_component has a prefix that denotes the corresponding 
  13943.       entry_declaration, then the entity denoted by the prefix is the 
  13944.       accept_statement, and the selected_component is interpreted as an 
  13945.       expanded name, see 4.1.3, the selector_name of the selected_component has 
  13946.       to be the identifier for some formal parameter of the accept_statement. 
  13947.  
  13948.             Legality Rules
  13949.  
  13950.    3. An entry_declaration in a task declaration shall not contain a 
  13951.       specification for an access parameter, see 3.10. 
  13952.  
  13953.    4. For an accept_statement, the innermost enclosing body shall be a 
  13954.       task_body, and the entry_direct_name shall denote an entry_declaration in 
  13955.       the corresponding task declaration; the profile of the accept_statement 
  13956.       shall conform fully to that of the corresponding entry_declaration. An 
  13957.       accept_statement shall have a parenthesized entry_index if and only if 
  13958.       the corresponding entry_declaration has a discrete_subtype_definition. 
  13959.  
  13960.    5. An accept_statement shall not be within another accept_statement that 
  13961.       corresponds to the same entry_declaration, nor within an 
  13962.       asynchronous_select inner to the enclosing task_body. 
  13963.  
  13964.    6. An entry_declaration of a protected unit requires a completion, which 
  13965.       shall be an entry_body, and every entry_body shall be the completion of 
  13966.       an entry_declaration of a protected unit. The profile of the entry_body 
  13967.       shall conform fully to that of the corresponding declaration. 
  13968.  
  13969.    7. An entry_body_formal_part shall have an entry_index_specification if and 
  13970.       only if the corresponding entry_declaration has a 
  13971.       discrete_subtype_definition. In this case, the 
  13972.       discrete_subtype_definitions of the entry_declaration and the 
  13973.       entry_index_specification shall fully conform to one another (see 6.3.1). 
  13974.  
  13975.    8. A name that denotes a formal parameter of an entry_body is not allowed 
  13976.       within the entry_barrier of the entry_body. 
  13977.  
  13978.             Static Semantics
  13979.  
  13980.    9. The parameter modes defined for parameters in the parameter_profile of an 
  13981.       entry_declaration are the same as for a subprogram_declaration and have 
  13982.       the same meaning, see 6.2. 
  13983.  
  13984.   10. An entry_declaration with a discrete_subtype_definition, see 3.6, 
  13985.       declares a family of distinct entries having the same profile, with one 
  13986.       such entry for each value of the entry index subtype defined by the 
  13987.       discrete_subtype_definition. A name for an entry of a family takes the 
  13988.       form of an indexed_component, where the prefix denotes the 
  13989.       entry_declaration for the family, and the index value identifies the 
  13990.       entry within the family. The term single entry is used to refer to any 
  13991.       entry other than an entry of an entry family. 
  13992.  
  13993.   11. In the entry_body for an entry family, the entry_index_specification 
  13994.       declares a named constant whose subtype is the entry index subtype 
  13995.       defined by the corresponding entry_declaration; the value of the named 
  13996.       entry index identifies which entry of the family was called. 
  13997.  
  13998.             Dynamic Semantics
  13999.  
  14000.   12. For the elaboration of an entry_declaration for an entry family, if the 
  14001.       discrete_subtype_definition contains no per-object expressions (see 3.8) 
  14002.       then the discrete_subtype_definition is elaborated. Otherwise, the 
  14003.       elaboration of the entry_declaration consists of the evaluation of any 
  14004.       expression of the discrete_subtype_definition that is not a per-object 
  14005.       expression (or part of one). The elaboration of an entry_declaration for 
  14006.       a single entry has no effect. 
  14007.  
  14008.   13. The actions to be performed when an entry is called are specified by the 
  14009.       corresponding accept_statements (if any) for an entry of a task unit, and 
  14010.       by the corresponding entry_body for an entry of a protected unit. 
  14011.  
  14012.   14. For the execution of an accept_statement, the entry_index, if any, is 
  14013.       first evaluated and converted to the entry index subtype; this index 
  14014.       value identifies which entry of the family is to be accepted. Further 
  14015.       execution of the accept_statement is then blocked until a caller of the 
  14016.       corresponding entry is selected, see 9.5.3, whereupon the 
  14017.       handled_sequence_of_statements, if any, of the accept_statement is 
  14018.       executed, with the formal parameters associated with the corresponding 
  14019.       actual parameters of the selected entry call. Upon completion of the 
  14020.       handled_sequence_of_statements, the accept_statement completes and is 
  14021.       left. When an exception is propagated from the 
  14022.       handled_sequence_of_statements of an accept_statement, the same exception 
  14023.       is also raised by the execution of the corresponding 
  14024.       entry_call_statement. 
  14025.  
  14026.   15. The above interaction between a calling task and an accepting task is 
  14027.       called a rendezvous. After a rendezvous, the two tasks continue their 
  14028.       execution independently. 
  14029.  
  14030.   16. An entry_body is executed when the condition of the entry_barrier 
  14031.       evaluates to True and a caller of the corresponding single entry, or 
  14032.       entry of the corresponding entry family, has been selected (see 9.5.3). 
  14033.       For the execution of the entry_body, the declarative_part of the 
  14034.       entry_body is elaborated, and the handled_sequence_of_statements of the 
  14035.       body is executed, as for the execution of a subprogram_body. The value of 
  14036.       the named entry index, if any, is determined by the value of the entry 
  14037.       index specified in the entry_name of the selected entry call (or 
  14038.       intermediate requeue_statement --  see 9.5.4. 
  14039.  
  14040.       NOTES 
  14041.  
  14042.   17. (22) A task entry has corresponding accept_statements (zero or more), 
  14043.       whereas a protected entry has a corresponding entry_body (exactly one). 
  14044.  
  14045.   18. (23) A consequence of the rule regarding the allowed placements of 
  14046.       accept_statements is that a task can execute accept_statements only for 
  14047.       its own entries. 
  14048.  
  14049.   19. (24) A return_statement, see 6.5, or a requeue_statement (see 9.5.4) may 
  14050.       be used to complete the execution of an accept_statement or an 
  14051.       entry_body. 
  14052.  
  14053.   20. (25) The condition in the entry_barrier may reference anything visible 
  14054.       except the formal parameters of the entry. This includes the entry index 
  14055.       (if any), the components (including discriminants) of the protected 
  14056.       object, the Count attribute of an entry of that protected object, and 
  14057.       data global to the protected unit. 
  14058.  
  14059.   21. The restriction against referencing the formal parameters within an 
  14060.       entry_barrier ensures that all calls of the same entry see the same 
  14061.       barrier value. If it is necessary to look at the parameters of an entry 
  14062.       call before deciding whether to handle it, the entry_barrier can be 
  14063.       ``when True'' and the caller can be requeued (on some private entry) when 
  14064.       its parameters indicate that it cannot be handled immediately. 
  14065.  
  14066.             Examples
  14067.  
  14068.   22. Examples of entry declarations: 
  14069.  
  14070.         23.
  14071.  
  14072.                       entry Read(V : out Item);
  14073.                       entry Seize;
  14074.                       entry Request(Level)(D : Item);  --  a family of entries
  14075.  
  14076.   24. Examples of accept statements: 
  14077.  
  14078.         25.
  14079.  
  14080.                       accept Shut_Down;
  14081.  
  14082.         26.
  14083.  
  14084.                       accept Read(V : out Item) do
  14085.                         V := Local_Item;
  14086.                       end Read;
  14087.  
  14088.         27.
  14089.  
  14090.                       accept Request(Low)(D : Item) do
  14091.                         ┬╖┬╖┬╖
  14092.                       end Request;
  14093.  
  14094.  
  14095. ΓòÉΓòÉΓòÉ 12.5.3. Entry Calls ΓòÉΓòÉΓòÉ
  14096.  
  14097.    1. An entry_call_statement (an entry call) can appear in various contexts. A 
  14098.       simple entry call is a stand-alone statement that represents an 
  14099.       unconditional call on an entry of a target task or a protected object. 
  14100.       Entry calls can also appear as part of select_statements, see 9.7. 
  14101.  
  14102.             Syntax
  14103.  
  14104.          2.
  14105.  
  14106.                       entry_call_statement ::= entry_name [actual_parameter_part];
  14107.  
  14108.   Name Resolution Rules
  14109.  
  14110.    3. The entry_name given in an entry_call_statement shall resolve to denote 
  14111.       an entry. The rules for parameter associations are the same as for 
  14112.       subprogram calls, see 6.4, and 6.4.1. 
  14113.  
  14114.             Static Semantics
  14115.  
  14116.    4. The entry_name of an entry_call_statement specifies (explicitly or 
  14117.       implicitly) the target object of the call, the entry or entry family, and 
  14118.       the entry index, if any, see 9.5. 
  14119.  
  14120.             Dynamic Semantics
  14121.  
  14122.    5. Under certain circumstances (detailed below), an entry of a task or 
  14123.       protected object is checked to see whether it is open or closed: 
  14124.  
  14125.         a. An entry of a task is open if the task is blocked on an 
  14126.            accept_statement that corresponds to the entry, see 9.5.2, or on a 
  14127.            selective_accept, (see 9.7.1) with an open accept_alternative that 
  14128.            corresponds to the entry; otherwise it is closed. 
  14129.  
  14130.         b. An entry of a protected object is open if the condition of the 
  14131.            entry_barrier of the corresponding entry_body evaluates to True; 
  14132.            otherwise it is closed. If the evaluation of the condition 
  14133.            propagates an exception, the exception Program_Error is propagated 
  14134.            to all current callers of all entries of the protected object. 
  14135.  
  14136.    1. For the execution of an entry_call_statement, evaluation of the name and 
  14137.       of the parameter associations is as for a subprogram call, see 6.4. The 
  14138.       entry call is then issued: For a call on an entry of a protected object, 
  14139.       a new protected action is started on the object, see 9.5.1. The named 
  14140.       entry is checked to see if it is open; if open, the entry call is said to 
  14141.       be selected immediately, and the execution of the call proceeds as 
  14142.       follows: 
  14143.  
  14144.         a. For a call on an open entry of a task, the accepting task becomes 
  14145.            ready and continues the execution of the corresponding 
  14146.            accept_statement (see 9.5.2). 
  14147.  
  14148.         b. For a call on an open entry of a protected object, the corresponding 
  14149.            entry_body is executed, see 9.5.2, as part of the protected action. 
  14150.  
  14151.    1. If the accept_statement or entry_body completes other than by a requeue 
  14152.       (see 9.5.4) return is made to the caller (after servicing the entry 
  14153.       queues -- see below); any necessary assigning back of formal to actual 
  14154.       parameters occurs, as for a subprogram call, see 6.4.1, such assignments 
  14155.       take place outside of any protected action. 
  14156.  
  14157.    2. If the named entry is closed, the entry call is added to an entry queue 
  14158.       (as part of the protected action, for a call on a protected entry), and 
  14159.       the call remains queued until it is selected or cancelled; there is a 
  14160.       separate (logical) entry queue for each entry of a given task or 
  14161.       protected object (including each entry of an entry family). 
  14162.  
  14163.    3. When a queued call is selected, it is removed from its entry queue. 
  14164.       Selecting a queued call from a particular entry queue is called servicing 
  14165.       the entry queue. An entry with queued calls can be serviced under the 
  14166.       following circumstances: 
  14167.  
  14168.         a. When the associated task reaches a corresponding accept_statement, 
  14169.            or a selective_accept with a corresponding open accept_alternative; 
  14170.  
  14171.         b. If after performing, as part of a protected action on the associated 
  14172.            protected object, an operation on the object other than a call on a 
  14173.            protected function, the entry is checked and found to be open. 
  14174.  
  14175.    1. If there is at least one call on a queue corresponding to an open entry, 
  14176.       then one such call is selected according to the entry queuing policy in 
  14177.       effect (see below), and the corresponding accept_statement or entry_body 
  14178.       is executed as above for an entry call that is selected immediately. 
  14179.  
  14180.    2. The entry queuing policy controls selection among queued calls both for 
  14181.       task and protected entry queues. The default entry queuing policy is to 
  14182.       select calls on a given entry queue in order of arrival. If calls from 
  14183.       two or more queues are simultaneously eligible for selection, the default 
  14184.       entry queuing policy does not specify which queue is serviced first. 
  14185.       Other entry queuing policies can be specified by pragmas (see D.4). 
  14186.  
  14187.    3. For a protected object, the above servicing of entry queues continues 
  14188.       until there are no open entries with queued calls, at which point the 
  14189.       protected action completes. 
  14190.  
  14191.    4. For an entry call that is added to a queue, and that is not the 
  14192.       triggering_statement of an asynchronous_select, see 9.7.4, the calling 
  14193.       task is blocked until the call is cancelled, or the call is selected and 
  14194.       a corresponding accept_statement or entry_body completes without 
  14195.       requeuing. In addition, the calling task is blocked during a rendezvous. 
  14196.  
  14197.    5. An attempt can be made to cancel an entry call upon an abort (see 9.8) 
  14198.       and as part of certain forms of select_statement, see 9.7.2, 9.7.3, and 
  14199.       9.7.4. The cancellation does not take place until a point (if any) when 
  14200.       the call is on some entry queue, and not protected from cancellation as 
  14201.       part of a requeue, see 9.5.4, at such a point, the call is removed from 
  14202.       the entry queue and the call completes due to the cancellation. The 
  14203.       cancellation of a call on an entry of a protected object is a protected 
  14204.       action, and as such cannot take place while any other protected action is 
  14205.       occurring on the protected object. Like any protected action, it includes 
  14206.       servicing of the entry queues (in case some entry barrier depends on a 
  14207.       Count attribute). 
  14208.  
  14209.    6. A call on an entry of a task that has already completed its execution 
  14210.       raises the exception Tasking_Error at the point of the call; similarly, 
  14211.       this exception is raised at the point of the call if the called task 
  14212.       completes its execution or becomes abnormal before accepting the call or 
  14213.       completing the rendezvous, see 9.8. This applies equally to a simple 
  14214.       entry call and to an entry call as part of a select_statement. 
  14215.  
  14216.             Implementation Permissions
  14217.  
  14218.    7. An implementation may perform the sequence of steps of a protected action 
  14219.       using any thread of control; it need not be that of the task that started 
  14220.       the protected action. If an entry_body completes without requeuing, then 
  14221.       the corresponding calling task may be made ready without waiting for the 
  14222.       entire protected action to complete. 
  14223.  
  14224.    8. When the entry of a protected object is checked to see whether it is 
  14225.       open, the implementation need not reevaluate the condition of the 
  14226.       corresponding entry_barrier if no variable or attribute referenced by the 
  14227.       condition (directly or indirectly) has been altered by the execution (or 
  14228.       cancellation) of a protected procedure or entry call on the object since 
  14229.       the condition was last evaluated. 
  14230.  
  14231.    9. An implementation may evaluate the conditions of all entry_barriers of a 
  14232.       given protected object any time any entry of the object is checked to see 
  14233.       if it is open. 
  14234.  
  14235.   10. When an attempt is made to cancel an entry call, the implementation need 
  14236.       not make the attempt using the thread of control of the task (or 
  14237.       interrupt) that initiated the cancellation; in particular, it may use the 
  14238.       thread of control of the caller itself to attempt the cancellation, even 
  14239.       if this might allow the entry call to be selected in the interim. 
  14240.  
  14241.       NOTES 
  14242.  
  14243.   11. (26) If an exception is raised during the execution of an entry_body, it 
  14244.       is propagated to the corresponding caller, see 11.4. 
  14245.  
  14246.   12. (27) For a call on a protected entry, the entry is checked to see if it 
  14247.       is open prior to queuing the call, and again thereafter if its Count 
  14248.       attribute, see 9.9, is referenced in some entry barrier. 
  14249.  
  14250.   13. (28) In addition to simple entry calls, the language permits timed, 
  14251.       conditional, and asynchronous entry calls, see 9.7.2, see 9.7.3, and 
  14252.       9.7.4. 
  14253.  
  14254.   14. (29) The condition of an entry_barrier is allowed to be evaluated by an 
  14255.       implementation more often than strictly necessary, even if the evaluation 
  14256.       might have side effects. On the other hand, an implementation need not 
  14257.       reevaluate the condition if nothing it references was updated by an 
  14258.       intervening protected action on the protected object, even if the 
  14259.       condition references some global variable that might have been updated by 
  14260.       an action performed from outside of a protected action. 
  14261.  
  14262.             Examples
  14263.  
  14264.   15. Examples of entry calls: 
  14265.  
  14266.         16.
  14267.  
  14268.                       Agent.Shut_Down;           --  see 9.1
  14269.                       Parser.Next_Lexeme(E);        --  see 9.1
  14270.                       Pool(5).Read(Next_Char);       --  see 9.1
  14271.                       Controller.Request(Low)(Some_Item);  --  see 9.1
  14272.                       Flags(3).Seize;            --  see 9.4
  14273.  
  14274.  
  14275. ΓòÉΓòÉΓòÉ 12.5.4. Requeue Statements ΓòÉΓòÉΓòÉ
  14276.  
  14277.    1. A requeue_statement can be used to complete an accept_statement or 
  14278.       entry_body, while redirecting the corresponding entry call to a new (or 
  14279.       the same) entry queue. Such a requeue can be performed with or without 
  14280.       allowing an intermediate cancellation of the call, due to an abort or the 
  14281.       expiration of a delay. 
  14282.  
  14283.             Syntax
  14284.  
  14285.          2.
  14286.  
  14287.                       requeue_statement ::= requeue entry_name [with abort];
  14288.  
  14289.   Name Resolution Rules
  14290.  
  14291.    3. The entry_name of a requeue_statement shall resolve to denote an entry 
  14292.       (the target entry) that either has no parameters, or that has a profile 
  14293.       that is type conformant, see 6.3.1, with the profile of the innermost 
  14294.       enclosing entry_body or accept_statement. 
  14295.  
  14296.             Legality Rules
  14297.  
  14298.    4. A requeue_statement shall be within a callable construct that is either 
  14299.       an entry_body or an accept_statement, and this construct shall be the 
  14300.       innermost enclosing body or callable construct. 
  14301.  
  14302.    5. If the target entry has parameters, then its profile shall be subtype 
  14303.       conformant with the profile of the innermost enclosing callable 
  14304.       construct. 
  14305.  
  14306.    6. In a requeue_statement of an accept_statement of some task unit, either 
  14307.       the target object shall be a part of a formal parameter of the 
  14308.       accept_statement, or the accessibility level of the target object shall 
  14309.       not be equal to or statically deeper than any enclosing accept_statement 
  14310.       of the task unit. In a requeue_statement of an entry_body of some 
  14311.       protected unit, either the target object shall be a part of a formal 
  14312.       parameter of the entry_body, or the accessibility level of the target 
  14313.       object shall not be statically deeper than that of the entry_declaration. 
  14314.       Dynamic Semantics 
  14315.  
  14316.    7. The execution of a requeue_statement proceeds by first evaluating the 
  14317.       entry_name, including the prefix identifying the target task or protected 
  14318.       object and the expression identifying the entry within an entry family, 
  14319.       if any. The entry_body or accept_statement enclosing the 
  14320.       requeue_statement is then completed, finalized, and left, see 7.6.1. 
  14321.  
  14322.    8. For the execution of a requeue on an entry of a target task, after 
  14323.       leaving the enclosing callable construct, the named entry is checked to 
  14324.       see if it is open and the requeued call is either selected immediately or 
  14325.       queued, as for a normal entry call, see 9.5.3. 
  14326.  
  14327.    9. For the execution of a requeue on an entry of a target protected object, 
  14328.       after leaving the enclosing callable construct: 
  14329.  
  14330.         a. if the requeue is an internal requeue (that is, the requeue is back 
  14331.            on an entry of the same protected object --  see 9.5.), the call is 
  14332.            added to the queue of the named entry and the ongoing protected 
  14333.            action continues, see 9.5.1; 
  14334.  
  14335.         b. if the requeue is an external requeue (that is, the target protected 
  14336.            object is not implicitly the same as the current object --  see 
  14337.            9.5.), a protected action is started on the target object and 
  14338.            proceeds as for a normal entry call, see 9.5.3. 
  14339.  
  14340.    1. If the new entry named in the requeue_statement has formal parameters, 
  14341.       then during the execution of the accept_statement or entry_body 
  14342.       corresponding to the new entry, the formal parameters denote the same 
  14343.       objects as did the corresponding formal parameters of the callable 
  14344.       construct completed by the requeue. In any case, no parameters are 
  14345.       specified in a requeue_statement; any parameter passing is implicit. 
  14346.  
  14347.    2. If the requeue_statement includes the reserved words with abort (it is a 
  14348.       requeue-with-abort), then: 
  14349.  
  14350.         a. if the original entry call has been aborted, see 9.8, then the 
  14351.            requeue acts as an abort completion point for the call, and the call 
  14352.            is cancelled and no requeue is performed; 
  14353.  
  14354.         b. if the original entry call was timed (or conditional), then the 
  14355.            original expiration time is the expiration time for the requeued 
  14356.            call. 
  14357.  
  14358.    1. If the reserved words with abort do not appear, then the call remains 
  14359.       protected against cancellation while queued as the result of the 
  14360.       requeue_statement. 
  14361.  
  14362.       NOTES 
  14363.  
  14364.    2. (30) A requeue is permitted from a single entry to an entry of an entry 
  14365.       family, or vice-versa. The entry index, if any, plays no part in the 
  14366.       subtype conformance check between the profiles of the two entries; an 
  14367.       entry index is part of the entry_name for an entry of a family. 
  14368.  
  14369.             Examples
  14370.  
  14371.    3. Examples of requeue statements: 
  14372.  
  14373.          4.
  14374.  
  14375.                       requeue Request(Medium) with abort;
  14376.                       --  requeue on a member of an entry family
  14377.                       --  of the current task, see 9.1
  14378.  
  14379.          5.
  14380.  
  14381.                       requeue Flags(I).Seize;
  14382.                       --  requeue on an entry of an array
  14383.                       --  component, see 9.4
  14384.  
  14385.  
  14386. ΓòÉΓòÉΓòÉ 12.6. Delay Statements, Duration, and Time ΓòÉΓòÉΓòÉ
  14387.  
  14388.    1. A delay_statement is used to block further execution until a specified 
  14389.       expiration time is reached. The expiration time can be specified either 
  14390.       as a particular point in time (in a delay_until_statement), or in seconds 
  14391.       from the current time (in a delay_relative_statement). The 
  14392.       language-defined package Calendar provides definitions for a type Time 
  14393.       and associated operations, including a function Clock that returns the 
  14394.       current time. 
  14395.  
  14396.             Syntax
  14397.  
  14398.          2.
  14399.  
  14400.                       delay_statement ::= delay_until_statement | delay_relative_statement
  14401.  
  14402.          3.
  14403.  
  14404.                       delay_until_statement ::= delay until delay_expression;
  14405.  
  14406.          4.
  14407.  
  14408.                       delay_relative_statement ::= delay delay_expression;
  14409.  
  14410.   Name Resolution Rules
  14411.  
  14412.    5. The expected type for the delay_expression in a delay_relative_statement 
  14413.       is the predefined type Duration. The delay_expression in a 
  14414.       delay_until_statement is expected to be of any nonlimited type. 
  14415.  
  14416.             Legality Rules
  14417.  
  14418.    6. There can be multiple time bases, each with a corresponding clock, and a 
  14419.       corresponding time type. The type of the delay_expression in a 
  14420.       delay_until_statement shall be a time type -- either the type Time 
  14421.       defined in the language-defined package Calendar (see below), or some 
  14422.       other implementation-defined time type, see D.8. 
  14423.  
  14424.             Static Semantics
  14425.  
  14426.    7. There is a predefined fixed point type named Duration, declared in the 
  14427.       visible part of package Standard; a value of type Duration is used to 
  14428.       represent the length of an interval of time, expressed in seconds. The 
  14429.       type Duration is not specific to a particular time base, but can be used 
  14430.       with any time base. 
  14431.  
  14432.    8. A value of the type Time in package Calendar, or of some other 
  14433.       implementation-defined time type, represents a time as reported by a 
  14434.       corresponding clock. 
  14435.  
  14436.    9. The following language-defined library package exists: 
  14437.  
  14438.         10.
  14439.  
  14440.                       package Ada.Calendar is
  14441.                        type Time is private;
  14442.  
  14443.         11.
  14444.  
  14445.                         subtype Year_Number  is Integer range 1901 ┬╖┬╖  2099;
  14446.                        subtype Month_Number is Integer range 1 ┬╖┬╖  12;
  14447.                        subtype Day_Number  is Integer range 1 ┬╖┬╖  31;
  14448.                        subtype Day_Duration is Duration range 0.0 ┬╖┬╖  86_400.0;
  14449.  
  14450.         12.
  14451.  
  14452.                         function Clock return Time;
  14453.  
  14454.         13.
  14455.  
  14456.                         function Year  (Date : Time) return Year_Number;
  14457.                        function Month  (Date : Time) return Month_Number;
  14458.                        function Day   (Date : Time) return Day_Number;
  14459.                        function Seconds(Date : Time) return Day_Duration;
  14460.  
  14461.         14.
  14462.  
  14463.                         procedure Split (Date  : in Time;
  14464.                                 Year   : out Year_Number;
  14465.                                 Month  : out Month_Number;
  14466.                                 Day   : out Day_Number;
  14467.                                 Seconds : out Day_Duration);
  14468.  
  14469.         15.
  14470.  
  14471.                         function Time_Of(Year  : Year_Number;
  14472.                                 Month  : Month_Number;
  14473.                                 Day   : Day_Number;
  14474.                                 Seconds : Day_Duration := 0.0)
  14475.                         return Time;
  14476.  
  14477.         16.
  14478.  
  14479.                         function "+" (Left : Time;  Right : Duration) return Time;
  14480.                        function "+" (Left : Duration; Right : Time) return Time;
  14481.                        function "-" (Left : Time;  Right : Duration) return Time;
  14482.                        function "-" (Left : Time;  Right : Time) return Duration;
  14483.  
  14484.         17.
  14485.  
  14486.                         function "<" (Left, Right : Time) return Boolean;
  14487.                        function "<="(Left, Right : Time) return Boolean;
  14488.                        function ">" (Left, Right : Time) return Boolean;
  14489.                        function ">="(Left, Right : Time) return Boolean;
  14490.  
  14491.         18.
  14492.  
  14493.                         Time_Error : exception;
  14494.  
  14495.         19.
  14496.  
  14497.                       private
  14498.                         ┬╖┬╖┬╖ -- not specified by the language
  14499.                       end Ada.Calendar;
  14500.  
  14501.   Dynamic Semantics
  14502.  
  14503.   20. For the execution of a delay_statement, the delay_expression is first 
  14504.       evaluated. For a delay_until_statement, the expiration time for the delay 
  14505.       is the value of the delay_expression, in the time base associated with 
  14506.       the type of the expression. For a delay_relative_statement, the 
  14507.       expiration time is defined as the current time, in the time base 
  14508.       associated with relative delays, plus the value of the delay_expression 
  14509.       converted to the type Duration, and then rounded up to the next clock 
  14510.       tick. The time base associated with relative delays is as defined in D.9: 
  14511.       ``Delay Accuracy'', or is implementation defined. 
  14512.  
  14513.   21. The task executing a delay_statement is blocked until the expiration time 
  14514.       is reached, at which point it becomes ready again. If the expiration time 
  14515.       has already passed, the task is not blocked. 
  14516.  
  14517.   22. If an attempt is made to cancel the delay_statement (as part of an 
  14518.       asynchronous_select or abort --  see 9.7.4, and 9.8, the _statement is 
  14519.       cancelled if the expiration time has not yet passed, thereby completing 
  14520.       the delay_statement. 
  14521.  
  14522.   23. The time base associated with the type Time of package Calendar is 
  14523.       implementation defined. The function Clock of package Calendar returns a 
  14524.       value representing the current time for this time base. The 
  14525.       implementation-defined value of the named number System.Tick (see 13.7) 
  14526.       is an approximation of the length of the real-time interval during which 
  14527.       the value of Calendar.Clock remains constant. 
  14528.  
  14529.   24. The functions Year, Month, Day, and Seconds return the corresponding 
  14530.       values for a given value of the type Time, as appropriate to an 
  14531.       implementation-defined timezone; the procedure Split returns all four 
  14532.       corresponding values. Conversely, the function Time_Of combines a year 
  14533.       number, a month number, a day number, and a duration, into a value of 
  14534.       type Time. The operators "+" and "-" for addition and subtraction of 
  14535.       times and durations, and the relational operators for times, have the 
  14536.       conventional meaning. 
  14537.  
  14538.   25. If Time_Of is called with a seconds value of 86_400.0, the value returned 
  14539.       is equal to the value of Time_Of for the next day with a seconds value of 
  14540.       0.0. The value returned by the function Seconds or through the Seconds 
  14541.       parameter of the procedure Split is always less than 86_400.0. 
  14542.  
  14543.   26. The exception Time_Error is raised by the function Time_Of if the actual 
  14544.       parameters do not form a proper date. This exception is also raised by 
  14545.       the operators "+" and "-" if the result is not representable in the type 
  14546.       Time or Duration, as appropriate. This exception is also raised by the 
  14547.       function Year or the procedure Split if the year number of the given date 
  14548.       is outside of the range of the subtype Year_Number. 
  14549.  
  14550.             Implementation Requirements
  14551.  
  14552.   27. The implementation of the type Duration shall allow representation of 
  14553.       time intervals (both positive and negative) up to at least 86400 seconds 
  14554.       (one day); Duration'Small shall not be greater than twenty milliseconds. 
  14555.       The implementation of the type Time shall allow representation of all 
  14556.       dates with year numbers in the range of Year_Number; it may allow 
  14557.       representation of other dates as well (both earlier and later). 
  14558.  
  14559.             Implementation Permissions
  14560.  
  14561.   28. An implementation may define additional time types, see D.8. 
  14562.  
  14563.   29. An implementation may raise Time_Error if the value of a delay_expression 
  14564.       in a delay_until_statement of a select_statement represents a time more 
  14565.       than 90 days past the current time. The actual limit, if any, is 
  14566.       implementation-defined. 
  14567.  
  14568.             Implementation Advice
  14569.  
  14570.   30. Whenever possible in an implementation, the value of Duration'Small 
  14571.       should be no greater than 100 microseconds. 
  14572.  
  14573.   31. The time base for delay_relative_statements should be monotonic; it need 
  14574.       not be the same time base as used for Calendar.Clock. 
  14575.  
  14576.       NOTES 
  14577.  
  14578.   32. (31) A delay_relative_statement with a negative value of the 
  14579.       delay_expression is equivalent to one with a zero value. 
  14580.  
  14581.   33. (32) A delay_statement may be executed by the environment task; 
  14582.       consequently delay_statements may be executed as part of the elaboration 
  14583.       of a library_item or the execution of the main subprogram. Such 
  14584.       statements delay the environment task, see 10.2. 
  14585.  
  14586.   34. (33) A delay_statement is an abort completion point and a potentially 
  14587.       blocking operation, even if the task is not actually blocked. 
  14588.  
  14589.   35. (34) There is no necessary relationship between System.Tick (the 
  14590.       resolution of the clock of package Calendar) and Duration'Small (the 
  14591.       small of type Duration). 
  14592.  
  14593.   36. (35) Additional requirements associated with delay_statements are given 
  14594.       in D.9: ``Delay Accuracy''. 
  14595.  
  14596.             Examples
  14597.  
  14598.   37. Example of a relative delay statement: 
  14599.  
  14600.         38.
  14601.  
  14602.                       delay 3.0;  -- delay 3.0 seconds
  14603.  
  14604.   39. Example of a periodic task: 
  14605.  
  14606.         40.
  14607.  
  14608.                       declare
  14609.                         use Ada.Calendar;
  14610.                         Next_Time : Time := Clock + Period;
  14611.                                  -- Period is a global constant of type Duration
  14612.                       begin
  14613.                         loop        -- repeated every Period seconds
  14614.                          delay until Next_Time;
  14615.                          ┬╖┬╖┬╖ -- perform some actions
  14616.                          Next_Time := Next_Time + Period;
  14617.                         end loop;
  14618.                       end;
  14619.  
  14620.  
  14621. ΓòÉΓòÉΓòÉ 12.7. Select Statements ΓòÉΓòÉΓòÉ
  14622.  
  14623.    1. There are four forms of the select_statement. One form provides a 
  14624.       selective wait for one or more select_alternatives. Two provide timed and 
  14625.       conditional entry calls. The fourth provides asynchronous transfer of 
  14626.       control. 
  14627.  
  14628.             Syntax
  14629.  
  14630.          2.
  14631.  
  14632.                       select_statement ::=
  14633.                          selective_accept
  14634.                         | timed_entry_call
  14635.                         | conditional_entry_call
  14636.                         | asynchronous_select
  14637.  
  14638.   Examples
  14639.  
  14640.    3. Example of a select statement: 
  14641.  
  14642.          4.
  14643.  
  14644.                       select
  14645.                         accept Driver_Awake_Signal;
  14646.                       or
  14647.                         delay 30.0*Seconds;
  14648.                         Stop_The_Train;
  14649.                       end select;
  14650.  
  14651.  9.7.1                         Selective Accept 
  14652.  9.7.2                         Timed Entry Calls 
  14653.  9.7.3                         Conditional Entry Calls 
  14654.  9.7.4                         Asynchronous Transfer of Control 
  14655.  
  14656.  
  14657. ΓòÉΓòÉΓòÉ 12.7.1. Selective Accept ΓòÉΓòÉΓòÉ
  14658.  
  14659.    1. This form of the select_statement allows a combination of waiting for, 
  14660.       and selecting from, one or more alternatives. The selection may depend on 
  14661.       conditions associated with each alternative of the selective_accept. 
  14662.  
  14663.             Syntax
  14664.  
  14665.          2.
  14666.  
  14667.                       selective_accept ::=
  14668.                         select
  14669.                          [guard]
  14670.                          select_alternative
  14671.                        { or
  14672.                          [guard]
  14673.                          select_alternative }
  14674.                         [ else
  14675.                          sequence_of_statements ]
  14676.                         end select;
  14677.  
  14678.          3.
  14679.  
  14680.                       guard ::= when condition =>
  14681.  
  14682.          4.
  14683.  
  14684.                       select_alternative ::=
  14685.                          accept_alternative
  14686.                         | delay_alternative
  14687.                         | terminate_alternative
  14688.  
  14689.          5.
  14690.  
  14691.                       accept_alternative ::=
  14692.                         accept_statement [sequence_of_statements]
  14693.  
  14694.          6.
  14695.  
  14696.                       delay_alternative ::=
  14697.                         delay_statement [sequence_of_statements]
  14698.  
  14699.          7.
  14700.  
  14701.                       terminate_alternative ::= terminate;
  14702.  
  14703.         a. A selective_accept shall contain at least one accept_alternative. In 
  14704.            addition, it can contain: 
  14705.  
  14706.              1. a terminate_alternative (only one); or 
  14707.  
  14708.              2. one or more delay_alternatives; or 
  14709.  
  14710.              3. an else part (the reserved word else followed by a 
  14711.                 sequence_of_statements). 
  14712.  
  14713.         a. These three possibilities are mutually exclusive. 
  14714.  
  14715.   Legality Rules
  14716.  
  14717.    1. If a selective_accept contains more than one delay_alternative, then all 
  14718.       shall be delay_relative_statements, or all shall be 
  14719.       delay_until_statements for the same time type. 
  14720.  
  14721.             Dynamic Semantics
  14722.  
  14723.    2. A select_alternative is said to be open if it is not immediately preceded 
  14724.       by a guard, or if the condition of its guard evaluates to True. It is 
  14725.       said to be closed otherwise. 
  14726.  
  14727.    3. For the execution of a selective_accept, any guard conditions are 
  14728.       evaluated; open alternatives are thus determined. For an open 
  14729.       delay_alternative, the delay_expression is also evaluated. Similarly, for 
  14730.       an open accept_alternative for an entry of a family, the entry_index is 
  14731.       also evaluated. These evaluations are performed in an arbitrary order, 
  14732.       except that a delay_expression or entry_index is not evaluated until 
  14733.       after evaluating the corresponding condition, if any. Selection and 
  14734.       execution of one open alternative, or of the else part, then completes 
  14735.       the execution of the selective_accept; the rules for this selection are 
  14736.       described below. 
  14737.  
  14738.    4. Open accept_alternatives are first considered. Selection of one such 
  14739.       alternative takes place immediately if the corresponding entry already 
  14740.       has queued calls. If several alternatives can thus be selected, one of 
  14741.       them is selected according to the entry queuing policy in effect (see 
  14742.       9.5.3 and D.4). When such an alternative is selected, the selected call 
  14743.       is removed from its entry queue and the handled_sequence_of_statements 
  14744.       (if any) of the corresponding accept_statement is executed; after the 
  14745.       rendezvous completes any subsequent sequence_of_statements of the 
  14746.       alternative is executed. If no selection is immediately possible (in the 
  14747.       above sense) and there is no else part, the task blocks until an open 
  14748.       alternative can be selected. 
  14749.  
  14750.    5. Selection of the other forms of alternative or of an else part is 
  14751.       performed as follows: 
  14752.  
  14753.         a. An open delay_alternative is selected when its expiration time is 
  14754.            reached if no accept_alternative or other delay_alternative can be 
  14755.            selected prior to the expiration time. If several delay_alternatives 
  14756.            have this same expiration time, one of them is selected according to 
  14757.            the queuing policy in effect, see D.4, the default queuing policy 
  14758.            chooses arbitrarily among the delay_alternatives whose expiration 
  14759.            time has passed. 
  14760.  
  14761.         b. The else part is selected and its sequence_of_statements is executed 
  14762.            if no accept_alternative can immediately be selected; in particular, 
  14763.            if all alternatives are closed. 
  14764.  
  14765.         c. An open terminate_alternative is selected if the conditions stated 
  14766.            at the end of clause (see 9.3) are satisfied. 
  14767.  
  14768.    1. The exception Program_Error is raised if all alternatives are closed and 
  14769.       there is no else part. 
  14770.  
  14771.       NOTES 
  14772.  
  14773.    2. (36) A selective_accept is allowed to have several open 
  14774.       delay_alternatives. A selective_accept is allowed to have several open 
  14775.       accept_alternatives for the same entry. 
  14776.  
  14777.             Examples
  14778.  
  14779.    3. Example of a task body with a selective accept: 
  14780.  
  14781.          4.
  14782.  
  14783.                       task body Server is
  14784.                         Current_Work_Item : Work_Item;
  14785.                       begin
  14786.                         loop
  14787.                          select
  14788.                            accept Next_Work_Item(WI : in Work_Item) do
  14789.                             Current_Work_Item := WI;
  14790.                            end;
  14791.                            Process_Work_Item(Current_Work_Item);
  14792.                          or
  14793.                            accept Shut_Down;
  14794.                            exit;    -- Premature shut down requested
  14795.                          or
  14796.                            terminate;  -- Normal shutdown at end of scope
  14797.                          end select;
  14798.                         end loop;
  14799.                       end Server;
  14800.  
  14801.  
  14802. ΓòÉΓòÉΓòÉ 12.7.2. Timed Entry Calls ΓòÉΓòÉΓòÉ
  14803.  
  14804.    1. A timed_entry_call issues an entry call that is cancelled if the call (or 
  14805.       a requeue-with-abort of the call) is not selected before the expiration 
  14806.       time is reached. 
  14807.  
  14808.             Syntax
  14809.  
  14810.          2.
  14811.  
  14812.                       timed_entry_call ::=
  14813.                         select
  14814.                          entry_call_alternative
  14815.                         or
  14816.                          delay_alternative
  14817.                         end select;
  14818.  
  14819.          3.
  14820.  
  14821.                       entry_call_alternative ::=
  14822.                         entry_call_statement [sequence_of_statements]
  14823.  
  14824.   Dynamic Semantics
  14825.  
  14826.    4. For the execution of a timed_entry_call, the entry_name and the actual 
  14827.       parameters are evaluated, as for a simple entry call, see 9.5.3. The 
  14828.       expiration time, see 9.6 for the call is determined by evaluating the 
  14829.       delay_expression of the delay_alternative; the entry call is then issued. 
  14830.  
  14831.    5. If the call is queued (including due to a requeue-with-abort), and not 
  14832.       selected before the expiration time is reached, an attempt to cancel the 
  14833.       call is made. If the call completes due to the cancellation, the optional 
  14834.       sequence_of_statements of the delay_alternative is executed; if the entry 
  14835.       call completes normally, the optional sequence_of_statements of the 
  14836.       entry_call_alternative is executed. 
  14837.  
  14838.             Examples
  14839.  
  14840.    6. Example of a timed entry call: 
  14841.  
  14842.          7.
  14843.  
  14844.                       select
  14845.                         Controller.Request(Medium)(Some_Item);
  14846.                       or
  14847.                         delay 45.0;
  14848.                         --  controller too busy, try something else
  14849.                       end select;
  14850.  
  14851.  
  14852. ΓòÉΓòÉΓòÉ 12.7.3. Conditional Entry Calls ΓòÉΓòÉΓòÉ
  14853.  
  14854.    1. A conditional_entry_call issues an entry call that is then cancelled if 
  14855.       it is not selected immediately (or if a requeue-with-abort of the call is 
  14856.       not selected immediately). 
  14857.  
  14858.             Syntax
  14859.  
  14860.          2.
  14861.  
  14862.                       conditional_entry_call ::=
  14863.                         select
  14864.                          entry_call_alternative
  14865.                         else
  14866.                          sequence_of_statements
  14867.                         end select;
  14868.  
  14869.   Dynamic Semantics
  14870.  
  14871.    3. The execution of a conditional_entry_call is defined to be equivalent to 
  14872.       the execution of a timed_entry_call with a delay_alternative specifying 
  14873.       an immediate expiration time and the same sequence_of_statements as given 
  14874.       after the reserved word else. 
  14875.  
  14876.       NOTES 
  14877.  
  14878.    4. (37) A conditional_entry_call may briefly increase the Count attribute of 
  14879.       the entry, even if the conditional call is not selected. 
  14880.  
  14881.             Examples
  14882.  
  14883.    5. Example of a conditional entry call: 
  14884.  
  14885.          6.
  14886.  
  14887.                       procedure Spin(R : in Resource) is
  14888.                       begin
  14889.                         loop
  14890.                          select
  14891.                            R.Seize;
  14892.                            return;
  14893.                          else
  14894.                            null;  --  busy waiting
  14895.                          end select;
  14896.                         end loop;
  14897.                       end;
  14898.  
  14899.  
  14900. ΓòÉΓòÉΓòÉ 12.7.4. Asynchronous Transfer of Control ΓòÉΓòÉΓòÉ
  14901.  
  14902.    1. An asynchronous select_statement provides asynchronous transfer of 
  14903.       control upon completion of an entry call or the expiration of a delay. 
  14904.  
  14905.             Syntax
  14906.  
  14907.          2.
  14908.  
  14909.                       asynchronous_select ::=
  14910.                         select
  14911.                          triggering_alternative
  14912.                         then abort
  14913.                          abortable_part
  14914.                         end select;
  14915.  
  14916.          3.
  14917.  
  14918.                       triggering_alternative ::=
  14919.                         triggering_statement [sequence_of_statements]
  14920.  
  14921.          4.
  14922.  
  14923.                       triggering_statement ::= entry_call_statement | delay_statement
  14924.  
  14925.          5.
  14926.  
  14927.                       abortable_part ::= sequence_of_statements
  14928.  
  14929.   Dynamic Semantics
  14930.  
  14931.    6. For the execution of an asynchronous_select whose triggering_statement is 
  14932.       an entry_call_statement, the entry_name and actual parameters are 
  14933.       evaluated as for a simple entry call, see 9.5.3, and the entry call is 
  14934.       issued. If the entry call is queued (or requeued-with-abort), then the 
  14935.       abortable_part is executed. If the entry call is selected immediately, 
  14936.       and never requeued-with-abort, then the abortable_part is never started. 
  14937.  
  14938.    7. For the execution of an asynchronous_select whose triggering_statement is 
  14939.       a delay_statement, the delay_expression is evaluated and the expiration 
  14940.       time is determined, as for a normal delay_statement. If the expiration 
  14941.       time has not already passed, the abortable_part is executed. 
  14942.  
  14943.    8. If the abortable_part completes and is left prior to completion of the 
  14944.       triggering_statement, an attempt to cancel the triggering_statement is 
  14945.       made. If the attempt to cancel succeeds, see 9.5.3, and 9.6, the 
  14946.       asynchronous_select is complete. 
  14947.  
  14948.    9. If the triggering_statement completes other than due to cancellation, the 
  14949.       abortable_part is aborted (if started but not yet completed -- see 9.8). 
  14950.       If the triggering_statement completes normally, the optional 
  14951.       sequence_of_statements of the triggering_alternative is executed after 
  14952.       the abortable_part is left. 
  14953.  
  14954.             Examples
  14955.  
  14956.   10. Example of a main command loop for a command interpreter: 
  14957.  
  14958.         11.
  14959.  
  14960.                       loop
  14961.                         select
  14962.                           Terminal.Wait_For_Interrupt;
  14963.                           Put_Line("Interrupted");
  14964.                         then abort
  14965.                           -- This will be abandoned upon terminal interrupt
  14966.                           Put_Line("-> ");
  14967.                           Get_Line(Command, Last);
  14968.                           Process_Command(Command(1┬╖┬╖Last));
  14969.                         end select;
  14970.                       end loop;
  14971.  
  14972.   12. Example of a time-limited calculation: 
  14973.  
  14974.         13.
  14975.  
  14976.                       select
  14977.                         delay 5.0;
  14978.                         Put_Line("Calculation does not converge");
  14979.                       then abort
  14980.                         -- This calculation should finish in 5.0 seconds;
  14981.                         --  if not, it is assumed to diverge.
  14982.                         Horribly_Complicated_Recursive_Function(X, Y);
  14983.                       end select;
  14984.  
  14985.  
  14986. ΓòÉΓòÉΓòÉ 12.8. Abort of a Task - Abort of a Sequence of Statements ΓòÉΓòÉΓòÉ
  14987.  
  14988.    1. An abort_statement causes one or more tasks to become abnormal, thus 
  14989.       preventing any further interaction with such tasks. The completion of the 
  14990.       triggering_statement of an asynchronous_select causes a 
  14991.       sequence_of_statements to be aborted. 
  14992.  
  14993.             Syntax
  14994.  
  14995.          2.
  14996.  
  14997.                       abort_statement ::= abort task_name {, task_name};
  14998.  
  14999.   Name Resolution Rules
  15000.  
  15001.    3. Each task_name is expected to be of any task type; they need not all be 
  15002.       of the same task type. 
  15003.  
  15004.             Dynamic Semantics
  15005.  
  15006.    4. For the execution of an abort_statement, the given task_names are 
  15007.       evaluated in an arbitrary order. Each named task is then aborted, which 
  15008.       consists of making the task abnormal and aborting the execution of the 
  15009.       corresponding task_body, unless it is already completed. 
  15010.  
  15011.    5. When the execution of a construct is aborted (including that of a 
  15012.       task_body or of a sequence_of_statements), the execution of every 
  15013.       construct included within the aborted execution is also aborted, except 
  15014.       for executions included within the execution of an abort-deferred 
  15015.       operation; the execution of an abort-deferred operation continues to 
  15016.       completion without being affected by the abort; the following are the 
  15017.       abort-deferred operations: 
  15018.  
  15019.         a. a protected action; 
  15020.  
  15021.         b. waiting for an entry call to complete (after having initiated the 
  15022.            attempt to cancel it -- see below); 
  15023.  
  15024.         c. waiting for the termination of dependent tasks; 
  15025.  
  15026.         d. the execution of an Initialize procedure as the last step of the 
  15027.            default initialization of a controlled object; 
  15028.  
  15029.         e. the execution of a Finalize procedure as part of the finalization of 
  15030.            a controlled object; 
  15031.  
  15032.         f. an assignment operation to an object with a controlled part. 
  15033.  
  15034.    1. The last three of these are discussed further in 7.6. 
  15035.  
  15036.    2. When a master is aborted, all tasks that depend on that master are 
  15037.       aborted. 
  15038.  
  15039.    3. The order in which tasks become abnormal as the result of an 
  15040.       abort_statement or the abort of a sequence_of_statements is not specified 
  15041.       by the language. 
  15042.  
  15043.    4. If the execution of an entry call is aborted, an immediate attempt is 
  15044.       made to cancel the entry call, see 9.5.3. If the execution of a construct 
  15045.       is aborted at a time when the execution is blocked, other than for an 
  15046.       entry call, at a point that is outside the execution of an abort-deferred 
  15047.       operation, then the execution of the construct completes immediately. For 
  15048.       an abort due to an abort_statement, these immediate effects occur before 
  15049.       the execution of the abort_statement completes. Other than for these 
  15050.       immediate cases, the execution of a construct that is aborted does not 
  15051.       necessarily complete before the abort_statement completes. However, the 
  15052.       execution of the aborted construct completes no later than its next abort 
  15053.       completion point (if any) that occurs outside of an abort-deferred 
  15054.       operation; the following are abort completion points for an execution: 
  15055.  
  15056.         a. the point where the execution initiates the activation of another 
  15057.            task; 
  15058.  
  15059.         b. the end of the activation of a task; 
  15060.  
  15061.         c. the start or end of the execution of an entry call, 
  15062.            accept_statement, delay_statement, or abort_statement; 
  15063.  
  15064.         d. the start of the execution of a select_statement, or of the 
  15065.            sequence_of_statements of an exception_handler. 
  15066.  
  15067.   Bounded (Run-Time) Errors
  15068.  
  15069.    1. An attempt to execute an asynchronous_select as part of the execution of 
  15070.       an abort-deferred operation is a bounded error. Similarly, an attempt to 
  15071.       create a task that depends on a master that is included entirely within 
  15072.       the execution of an abort-deferred operation is a bounded error. In both 
  15073.       cases, Program_Error is raised if the error is detected by the 
  15074.       implementation; otherwise the operations proceed as they would outside an 
  15075.       abort-deferred operation, except that an abort of the abortable_part or 
  15076.       the created task might or might not have an effect. 
  15077.  
  15078.             Erroneous Execution
  15079.  
  15080.    2. If an assignment operation completes prematurely due to an abort, the 
  15081.       assignment is said to be disrupted; the target of the assignment or its 
  15082.       parts can become abnormal, and certain subsequent uses of the object can 
  15083.       be erroneous, as explained in 13.9.1. 
  15084.  
  15085.       NOTES 
  15086.  
  15087.    3. (38) An abort_statement should be used only in situations requiring 
  15088.       unconditional termination. 
  15089.  
  15090.    4. (39) A task is allowed to abort any task it can name, including itself. 
  15091.  
  15092.    5. (40) Additional requirements associated with abort are given in D.6: 
  15093.       ``Preemptive Abort''. 
  15094.  
  15095.  
  15096. ΓòÉΓòÉΓòÉ 12.9. Task and Entry Attributes ΓòÉΓòÉΓòÉ
  15097.  
  15098.  
  15099.   Dynamic Semantics
  15100.  
  15101.    1. For a prefix T that is of a task type (after any implicit dereference), 
  15102.       the following attributes are defined: 
  15103.  
  15104.    2. T'Callable 
  15105.  
  15106.                       Yields the value True when the task denoted by T is callable,
  15107.                       and False otherwise; a task is callable unless it is
  15108.                       completed or abnormal. The value of this attribute is of the
  15109.                       predefined type Boolean.
  15110.  
  15111.    3. T'Terminated 
  15112.  
  15113.                       Yields the value True if the task denoted by T is terminated,
  15114.                       and False otherwise. The value of this attribute is of the
  15115.                       predefined type Boolean.
  15116.  
  15117.    4. For a prefix E that denotes an entry of a task or protected unit, the 
  15118.       following attribute is defined. This attribute is only allowed within the 
  15119.       body of the task or protected unit, but excluding, in the case of an 
  15120.       entry of a task unit, within any program unit that is, itself, inner to 
  15121.       the body of the task unit. 
  15122.  
  15123.    5. E'Count 
  15124.  
  15125.                       Yields the number of calls presently queued on the entry E of
  15126.                       the current instance of the unit. The value of this
  15127.                       attribute is of the type universal_integer.
  15128.  
  15129.  NOTES 
  15130.  
  15131.    6. (41) For the Count attribute, the entry can be either a single entry or 
  15132.       an entry of a family. The name of the entry or entry family can be either 
  15133.       a direct_name or an expanded name. 
  15134.  
  15135.    7. (42) Within task units, algorithms interrogating the attribute E'Count 
  15136.       should take precautions to allow for the increase of the value of this 
  15137.       attribute for incoming entry calls, and its decrease, for example with 
  15138.       timed_entry_calls. Also, a conditional_entry_call may briefly increase 
  15139.       this value, even if the conditional call is not accepted. 
  15140.  
  15141.    8. (43) Within protected units, algorithms interrogating the attribute 
  15142.       E'Count in the entry_barrier for the entry E should take precautions to 
  15143.       allow for the evaluation of the condition of the barrier both before and 
  15144.       after queuing a given caller. 
  15145.  
  15146.  
  15147. ΓòÉΓòÉΓòÉ 12.10. Shared Variables ΓòÉΓòÉΓòÉ
  15148.  
  15149.  
  15150.   Static Semantics
  15151.  
  15152.    1. If two different objects, including nonoverlapping parts of the same 
  15153.       object, are independently addressable, they can be manipulated 
  15154.       concurrently by two different tasks without synchronization. Normally, 
  15155.       any two nonoverlapping objects are independently addressable. However, if 
  15156.       packing, record layout, or Component_Size is specified for a given 
  15157.       composite object, then it is implementation defined whether or not two 
  15158.       nonoverlapping parts of that composite object are independently 
  15159.       addressable. 
  15160.  
  15161.             Dynamic Semantics
  15162.  
  15163.    2. Separate tasks normally proceed independently and concurrently with one 
  15164.       another. However, task interactions can be used to synchronize the 
  15165.       actions of two or more tasks to allow, for example, meaningful 
  15166.       communication by the direct updating and reading of variables shared 
  15167.       between the tasks. The actions of two different tasks are synchronized in 
  15168.       this sense when an action of one task signals an action of the other 
  15169.       task; an action A1 is defined to signal an action A2 under the following 
  15170.       circumstances: 
  15171.  
  15172.         a. If A1 and A2 are part of the execution of the same task, and the 
  15173.            language rules require A1 to be performed before A2; 
  15174.  
  15175.         b. If A1 is the action of an activator that initiates the activation of 
  15176.            a task, and A2 is part of the execution of the task that is 
  15177.            activated; 
  15178.  
  15179.         c. If A1 is part of the activation of a task, and A2 is the action of 
  15180.            waiting for completion of the activation; 
  15181.  
  15182.         d. If A1 is part of the execution of a task, and A2 is the action of 
  15183.            waiting for the termination of the task; 
  15184.  
  15185.         e. If A1 is the action of issuing an entry call, and A2 is part of the 
  15186.            corresponding execution of the appropriate entry_body or 
  15187.            accept_statement. 
  15188.  
  15189.         f. If A1 is part of the execution of an accept_statement or entry_body, 
  15190.            and A2 is the action of returning from the corresponding entry call; 
  15191.  
  15192.         g. If A1 is part of the execution of a protected procedure body or 
  15193.            entry_body for a given protected object, and A2 is part of a later 
  15194.            execution of an entry_body for the same protected object; 
  15195.  
  15196.         h. If A1 signals some action that in turn signals A2. 
  15197.  
  15198.   Erroneous Execution
  15199.  
  15200.    1. Given an action of assigning to an object, and an action of reading or 
  15201.       updating a part of the same object (or of a neighboring object if the two 
  15202.       are not independently addressable), then the execution of the actions is 
  15203.       erroneous unless the actions are sequential. Two actions are sequential 
  15204.       if one of the following is true: 
  15205.  
  15206.         a. One action signals the other; 
  15207.  
  15208.         b. Both actions occur as part of the execution of the same task; 
  15209.  
  15210.         c. Both actions occur as part of protected actions on the same 
  15211.            protected object, and at most one of the actions is part of a call 
  15212.            on a protected function of the protected object. 
  15213.  
  15214.    1. A pragma Atomic or Atomic_Components may also be used to ensure that 
  15215.       certain reads and updates are sequential --  see C.6. 
  15216.  
  15217.  
  15218. ΓòÉΓòÉΓòÉ 12.11. Example of Tasking and Synchronization ΓòÉΓòÉΓòÉ
  15219.  
  15220.  
  15221.   Examples
  15222.  
  15223.    1. The following example defines a buffer protected object to smooth 
  15224.       variations between the speed of output of a producing task and the speed 
  15225.       of input of some consuming task. For instance, the producing task might 
  15226.       have the following structure: 
  15227.  
  15228.          2.
  15229.  
  15230.                       task Producer;
  15231.  
  15232.          3.
  15233.  
  15234.                       task body Producer is
  15235.                         Char : Character;
  15236.                       begin
  15237.                         loop
  15238.                          ┬╖┬╖┬╖ --  produce the next character Char
  15239.                          Buffer.Write(Char);
  15240.                          exit when Char = ASCII.EOT;
  15241.                         end loop;
  15242.                       end Producer;
  15243.  
  15244.    4. and the consuming task might have the following structure: 
  15245.  
  15246.          5.
  15247.  
  15248.                       task Consumer;
  15249.  
  15250.          6.
  15251.  
  15252.                       task body Consumer is
  15253.                         Char : Character;
  15254.                       begin
  15255.                         loop
  15256.                          Buffer.Read(Char);
  15257.                          exit when Char = ASCII.EOT;
  15258.                          ┬╖┬╖┬╖ --  consume the character Char
  15259.                         end loop;
  15260.                       end Consumer;
  15261.  
  15262.    7. The buffer object contains an internal pool of characters managed in a 
  15263.       round-robin fashion. The pool has two indices, an In_Index denoting the 
  15264.       space for the next input character and an Out_Index denoting the space 
  15265.       for the next output character. 
  15266.  
  15267.          8.
  15268.  
  15269.                       protected Buffer is
  15270.                         entry Read (C : out Character);
  15271.                         entry Write(C : in  Character);
  15272.                       private
  15273.                         Pool    : String(1 ┬╖┬╖ 100);
  15274.                         Count   : Natural := 0;
  15275.                         In_Index, Out_Index : Positive := 1;
  15276.                       end Buffer;
  15277.  
  15278.          9.
  15279.  
  15280.                       protected body Buffer is
  15281.                         entry Write(C : in Character)
  15282.                          when Count < Pool'Length is
  15283.                         begin
  15284.                          Pool(In_Index) := C;
  15285.                          In_Index := (In_Index mod Pool'Length) + 1;
  15286.                          Count   := Count + 1;
  15287.                         end Write;
  15288.  
  15289.         10.
  15290.  
  15291.                         entry Read(C : out Character)
  15292.                          when Count > 0 is
  15293.                         begin
  15294.                          C := Pool(Out_Index);
  15295.                          Out_Index := (Out_Index mod Pool'Length) + 1;
  15296.                          Count   := Count - 1;
  15297.                         end Read;
  15298.                       end Buffer;
  15299.  
  15300.  
  15301. ΓòÉΓòÉΓòÉ 13. Program Structure and Compilation Issues ΓòÉΓòÉΓòÉ
  15302.  
  15303.    1. The overall structure of programs and the facilities for separate 
  15304.       compilation are described in this section. A program is a set of 
  15305.       partitions, each of which may execute in a separate address space, 
  15306.       possibly on a separate computer. 
  15307.  
  15308.    2. As explained below, a partition is constructed from library units. 
  15309.       Syntactically, the declaration of a library unit is a library_item, as is 
  15310.       the body of a library unit. An implementation may support a concept of a 
  15311.       program library (or simply, a ``library''), which contains library_items 
  15312.       and their subunits. Library units may be organized into a hierarchy of 
  15313.       children, grandchildren, and so on. 
  15314.  
  15315.    3. This section has two clauses:  (see 10.1: ``Separate Compilation'') 
  15316.       discusses compile-time issues related to separate compilation. (see 10.2: 
  15317.       ``Program Execution'') discusses issues related to what is traditionally 
  15318.       known as ``link time'' and ``run time'' -- building and executing 
  15319.       partitions. 
  15320.  
  15321.  10.1                          Separate Compilation 
  15322.  10.2                          Program Execution --- The Detailed Node Listing 
  15323.                                --- 
  15324.  10.1                          Separate Compilation 
  15325.  10.1.1                        Compilation Units - Library Units 
  15326.  10.1.2                        Context Clauses - With Clauses 
  15327.  10.1.3                        Subunits of Compilation Units 
  15328.  10.1.4                        The Compilation Process 
  15329.  10.1.5                        Pragmas and Program Units 
  15330.  10.1.6                        Environment-Level Visibility Rules 
  15331.  10.2                          Program Execution 
  15332.  10.2.1                        Elaboration Control 
  15333.  
  15334.  
  15335. ΓòÉΓòÉΓòÉ 13.1. Separate Compilation ΓòÉΓòÉΓòÉ
  15336.  
  15337.    1. A program unit is either a package, a task unit, a protected unit, a 
  15338.       protected entry, a generic unit, or an explicitly declared subprogram 
  15339.       other than an enumeration literal. Certain kinds of program units can be 
  15340.       separately compiled. Alternatively, they can appear physically nested 
  15341.       within other program units. 
  15342.  
  15343.    2. The text of a program can be submitted to the compiler in one or more 
  15344.       compilations. Each compilation is a succession of compilation_units. A 
  15345.       compilation_unit contains either the declaration, the body, or a renaming 
  15346.       of a program unit. The representation for a compilation is 
  15347.       implementation-defined. 
  15348.  
  15349.    3. A library unit is a separately compiled program unit, and is always a 
  15350.       package, subprogram, or generic unit. Library units may have other 
  15351.       (logically nested) library units as children, and may have other program 
  15352.       units physically nested within them. A root library unit, together with 
  15353.       its children and grandchildren and so on, form a subsystem. 
  15354.  
  15355.             Implementation Permissions
  15356.  
  15357.    4. An implementation may impose implementation-defined restrictions on 
  15358.       compilations that contain multiple compilation_units. 
  15359.  
  15360.  10.1.1                        Compilation Units - Library Units 
  15361.  10.1.2                        Context Clauses - With Clauses 
  15362.  10.1.3                        Subunits of Compilation Units 
  15363.  10.1.4                        The Compilation Process 
  15364.  10.1.5                        Pragmas and Program Units 
  15365.  10.1.6                        Environment-Level Visibility Rules 
  15366.  
  15367.  
  15368. ΓòÉΓòÉΓòÉ 13.1.1. Compilation Units - Library Units ΓòÉΓòÉΓòÉ
  15369.  
  15370.    1. A library_item is a compilation unit that is the declaration, body, or 
  15371.       renaming of a library unit. Each library unit (except Standard) has a 
  15372.       parent unit, which is a library package or generic library package. A 
  15373.       library unit is a child of its parent unit. The root library units are 
  15374.       the children of the predefined library package Standard. 
  15375.  
  15376.             Syntax
  15377.  
  15378.          2.
  15379.  
  15380.                       compilation ::= {compilation_unit}
  15381.  
  15382.          3.
  15383.  
  15384.                       compilation_unit ::=
  15385.                          context_clause library_item
  15386.                         | context_clause subunit
  15387.  
  15388.          4.
  15389.  
  15390.                       library_item ::= [private] library_unit_declaration
  15391.                         | library_unit_body
  15392.                         | [private] library_unit_renaming_declaration
  15393.  
  15394.          5.
  15395.  
  15396.                       library_unit_declaration ::=
  15397.                          subprogram_declaration | package_declaration
  15398.                         | generic_declaration   | generic_instantiation
  15399.  
  15400.          6.
  15401.  
  15402.                       library_unit_renaming_declaration ::=
  15403.                          package_renaming_declaration
  15404.                         | generic_renaming_declaration
  15405.                         | subprogram_renaming_declaration
  15406.  
  15407.          7.
  15408.  
  15409.                       library_unit_body ::= subprogram_body | package_body
  15410.  
  15411.          8.
  15412.  
  15413.                       parent_unit_name ::= name
  15414.  
  15415.    9. A library unit is a program unit that is declared by a library_item. When 
  15416.       a program unit is a library unit, the prefix ``library'' is used to refer 
  15417.       to it (or ``generic library'' if generic), as well as to its declaration 
  15418.       and body, as in ``library procedure'', ``library package_body'', or 
  15419.       ``generic library package''. The term compilation unit is used to refer 
  15420.       to a compilation_unit. When the meaning is clear from context, the term 
  15421.       is also used to refer to the library_item of a compilation_unit or to the 
  15422.       proper_body of a subunit (that is, the compilation_unit without the 
  15423.       context_clause and the separate (parent_unit_name)). 
  15424.  
  15425.   10. The parent declaration of a library_item (and of the library unit) is the 
  15426.       declaration denoted by the parent_unit_name, if any, of the 
  15427.       defining_program_unit_name of the library_item. If there is no 
  15428.       parent_unit_name, the parent declaration is the declaration of Standard, 
  15429.       the library_item is a root library_item, and the library unit (renaming) 
  15430.       is a root library unit (renaming). The declaration and body of Standard 
  15431.       itself have no parent declaration. The parent unit of a library_item or 
  15432.       library unit is the library unit declared by its parent declaration. 
  15433.  
  15434.   11. The children of a library unit occur immediately within the declarative 
  15435.       region of the declaration of the library unit. The ancestors of a library 
  15436.       unit are itself, its parent, its parent's parent, and so on. (Standard is 
  15437.       an ancestor of every library unit.) The descendant relation is the 
  15438.       inverse of the ancestor relation. 
  15439.  
  15440.   12. A library_unit_declaration or a library_unit_renaming_declaration is 
  15441.       private if the declaration is immediately preceded by the reserved word 
  15442.       private; it is otherwise public. A library unit is private or public 
  15443.       according to its declaration. The public descendants of a library unit 
  15444.       are the library unit itself, and the public descendants of its public 
  15445.       children. Its other descendants are private descendants. 
  15446.  
  15447.             Legality Rules
  15448.  
  15449.   13. The parent unit of a library_item shall be a library package or generic 
  15450.       library package. 
  15451.  
  15452.   14. If a defining_program_unit_name of a given declaration or body has a 
  15453.       parent_unit_name, then the given declaration or body shall be a 
  15454.       library_item. The body of a program unit shall be a library_item if and 
  15455.       only if the declaration of the program unit is a library_item. In a 
  15456.       library_unit_renaming_declaration, the (old) name shall denote a 
  15457.       library_item. 
  15458.  
  15459.   15. A parent_unit_name (which can be used within a defining_program_unit_name 
  15460.       of a library_item and in the separate clause of a subunit), and each of 
  15461.       its prefixes, shall not denote a renaming_declaration. On the other hand, 
  15462.       a name that denotes a library_unit_renaming_declaration is allowed in a 
  15463.       with_clause and other places where the name of a library unit is allowed. 
  15464.  
  15465.   16. If a library package is an instance of a generic package, then every 
  15466.       child of the library package shall either be itself an instance or be a 
  15467.       renaming of a library unit. 
  15468.  
  15469.   17. A child of a generic library package shall either be itself a generic 
  15470.       unit or be a renaming of some other child of the same generic unit. The 
  15471.       renaming of a child of a generic package shall occur only within the 
  15472.       declarative region of the generic package. 
  15473.  
  15474.   18. A child of a parent generic package shall be instantiated or renamed only 
  15475.       within the declarative region of the parent generic. 
  15476.  
  15477.   19. For each declaration or renaming of a generic unit as a child of some 
  15478.       parent generic package, there is a corresponding declaration nested 
  15479.       immediately within each instance of the parent. This declaration is 
  15480.       visible only within the scope of a with_clause that mentions the child 
  15481.       generic unit. 
  15482.  
  15483.   20. A library subprogram shall not override a primitive subprogram. 
  15484.  
  15485.   21. The defining name of a function that is a compilation unit shall not be 
  15486.       an operator_symbol. 
  15487.  
  15488.             Static Semantics
  15489.  
  15490.   22. A subprogram_renaming_declaration that is a 
  15491.       library_unit_renaming_declaration is a renaming-as-declaration, not a 
  15492.       renaming-as-body. 
  15493.  
  15494.   23. There are two kinds of dependences among compilation units: 
  15495.  
  15496.         a. The semantic dependences (see below) are the ones needed to check 
  15497.            the compile-time rules across compilation unit boundaries; a 
  15498.            compilation unit depends semantically on the other compilation units 
  15499.            needed to determine its legality. The visibility rules are based on 
  15500.            the semantic dependences. 
  15501.  
  15502.         b. The elaboration dependences, see 10.2, determine the order of 
  15503.            elaboration of library_items. 
  15504.  
  15505.    1. A library_item depends semantically upon its parent declaration. A 
  15506.       subunit depends semantically upon its parent body. A library_unit_body 
  15507.       depends semantically upon the corresponding library_unit_declaration, if 
  15508.       any. A compilation unit depends semantically upon each library_item 
  15509.       mentioned in a with_clause of the compilation unit. In addition, if a 
  15510.       given compilation unit contains an attribute_reference of a type defined 
  15511.       in another compilation unit, then the given compilation unit depends 
  15512.       semantically upon the other compilation unit. The semantic dependence 
  15513.       relationship is transitive. 
  15514.  
  15515.       NOTES 
  15516.  
  15517.    2. (1) A simple program may consist of a single compilation unit. A 
  15518.       compilation need not have any compilation units; for example, its text 
  15519.       can consist of pragmas. 
  15520.  
  15521.    3. (2) The designator of a library function cannot be an operator_symbol, 
  15522.       but a nonlibrary renaming_declaration is allowed to rename a library 
  15523.       function as an operator. Within a partition, two library subprograms are 
  15524.       required to have distinct names and hence cannot overload each other. 
  15525.       However, renaming_declarations are allowed to define overloaded names for 
  15526.       such subprograms, and a locally declared subprogram is allowed to 
  15527.       overload a library subprogram. The expanded name Standard.L can be used 
  15528.       to denote a root library unit L (unless the declaration of Standard is 
  15529.       hidden) since root library unit declarations occur immediately within the 
  15530.       declarative region of package Standard. 
  15531.  
  15532.             Examples
  15533.  
  15534.    4. Examples of library units: 
  15535.  
  15536.          5.
  15537.  
  15538.                       package Rational_Numbers.IO is
  15539.                         -- public child of Rational_Numbers, see 7.1
  15540.                         procedure Put(R : in  Rational);
  15541.                         procedure Get(R : out Rational);
  15542.                       end Rational_Numbers.IO;
  15543.  
  15544.          6.
  15545.  
  15546.                       private procedure Rational_Numbers.Reduce(R : in out Rational);
  15547.                       -- private child of Rational_Numbers
  15548.  
  15549.          7.
  15550.  
  15551.                       with Rational_Numbers.Reduce;  -- refer to a private child
  15552.                       package body Rational_Numbers is
  15553.                         ┬╖┬╖┬╖
  15554.                       end Rational_Numbers;
  15555.  
  15556.          8.
  15557.  
  15558.                       with Rational_Numbers.IO; use Rational_Numbers;
  15559.                       with Ada.Text_io;  --  see A.10
  15560.                       procedure Main is  -- a root library procedure
  15561.                         R : Rational;
  15562.                       begin
  15563.                         R := 5/3;    -- construct a rational number, see 7.1
  15564.                         Ada.Text_IO.Put("The answer is: ");
  15565.                         IO.Put(R);
  15566.                         Ada.Text_IO.New_Line;
  15567.                       end Main;
  15568.  
  15569.          9.
  15570.  
  15571.                       with Rational_Numbers.IO;
  15572.                       package Rational_IO renames Rational_Numbers.IO;
  15573.                       -- a library unit renaming declaration
  15574.  
  15575.   10. Each of the above library_items can be submitted to the compiler 
  15576.       separately. 
  15577.  
  15578.  
  15579. ΓòÉΓòÉΓòÉ 13.1.2. Context Clauses - With Clauses ΓòÉΓòÉΓòÉ
  15580.  
  15581.    1. A context_clause is used to specify the library_items whose names are 
  15582.       needed within a compilation unit. 
  15583.  
  15584.             Syntax
  15585.  
  15586.          2.
  15587.  
  15588.                       context_clause ::= {context_item}
  15589.  
  15590.          3.
  15591.  
  15592.                       context_item ::= with_clause | use_clause
  15593.  
  15594.          4.
  15595.  
  15596.                       with_clause ::= with library_unit_name {, library_unit_name};
  15597.  
  15598.   Name Resolution Rules
  15599.  
  15600.    5. The scope of a with_clause that appears on a library_unit_declaration or 
  15601.       library_unit_renaming_declaration consists of the entire declarative 
  15602.       region of the declaration, which includes all children and subunits. The 
  15603.       scope of a with_clause that appears on a body consists of the body, which 
  15604.       includes all subunits. 
  15605.  
  15606.    6. A library_item is mentioned in a with_clause if it is denoted by a 
  15607.       library_unit_name or a prefix in the with_clause. 
  15608.  
  15609.    7. Outside its own declarative region, the declaration or renaming of a 
  15610.       library unit can be visible only within the scope of a with_clause that 
  15611.       mentions it. The visibility of the declaration or renaming of a library 
  15612.       unit otherwise follows from its placement in the environment. 
  15613.  
  15614.             Legality Rules
  15615.  
  15616.    8. If a with_clause of a given compilation_unit mentions a private child of 
  15617.       some library unit, then the given compilation_unit shall be either the 
  15618.       declaration of a private descendant of that library unit or the body or 
  15619.       subunit of a (public or private) descendant of that library unit. 
  15620.  
  15621.       NOTES 
  15622.  
  15623.    9. (3) A library_item mentioned in a with_clause of a compilation unit is 
  15624.       visible within the compilation unit and hence acts just like an ordinary 
  15625.       declaration. Thus, within a compilation unit that mentions its 
  15626.       declaration, the name of a library package can be given in use_clauses 
  15627.       and can be used to form expanded names, a library subprogram can be 
  15628.       called, and instances of a generic library unit can be declared. If a 
  15629.       child of a parent generic package is mentioned in a with_clause, then the 
  15630.       corresponding declaration nested within each visible instance is visible 
  15631.       within the compilation unit. 
  15632.  
  15633.  
  15634. ΓòÉΓòÉΓòÉ 13.1.3. Subunits of Compilation Units ΓòÉΓòÉΓòÉ
  15635.  
  15636.    1. Subunits are like child units, with these (important) differences: 
  15637.       subunits support the separate compilation of bodies only (not 
  15638.       declarations); the parent contains a body_stub to indicate the existence 
  15639.       and place of each of its subunits; declarations appearing in the parent's 
  15640.       body can be visible within the subunits. 
  15641.  
  15642.             Syntax
  15643.  
  15644.          2.
  15645.  
  15646.                       body_stub ::=
  15647.                          subprogram_body_stub
  15648.                         | package_body_stub
  15649.                         | task_body_stub
  15650.                         | protected_body_stub
  15651.  
  15652.          3.
  15653.  
  15654.                       subprogram_body_stub ::= subprogram_specification is separate;
  15655.  
  15656.          4.
  15657.  
  15658.                       package_body_stub ::= package body defining_identifier is separate;
  15659.  
  15660.          5.
  15661.  
  15662.                       task_body_stub ::= task body defining_identifier is separate;
  15663.  
  15664.          6.
  15665.  
  15666.                       protected_body_stub ::=
  15667.                         protected body defining_identifier is separate;
  15668.  
  15669.          7.
  15670.  
  15671.                       subunit ::= separate (parent_unit_name) proper_body
  15672.  
  15673.   Legality Rules
  15674.  
  15675.    8. The parent body of a subunit is the body of the program unit denoted by 
  15676.       its parent_unit_name. The term subunit is used to refer to a subunit and 
  15677.       also to the proper_body of a subunit. 
  15678.  
  15679.    9. The parent body of a subunit shall be present in the current environment, 
  15680.       and shall contain a corresponding body_stub with the same 
  15681.       defining_identifier as the subunit. 
  15682.  
  15683.   10. A package_body_stub shall be the completion of a package_declaration or 
  15684.       generic_package_declaration; a task_body_stub shall be the completion of 
  15685.       a task_declaration; a protected_body_stub shall be the completion of a 
  15686.       protected_declaration. 
  15687.  
  15688.   11. In contrast, a subprogram_body_stub need not be the completion of a 
  15689.       previous declaration, in which case the _stub declares the subprogram. If 
  15690.       the _stub is a completion, it shall be the completion of a 
  15691.       subprogram_declaration or generic_subprogram_declaration. The profile of 
  15692.       a subprogram_body_stub that completes a declaration shall conform fully 
  15693.       to that of the declaration. 
  15694.  
  15695.   12. A subunit that corresponds to a body_stub shall be of the same kind 
  15696.       (package_, subprogram_, task_, or protected_) as the body_stub. The 
  15697.       profile of a subprogram_body subunit shall be fully conformant to that of 
  15698.       the corresponding body_stub. 
  15699.  
  15700.   13. A body_stub shall appear immediately within the declarative_part of a 
  15701.       compilation unit body. This rule does not apply within an instance of a 
  15702.       generic unit. 
  15703.  
  15704.   14. The defining_identifiers of all body_stubs that appear immediately within 
  15705.       a particular declarative_part shall be distinct. 
  15706.  
  15707.             Post-Compilation Rules
  15708.  
  15709.   15. For each body_stub, there shall be a subunit containing the corresponding 
  15710.       proper_body. 
  15711.  
  15712.       NOTES 
  15713.  
  15714.   16. (4) The rules in 10.1.4: ``The Compilation Process'', say that a 
  15715.       body_stub is equivalent to the corresponding proper_body. This implies: 
  15716.  
  15717.         a. Visibility within a subunit is the visibility that would be obtained 
  15718.            at the place of the corresponding body_stub (within the parent body) 
  15719.            if the context_clause of the subunit were appended to that of the 
  15720.            parent body. 
  15721.  
  15722.         b. The effect of the elaboration of a body_stub is to elaborate the 
  15723.            subunit. 
  15724.  
  15725.   Examples
  15726.  
  15727.    1. The package Parent is first written without subunits: 
  15728.  
  15729.          2.
  15730.  
  15731.                       package Parent is
  15732.                         procedure Inner;
  15733.                       end Parent;
  15734.  
  15735.          3.
  15736.  
  15737.                       with Ada.Text_IO;
  15738.                       package body Parent is
  15739.                         Variable : String := "Hello, there.";
  15740.                         procedure Inner is
  15741.                         begin
  15742.                           Ada.Text_IO.Put_Line(Variable);
  15743.                         end Inner;
  15744.                       end Parent;
  15745.  
  15746.    4. The body of procedure Inner may be turned into a subunit by rewriting the 
  15747.       package body as follows (with the declaration of Parent remaining the 
  15748.       same): 
  15749.  
  15750.          5.
  15751.  
  15752.                       package body Parent is
  15753.                         Variable : String := "Hello, there.";
  15754.                         procedure Inner is separate;
  15755.                       end Parent;
  15756.  
  15757.          6.
  15758.  
  15759.                       with Ada.Text_IO;
  15760.                       separate(Parent)
  15761.                       procedure Inner is
  15762.                       begin
  15763.                         Ada.Text_IO.Put_Line(Variable);
  15764.                       end Inner;
  15765.  
  15766.  
  15767. ΓòÉΓòÉΓòÉ 13.1.4. The Compilation Process ΓòÉΓòÉΓòÉ
  15768.  
  15769.    1. Each compilation unit submitted to the compiler is compiled in the 
  15770.       context of an environment declarative_part (or simply, an environment), 
  15771.       which is a conceptual declarative_part that forms the outermost 
  15772.       declarative region of the context of any compilation. At run time, an 
  15773.       environment forms the declarative_part of the body of the environment 
  15774.       task of a partition, see 10.2: ``Program Execution''. 
  15775.  
  15776.    2. The declarative_items of the environment are library_items appearing in 
  15777.       an order such that there are no forward semantic dependences. Each 
  15778.       included subunit occurs in place of the corresponding stub. The 
  15779.       visibility rules apply as if the environment were the outermost 
  15780.       declarative region, except that with_clauses are needed to make 
  15781.       declarations of library units visible, see 10.1.2. 
  15782.  
  15783.    3. The mechanisms for creating an environment and for adding and replacing 
  15784.       compilation units within an environment are implementation defined. 
  15785.  
  15786.             Name Resolution Rules
  15787.  
  15788.    4. If a library_unit_body that is a subprogram_body is submitted to the 
  15789.       compiler, it is interpreted only as a completion if a 
  15790.       library_unit_declaration for a subprogram or a generic subprogram with 
  15791.       the same defining_program_unit_name already exists in the environment 
  15792.       (even if the profile of the body is not type conformant with that of the 
  15793.       declaration); otherwise the subprogram_body is interpreted as both the 
  15794.       declaration and body of a library subprogram. 
  15795.  
  15796.             Legality Rules
  15797.  
  15798.    5. When a compilation unit is compiled, all compilation units upon which it 
  15799.       depends semantically shall already exist in the environment; the set of 
  15800.       these compilation units shall be consistent in the sense that the new 
  15801.       compilation unit shall not semantically depend (directly or indirectly) 
  15802.       on two different versions of the same compilation unit, nor on an earlier 
  15803.       version of itself. 
  15804.  
  15805.             Implementation Permissions
  15806.  
  15807.    6. The implementation may require that a compilation unit be legal before 
  15808.       inserting it into the environment. 
  15809.  
  15810.    7. When a compilation unit that declares or renames a library unit is added 
  15811.       to the environment, the implementation may remove from the environment 
  15812.       any preexisting library_item with the same defining_program_unit_name. 
  15813.       When a compilation unit that is a subunit or the body of a library unit 
  15814.       is added to the environment, the implementation may remove from the 
  15815.       environment any preexisting version of the same compilation unit. When a 
  15816.       given compilation unit is removed from the environment, the 
  15817.       implementation may also remove any compilation unit that depends 
  15818.       semantically upon the given one. If the given compilation unit contains 
  15819.       the body of a subprogram to which a pragma Inline applies, the 
  15820.       implementation may also remove any compilation unit containing a call to 
  15821.       that subprogram. 
  15822.  
  15823.       NOTES 
  15824.  
  15825.    8. (5) The rules of the language are enforced across compilation and 
  15826.       compilation unit boundaries, just as they are enforced within a single 
  15827.       compilation unit. 
  15828.  
  15829.    9. (6) An implementation may support a concept of a library, which contains 
  15830.       library_items. If multiple libraries are supported, the implementation 
  15831.       has to define how a single environment is constructed when a compilation 
  15832.       unit is submitted to the compiler. Naming conflicts between different 
  15833.       libraries might be resolved by treating each library as the root of a 
  15834.       hierarchy of child library units. 
  15835.  
  15836.   10. (7) A compilation unit containing an instantiation of a separately 
  15837.       compiled generic unit does not semantically depend on the body of the 
  15838.       generic unit. Therefore, replacing the generic body in the environment 
  15839.       does not result in the removal of the compilation unit containing the 
  15840.       instantiation. 
  15841.  
  15842.  
  15843. ΓòÉΓòÉΓòÉ 13.1.5. Pragmas and Program Units ΓòÉΓòÉΓòÉ
  15844.  
  15845.    1. This subclause discusses pragmas related to program units, library units, 
  15846.       and compilations. 
  15847.  
  15848.             Name Resolution Rules
  15849.  
  15850.    2. Certain pragmas are defined to be program unit pragmas. A name given as 
  15851.       the argument of a program unit pragma shall resolve to denote the 
  15852.       declarations or renamings of one or more program units that occur 
  15853.       immediately within the declarative region or compilation in which the 
  15854.       pragma immediately occurs, or it shall resolve to denote the declaration 
  15855.       of the immediately enclosing program unit (if any); the pragma applies to 
  15856.       the denoted program unit(s). If there are no names given as arguments, 
  15857.       the pragma applies to the immediately enclosing program unit. 
  15858.  
  15859.             Legality Rules
  15860.  
  15861.    3. A program unit pragma shall appear in one of these places: 
  15862.  
  15863.         a. At the place of a compilation_unit, in which case the pragma shall 
  15864.            immediately follow in the same compilation (except for other 
  15865.            pragmas) a library_unit_declaration that is a 
  15866.            subprogram_declaration, generic_subprogram_declaration, or 
  15867.            generic_instantiation, and the pragma shall have an argument that is 
  15868.            a name denoting that declaration. 
  15869.  
  15870.         b. Immediately within the declaration of a program unit and before any 
  15871.            nested declaration, in which case the argument, if any, shall be a 
  15872.            direct_name that denotes the immediately enclosing program unit 
  15873.            declaration. 
  15874.  
  15875.         c. At the place of a declaration other than the first, of a 
  15876.            declarative_part or program unit declaration, in which case the 
  15877.            pragma shall have an argument, which shall be a direct_name that 
  15878.            denotes one or more of the following (and nothing else): a 
  15879.            subprogram_declaration, a generic_subprogram_declaration, or a 
  15880.            generic_instantiation, of the same declarative_part or program unit 
  15881.            declaration. 
  15882.  
  15883.    1. Certain program unit pragmas are defined to be library unit pragmas. The 
  15884.       name, if any, in a library unit pragma shall denote the declaration of a 
  15885.       library unit. 
  15886.  
  15887.             Post-Compilation Rules
  15888.  
  15889.    2. Certain pragmas are defined to be configuration pragmas; they shall 
  15890.       appear before the first compilation_unit of a compilation. They are 
  15891.       generally used to select a partition-wide or system-wide option. The 
  15892.       pragma applies to all compilation_units appearing in the compilation, 
  15893.       unless there are none, in which case it applies to all future 
  15894.       compilation_units compiled into the same environment. 
  15895.  
  15896.             Implementation Permissions
  15897.  
  15898.    3. An implementation may place restrictions on configuration pragmas, so 
  15899.       long as it allows them when the environment contains no library_items 
  15900.       other than those of the predefined environment. 
  15901.  
  15902.  
  15903. ΓòÉΓòÉΓòÉ 13.1.6. Environment-Level Visibility Rules ΓòÉΓòÉΓòÉ
  15904.  
  15905.    1. The normal visibility rules do not apply within a parent_unit_name or a 
  15906.       context_clause, nor within a pragma that appears at the place of a 
  15907.       compilation unit. The special visibility rules for those contexts are 
  15908.       given here. 
  15909.  
  15910.             Static Semantics
  15911.  
  15912.    2. Within the parent_unit_name at the beginning of a library_item, and 
  15913.       within a with_clause, the only declarations that are visible are those 
  15914.       that are library_items of the environment, and the only declarations that 
  15915.       are directly visible are those that are root library_items of the 
  15916.       environment. Notwithstanding the rules of  4.1.3, an expanded name in a 
  15917.       with_clause may consist of a prefix that denotes a generic package and a 
  15918.       selector_name that denotes a child of that generic package (The child is 
  15919.       necessarily a generic unit, see See 10.1.1). 
  15920.  
  15921.    3. Within a use_clause or pragma that is within a context_clause, each 
  15922.       library_item mentioned in a previous with_clause of the same 
  15923.       context_clause is visible, and each root library_item so mentioned is 
  15924.       directly visible. In addition, within such a use_clause, if a given 
  15925.       declaration is visible or directly visible, each declaration that occurs 
  15926.       immediately within the given declaration's visible part is also visible. 
  15927.       No other declarations are visible or directly visible. 
  15928.  
  15929.    4. Within the parent_unit_name of a subunit, library_items are visible as 
  15930.       they are in the parent_unit_name of a library_item; in addition, the 
  15931.       declaration corresponding to each body_stub in the environment is also 
  15932.       visible. 
  15933.  
  15934.    5. Within a pragma that appears at the place of a compilation unit, the 
  15935.       immediately preceding library_item and each of its ancestors is visible. 
  15936.       The ancestor root library_item is directly visible. 
  15937.  
  15938.  
  15939. ΓòÉΓòÉΓòÉ 13.2. Program Execution ΓòÉΓòÉΓòÉ
  15940.  
  15941.    1. An Ada program consists of a set of partitions, which can execute in 
  15942.       parallel with one another, possibly in a separate address space, and 
  15943.       possibly on a separate computer. 
  15944.  
  15945.             Post-Compilation Rules
  15946.  
  15947.    2. A partition is a program or part of a program that can be invoked from 
  15948.       outside the Ada implementation. For example, on many systems, a partition 
  15949.       might be an executable file generated by the system linker. The user can 
  15950.       explicitly assign library units to a partition. The assignment is done in 
  15951.       an implementation-defined manner. The compilation units included in a 
  15952.       partition are those of the explicitly assigned library units, as well as 
  15953.       other compilation units needed by those library units. The compilation 
  15954.       units needed by a given compilation unit are determined as follows 
  15955.       (unless specified otherwise via an implementation-defined pragma, or by 
  15956.       some other implementation-defined means): 
  15957.  
  15958.         a. A compilation unit needs itself; 
  15959.  
  15960.         b. If a compilation unit is needed, then so are any compilation units 
  15961.            upon which it depends semantically; 
  15962.  
  15963.         c. If a library_unit_declaration is needed, then so is any 
  15964.            corresponding library_unit_body; 
  15965.  
  15966.         d. If a compilation unit with stubs is needed, then so are any 
  15967.            corresponding subunits. 
  15968.  
  15969.    1. The user can optionally designate (in an implementation-defined manner) 
  15970.       one subprogram as the main subprogram for the partition. A main 
  15971.       subprogram, if specified, shall be a subprogram. 
  15972.  
  15973.    2. Each partition has an anonymous environment task, which is an implicit 
  15974.       outermost task whose execution elaborates the library_items of the 
  15975.       environment declarative_part, and then calls the main subprogram, if 
  15976.       there is one. A partition's execution is that of its tasks. 
  15977.  
  15978.    3. The order of elaboration of library units is determined primarily by the 
  15979.       elaboration dependences. There is an elaboration dependence of a given 
  15980.       library_item upon another if the given library_item or any of its 
  15981.       subunits depends semantically on the other library_item. In addition, if 
  15982.       a given library_item or any of its subunits has a pragma Elaborate or 
  15983.       Elaborate_All that mentions another library unit, then there is an 
  15984.       elaboration dependence of the given library_item upon the body of the 
  15985.       other library unit, and, for Elaborate_All only, upon each library_item 
  15986.       needed by the declaration of the other library unit. 
  15987.  
  15988.    4. The environment task for a partition has the following structure: 
  15989.  
  15990.          5.
  15991.  
  15992.                       task Environment_Task;
  15993.  
  15994.          6.
  15995.  
  15996.                       task body Environment_Task is
  15997.                         ┬╖┬╖┬╖ (1) -- The environment declarative_part
  15998.                             -- (that is, the sequence of library_items) goes here.
  15999.                       begin
  16000.                         ┬╖┬╖┬╖ (2) -- Call the main subprogram, if there is one.
  16001.                       end Environment_Task;
  16002.  
  16003.    7. The environment declarative_part at (1) is a sequence of 
  16004.       declarative_items consisting of copies of the library_items included in 
  16005.       the partition. The order of elaboration of library_items is the order in 
  16006.       which they appear in the environment declarative_part: 
  16007.  
  16008.         a. The order of all included library_items is such that there are no 
  16009.            forward elaboration dependences. 
  16010.  
  16011.         b. Any included library_unit_declaration to which a pragma 
  16012.            Elaborate_Body applies is immediately followed by its 
  16013.            library_unit_body, if included. 
  16014.  
  16015.         c. All library_items declared pure occur before any that are not 
  16016.            declared pure. 
  16017.  
  16018.         d. All preelaborated library_items occur before any that are not 
  16019.            preelaborated. 
  16020.  
  16021.    1. There shall be a total order of the library_items that obeys the above 
  16022.       rules. The order is otherwise implementation defined. 
  16023.  
  16024.    2. The full expanded names of the library units and subunits included in a 
  16025.       given partition shall be distinct. 
  16026.  
  16027.    3. The sequence_of_statements of the environment task (see (2) above) 
  16028.       consists of either: 
  16029.  
  16030.              1. A call to the main subprogram, if the partition has one. If the 
  16031.                 main subprogram has parameters, they are passed; where the 
  16032.                 actuals come from is implementation defined. What happens to 
  16033.                 the result of a main function is also implementation defined. 
  16034.  
  16035.         a. or: 
  16036.  
  16037.              1. A null_statement, if there is no main subprogram. 
  16038.  
  16039.    1. The mechanisms for building and running partitions are implementation 
  16040.       defined. These might be combined into one operation, as, for example, in 
  16041.       dynamic linking, or ``load-and-go'' systems. 
  16042.  
  16043.             Dynamic Semantics
  16044.  
  16045.    2. The execution of a program consists of the execution of a set of 
  16046.       partitions. Further details are implementation defined. The execution of 
  16047.       a partition starts with the execution of its environment task, ends when 
  16048.       the environment task terminates, and includes the executions of all tasks 
  16049.       of the partition. The execution of the (implicit) task_body of the 
  16050.       environment task acts as a master for all other tasks created as part of 
  16051.       the execution of the partition. When the environment task completes 
  16052.       (normally or abnormally), it waits for the termination of all such tasks, 
  16053.       and then finalizes any remaining objects of the partition. 
  16054.  
  16055.             Bounded (Run-Time) Errors
  16056.  
  16057.    3. Once the environment task has awaited the termination of all other tasks 
  16058.       of the partition, any further attempt to create a task (during 
  16059.       finalization) is a bounded error, and may result in the raising of 
  16060.       Program_Error either upon creation or activation of the task. If such a 
  16061.       task is activated, it is not specified whether the task is awaited prior 
  16062.       to termination of the environment task. 
  16063.  
  16064.             Implementation Requirements
  16065.  
  16066.    4. The implementation shall ensure that all compilation units included in a 
  16067.       partition are consistent with one another, and are legal according to the 
  16068.       rules of the language. 
  16069.  
  16070.             Implementation Permissions
  16071.  
  16072.    5. The kind of partition described in this clause is known as an active 
  16073.       partition. An implementation is allowed to support other kinds of 
  16074.       partitions, with implementation-defined semantics. 
  16075.  
  16076.    6. An implementation may restrict the kinds of subprograms it supports as 
  16077.       main subprograms. However, an implementation is required to support all 
  16078.       main subprograms that are public parameterless library procedures. 
  16079.  
  16080.    7. If the environment task completes abnormally, the implementation may 
  16081.       abort any dependent tasks. 
  16082.  
  16083.       NOTES 
  16084.  
  16085.    8. (8) An implementation may provide inter-partition communication 
  16086.       mechanism(s) via special packages and pragmas. Standard pragmas for 
  16087.       distribution and methods for specifying inter-partition communication are 
  16088.       defined in E: ``Distributed Systems''. If no such mechanisms are 
  16089.       provided, then each partition is isolated from all others, and behaves as 
  16090.       a program in and of itself. 
  16091.  
  16092.    9. (9) Partitions are not required to run in separate address spaces. For 
  16093.       example, an implementation might support dynamic linking via the 
  16094.       partition concept. 
  16095.  
  16096.   10. (10) An order of elaboration of library_items that is consistent with the 
  16097.       partial ordering defined above does not always ensure that each 
  16098.       library_unit_body is elaborated before any other compilation unit whose 
  16099.       elaboration necessitates that the library_unit_body be already elaborated 
  16100.       (In particular, there is no requirement that the body of a library unit 
  16101.       be elaborated as soon as possible after the library_unit_declaration is 
  16102.       elaborated, unless the pragmas in subclause, see 10.2.1, are used). 
  16103.  
  16104.   11. (11) A partition (active or otherwise) need not have a main subprogram. 
  16105.       In such a case, all the work done by the partition would be done by 
  16106.       elaboration of various library_items, and by tasks created by that 
  16107.       elaboration. Passive partitions, which cannot have main subprograms, are 
  16108.       defined in E: ``Distributed Systems''. 
  16109.  
  16110.  10.2.1                        Elaboration Control 
  16111.  
  16112.  
  16113. ΓòÉΓòÉΓòÉ 13.2.1. Elaboration Control ΓòÉΓòÉΓòÉ
  16114.  
  16115.    1. This subclause defines pragmas that help control the elaboration order of 
  16116.       library_items. 
  16117.  
  16118.             Syntax
  16119.  
  16120.    2. The form of a pragma Preelaborate is as follows: 
  16121.  
  16122.          3.
  16123.  
  16124.                       pragma Preelaborate[(library_unit_name)];
  16125.  
  16126.         a. A pragma Preelaborate is a library unit pragma. 
  16127.  
  16128.   Legality Rules
  16129.  
  16130.    1. An elaborable construct is preelaborable unless its elaboration performs 
  16131.       any of the following actions: 
  16132.  
  16133.         a. The execution of a statement other than a null_statement. 
  16134.  
  16135.         b. A call to a subprogram other than a static function. 
  16136.  
  16137.         c. The evaluation of a primary that is a name of an object, unless the 
  16138.            name is a static expression, or statically denotes a discriminant of 
  16139.            an enclosing type. 
  16140.  
  16141.         d. The creation of a default-initialized object (including a component) 
  16142.            of a descendant of a private type, private extension, controlled 
  16143.            type, task type, or protected type with entry_declarations; 
  16144.            similarly the evaluation of an extension_aggregate with an ancestor 
  16145.            subtype_mark denoting a subtype of such a type. 
  16146.  
  16147.    1. A generic body is preelaborable only if elaboration of a corresponding 
  16148.       instance body would not perform any such actions, presuming that the 
  16149.       actual for each formal private type (or extension) is a private type (or 
  16150.       extension), and the actual for each formal subprogram is a user-defined 
  16151.       subprogram. 
  16152.  
  16153.    2. If a pragma Preelaborate (or pragma Pure -- see below) applies to a 
  16154.       library unit, then it is preelaborated. If a library unit is 
  16155.       preelaborated, then its declaration, if any, and body, if any, are 
  16156.       elaborated prior to all non-preelaborated library_items of the partition. 
  16157.       All compilation units of a preelaborated library unit shall be 
  16158.       preelaborable. In addition to the places where Legality Rules normally 
  16159.       apply, see 12.3, this rule applies also in the private part of an 
  16160.       instance of a generic unit. In addition, all compilation units of a 
  16161.       preelaborated library unit shall depend semantically only on compilation 
  16162.       units of other preelaborated library units. 
  16163.  
  16164.             Implementation Advice
  16165.  
  16166.    3. In an implementation, a type declared in a preelaborated package should 
  16167.       have the same representation in every elaboration of a given version of 
  16168.       the package, whether the elaborations occur in distinct executions of the 
  16169.       same program, or in executions of distinct programs or partitions that 
  16170.       include the given version. 
  16171.  
  16172.             Syntax
  16173.  
  16174.    4. The form of a pragma Pure is as follows: 
  16175.  
  16176.          5.
  16177.  
  16178.                       pragma Pure[(library_unit_name)];
  16179.  
  16180.         a. A pragma Pure is a library unit pragma. 
  16181.  
  16182.                       Legality Rules
  16183.  
  16184.    1. A pure library_item is a preelaborable library_item that does not contain 
  16185.       the declaration of any variable or named access type, except within a 
  16186.       subprogram, generic subprogram, task unit, or protected unit. 
  16187.  
  16188.    2. A pragma Pure is used to declare that a library unit is pure. If a pragma 
  16189.       Pure applies to a library unit, then its compilation units shall be pure, 
  16190.       and they shall depend semantically only on compilation units of other 
  16191.       library units that are declared pure. 
  16192.  
  16193.             Implementation Permissions
  16194.  
  16195.    3. If a library unit is declared pure, then the implementation is permitted 
  16196.       to omit a call on a library-level subprogram of the library unit if the 
  16197.       results are not needed after the call. Similarly, it may omit such a call 
  16198.       and simply reuse the results produced by an earlier call on the same 
  16199.       subprogram, provided that none of the parameters are of a limited type, 
  16200.       and the addresses and values of all by-reference actual parameters, and 
  16201.       the values of all by-copy-in actual parameters, are the same as they were 
  16202.       at the earlier call. This permission applies even if the subprogram 
  16203.       produces other side effects when called. 
  16204.  
  16205.             Syntax
  16206.  
  16207.    4. The form of a pragma Elaborate, Elaborate_All, or Elaborate_Body is as 
  16208.       follows: 
  16209.  
  16210.          5.
  16211.  
  16212.                       pragma Elaborate(library_unit_name{, library_unit_name});
  16213.  
  16214.          6.
  16215.  
  16216.                       pragma Elaborate_All(library_unit_name{, library_unit_name});
  16217.  
  16218.          7.
  16219.  
  16220.                       pragma Elaborate_Body[(library_unit_name)];
  16221.  
  16222.         a. A pragma Elaborate or Elaborate_All is only allowed within a 
  16223.            context_clause. 
  16224.  
  16225.         b. A pragma Elaborate_Body is a library unit pragma. 
  16226.  
  16227.   Legality Rules
  16228.  
  16229.    1. If a pragma Elaborate_Body applies to a declaration, then the declaration 
  16230.       requires a completion (a body). 
  16231.  
  16232.             Static Semantics
  16233.  
  16234.    2. A pragma Elaborate specifies that the body of the named library unit is 
  16235.       elaborated before the current library_item. A pragma Elaborate_All 
  16236.       specifies that each library_item that is needed by the named library unit 
  16237.       declaration is elaborated before the current library_item. A pragma 
  16238.       Elaborate_Body specifies that the body of the library unit is elaborated 
  16239.       immediately after its declaration. 
  16240.  
  16241.       NOTES 
  16242.  
  16243.    3. (12) A preelaborated library unit is allowed to have non-preelaborable 
  16244.       children. 
  16245.  
  16246.    4. (13) A library unit that is declared pure is allowed to have impure 
  16247.       children. 
  16248.  
  16249.  
  16250. ΓòÉΓòÉΓòÉ 14. Exceptions ΓòÉΓòÉΓòÉ
  16251.  
  16252.    1. This section defines the facilities for dealing with errors or other 
  16253.       exceptional situations that arise during program execution. An exception 
  16254.       represents a kind of exceptional situation; an occurrence of such a 
  16255.       situation (at run time) is called an exception occurrence. To raise an 
  16256.       exception is to abandon normal program execution so as to draw attention 
  16257.       to the fact that the corresponding situation has arisen. Performing some 
  16258.       actions in response to the arising of an exception is called handling the 
  16259.       exception. 
  16260.  
  16261.    2. An exception_declaration declares a name for an exception. An exception 
  16262.       is raised initially either by a raise_statement or by the failure of a 
  16263.       language-defined check. When an exception arises, control can be 
  16264.       transferred to a user-provided exception_handler at the end of a 
  16265.       handled_sequence_of_statements, or it can be propagated to a dynamically 
  16266.       enclosing execution. 
  16267.  
  16268.  11.1                          Exception Declarations 
  16269.  11.2                          Exception Handlers 
  16270.  11.3                          Raise Statements 
  16271.  11.4                          Exception Handling 
  16272.  11.5                          Suppressing Checks 
  16273.  11.6                          Exceptions and Optimization --- The Detailed 
  16274.                                Node Listing --- 
  16275.  11.1                          Exception Declarations 
  16276.  11.2                          Exception Handlers 
  16277.  11.3                          Raise Statements 
  16278.  11.4                          Exception Handling 
  16279.  11.4.1                        The Package Exceptions 
  16280.  11.4.2                        Example of Exception Handling 
  16281.  11.5                          Suppressing Checks 
  16282.  11.6                          Exceptions and Optimization 
  16283.  
  16284.  
  16285. ΓòÉΓòÉΓòÉ 14.1. Exception Declarations ΓòÉΓòÉΓòÉ
  16286.  
  16287.    1. An exception_declaration declares a name for an exception. 
  16288.  
  16289.             Syntax
  16290.  
  16291.    2. exception_declaration ::= defining_identifier_list : exception; 
  16292.  
  16293.             Static Semantics
  16294.  
  16295.    3. Each single exception_declaration declares a name for a different 
  16296.       exception. If a generic unit includes an exception_declaration, the 
  16297.       exception_declarations implicitly generated by different instantiations 
  16298.       of the generic unit refer to distinct exceptions (but all have the same 
  16299.       defining_identifier). The particular exception denoted by an exception 
  16300.       name is determined at compilation time and is the same regardless of how 
  16301.       many times the exception_declaration is elaborated. 
  16302.  
  16303.    4. The predefined exceptions are the ones declared in the declaration of 
  16304.       package Standard: Constraint_Error, Program_Error, Storage_Error, and 
  16305.       Tasking_Error; one of them is raised when a language-defined check fails. 
  16306.  
  16307.             Dynamic Semantics
  16308.  
  16309.    5. The elaboration of an exception_declaration has no effect. 
  16310.  
  16311.    6. The execution of any construct raises Storage_Error if there is 
  16312.       insufficient storage for that execution. The amount of storage needed for 
  16313.       the execution of constructs is unspecified. 
  16314.  
  16315.             Examples
  16316.  
  16317.    7. Examples of user-defined exception declarations: 
  16318.  
  16319.          8.
  16320.  
  16321.                       Singular      : exception;
  16322.                       Error        : exception;
  16323.                       Overflow, Underflow : exception;
  16324.  
  16325.  
  16326. ΓòÉΓòÉΓòÉ 14.2. Exception Handlers ΓòÉΓòÉΓòÉ
  16327.  
  16328.    1. The response to one or more exceptions is specified by an 
  16329.       exception_handler. 
  16330.  
  16331.             Syntax
  16332.  
  16333.          2.
  16334.  
  16335.                       handled_sequence_of_statements ::=
  16336.                          sequence_of_statements
  16337.                         [exception
  16338.                          exception_handler
  16339.                          {exception_handler}]
  16340.  
  16341.          3.
  16342.  
  16343.                       exception_handler ::=
  16344.                        when [choice_parameter_specification:]
  16345.                         exception_choice {| exception_choice} =>
  16346.                          sequence_of_statements
  16347.  
  16348.          4.
  16349.  
  16350.                       choice_parameter_specification ::= defining_identifier
  16351.  
  16352.          5.
  16353.  
  16354.                       exception_choice ::= exception_name | others
  16355.  
  16356.   Legality Rules
  16357.  
  16358.    6. A choice with an exception_name covers the named exception. A choice with 
  16359.       others covers all exceptions not named by previous choices of the same 
  16360.       handled_sequence_of_statements. Two choices in different 
  16361.       exception_handlers of the same handled_sequence_of_statements shall not 
  16362.       cover the same exception. 
  16363.  
  16364.    7. A choice with others is allowed only for the last handler of a 
  16365.       handled_sequence_of_statements and as the only choice of that handler. 
  16366.  
  16367.    8. An exception_name of a choice shall not denote an exception declared in a 
  16368.       generic formal package. 
  16369.  
  16370.             Static Semantics
  16371.  
  16372.    9. A choice_parameter_specification declares a choice parameter, which is a 
  16373.       constant object of type Exception_Occurrence, see 11.4.1. During the 
  16374.       handling of an exception occurrence, the choice parameter, if any, of the 
  16375.       handler represents the exception occurrence that is being handled. 
  16376.  
  16377.             Dynamic Semantics
  16378.  
  16379.   10. The execution of a handled_sequence_of_statements consists of the 
  16380.       execution of the sequence_of_statements. The optional handlers are used 
  16381.       to handle any exceptions that are propagated by the 
  16382.       sequence_of_statements. 
  16383.  
  16384.             Examples
  16385.  
  16386.   11. Example of an exception handler: 
  16387.  
  16388.         12.
  16389.  
  16390.                       begin
  16391.                         Open(File, In_File, "input.txt");  --  see A.8.2
  16392.                       exception
  16393.                         when E : Name_Error =>
  16394.                          Put("Cannot open input file : ");
  16395.                          Put_Line(Exception_Message(E));  --  see 11.4.1
  16396.                          raise;
  16397.                       end;
  16398.  
  16399.  
  16400. ΓòÉΓòÉΓòÉ 14.3. Raise Statements ΓòÉΓòÉΓòÉ
  16401.  
  16402.    1. A raise_statement raises an exception. 
  16403.  
  16404.             Syntax
  16405.  
  16406.          2.
  16407.  
  16408.                       raise_statement ::= raise [exception_name];
  16409.  
  16410.   Legality Rules
  16411.  
  16412.    3. The name, if any, in a raise_statement shall denote an exception. A 
  16413.       raise_statement with no exception_name (that is, a re-raise statement) 
  16414.       shall be within a handler, but not within a body enclosed by that 
  16415.       handler. 
  16416.  
  16417.             Dynamic Semantics
  16418.  
  16419.    4. To raise an exception is to raise a new occurrence of that exception, as 
  16420.       explained in 11.4. For the execution of a raise_statement with an 
  16421.       exception_name, the named exception is raised. For the execution of a 
  16422.       re-raise statement, the exception occurrence that caused transfer of 
  16423.       control to the innermost enclosing handler is raised again. 
  16424.  
  16425.             Examples
  16426.  
  16427.    5. Examples of raise statements: 
  16428.  
  16429.          6.
  16430.  
  16431.                       raise Ada.IO_Exceptions.Name_Error;  --  see A.13
  16432.  
  16433.          7.
  16434.  
  16435.                       raise;
  16436.                       --  re-raise the current exception
  16437.  
  16438.  
  16439. ΓòÉΓòÉΓòÉ 14.4. Exception Handling ΓòÉΓòÉΓòÉ
  16440.  
  16441.    1. When an exception occurrence is raised, normal program execution is 
  16442.       abandoned and control is transferred to an applicable exception_handler, 
  16443.       if any. To handle an exception occurrence is to respond to the 
  16444.       exceptional event. To propagate an exception occurrence is to raise it 
  16445.       again in another context; that is, to fail to respond to the exceptional 
  16446.       event in the present context. 
  16447.  
  16448.             Dynamic Semantics
  16449.  
  16450.    2. Within a given task, if the execution of construct a is defined by this 
  16451.       International Standard to consist (in part) of the execution of construct 
  16452.       b, then while b is executing, the execution of a is said to dynamically 
  16453.       enclose the execution of b. The innermost dynamically enclosing execution 
  16454.       of a given execution is the dynamically enclosing execution that started 
  16455.       most recently. 
  16456.  
  16457.    3. When an exception occurrence is raised by the execution of a given 
  16458.       construct, the rest of the execution of that construct is abandoned; that 
  16459.       is, any portions of the execution that have not yet taken place are not 
  16460.       performed. The construct is first completed, and then left, as explained 
  16461.       in 7.6.1. Then: 
  16462.  
  16463.         a. If the construct is a task_body, the exception does not propagate 
  16464.            further; 
  16465.  
  16466.         b. If the construct is the sequence_of_statements of a 
  16467.            handled_sequence_of_statements that has a handler with a choice 
  16468.            covering the exception, the occurrence is handled by that handler; 
  16469.  
  16470.         c. Otherwise, the occurrence is propagated to the innermost dynamically 
  16471.            enclosing execution, which means that the occurrence is raised again 
  16472.            in that context. 
  16473.  
  16474.    1. When an occurrence is handled by a given handler, the 
  16475.       choice_parameter_specification, if any, is first elaborated, which 
  16476.       creates the choice parameter and initializes it to the occurrence. Then, 
  16477.       the sequence_of_statements of the handler is executed; this execution 
  16478.       replaces the abandoned portion of the execution of the 
  16479.       sequence_of_statements. 
  16480.  
  16481.       NOTES 
  16482.  
  16483.    2. (1) Note that exceptions raised in a declarative_part of a body are not 
  16484.       handled by the handlers of the handled_sequence_of_statements of that 
  16485.       body. 
  16486.  
  16487.  11.4.1                        The Package Exceptions 
  16488.  11.4.2                        Example of Exception Handling 
  16489.  
  16490.  
  16491. ΓòÉΓòÉΓòÉ 14.4.1. The Package Exceptions ΓòÉΓòÉΓòÉ
  16492.  
  16493.  
  16494.   Static Semantics
  16495.  
  16496.    1. The following language-defined library package exists: 
  16497.  
  16498.          2.
  16499.  
  16500.                       package Ada.Exceptions is
  16501.                         type Exception_Id is private;
  16502.                         Null_Id : constant Exception_Id;
  16503.                         function Exception_Name(Id : Exception_Id) return String;
  16504.  
  16505.          3.
  16506.  
  16507.                          type Exception_Occurrence is limited private;
  16508.                         type Exception_Occurrence_Access is
  16509.                          access all Exception_Occurrence;
  16510.                         Null_Occurrence : constant Exception_Occurrence;
  16511.  
  16512.          4.
  16513.  
  16514.                          procedure Raise_Exception
  16515.                          (E    : in Exception_Id;
  16516.                           Message : in String := "");
  16517.                         function Exception_Message(X : Exception_Occurrence)
  16518.                          return String;
  16519.                         procedure Reraise_Occurrence(X : in Exception_Occurrence);
  16520.  
  16521.          5.
  16522.  
  16523.                          function Exception_Identity(X : Exception_Occurrence)
  16524.                          return Exception_Id;
  16525.                         function Exception_Name(X : Exception_Occurrence)
  16526.                          return String;
  16527.                         --  Same as Exception_Name(Exception_Identity(X)).
  16528.                         function Exception_Information(X : Exception_Occurrence)
  16529.                          return String;
  16530.  
  16531.          6.
  16532.  
  16533.                          procedure Save_Occurrence(Target : out Exception_Occurrence;
  16534.                                      Source : in Exception_Occurrence);
  16535.                         function Save_Occurrence(Source : Exception_Occurrence)
  16536.                                      return Exception_Occurrence_Access;
  16537.                       private
  16538.                         ┬╖┬╖┬╖ -- not specified by the language
  16539.                       end Ada.Exceptions;
  16540.  
  16541.    7. Each distinct exception is represented by a distinct value of type 
  16542.       Exception_Id. Null_Id does not represent any exception, and is the 
  16543.       default initial value of type Exception_Id. Each occurrence of an 
  16544.       exception is represented by a value of type Exception_Occurrence. 
  16545.       Null_Occurrence does not represent any exception occurrence, and is the 
  16546.       default initial value of type Exception_Occurrence. 
  16547.  
  16548.    8. For a prefix E that denotes an exception, the following attribute is 
  16549.       defined: 
  16550.  
  16551.    9. E'Identity 
  16552.  
  16553.                       E'Identity returns the unique identity of the exception. The
  16554.                       type of this attribute is Exception_Id.
  16555.  
  16556.   10. Raise_Exception raises a new occurrence of the identified exception. In 
  16557.       this case, Exception_Message returns the Message parameter of 
  16558.       Raise_Exception. For a raise_statement with an exception_name, 
  16559.       Exception_Message returns implementation-defined information about the 
  16560.       exception occurrence. Reraise_Occurrence reraises the specified exception 
  16561.       occurrence. 
  16562.  
  16563.   11. Exception_Identity returns the identity of the exception of the 
  16564.       occurrence. 
  16565.  
  16566.   12. The Exception_Name functions return the full expanded name of the 
  16567.       exception, in upper case, starting with a root library unit. For an 
  16568.       exception declared immediately within package Standard, the 
  16569.       defining_identifier is returned. The result is implementation defined if 
  16570.       the exception is declared within an unnamed block_statement. 
  16571.  
  16572.   13. Exception_Information returns implementation-defined information about 
  16573.       the exception occurrence. 
  16574.  
  16575.   14. Raise_Exception and Reraise_Occurrence have no effect in the case of 
  16576.       Null_Id or Null_Occurrence. Exception_Message, Exception_Identity, 
  16577.       Exception_Name, and Exception_Information raise Constraint_Error for a 
  16578.       Null_Id or Null_Occurrence. 
  16579.  
  16580.   15. The Save_Occurrence procedure copies the Source to the Target. The 
  16581.       Save_Occurrence function uses an allocator of type 
  16582.       Exception_Occurrence_Access to create a new object, copies the Source to 
  16583.       this new object, and returns an access value designating this new object; 
  16584.       the result may be deallocated using an instance of 
  16585.       Unchecked_Deallocation. 
  16586.  
  16587.             Implementation Requirements
  16588.  
  16589.   16. The implementation of the Write attribute, see 13.13.2, of 
  16590.       Exception_Occurrence shall support writing a representation of an 
  16591.       exception occurrence to a stream; the implementation of the Read 
  16592.       attribute of Exception_Occurrence shall support reconstructing an 
  16593.       exception occurrence from a stream (including one written in a different 
  16594.       partition). 
  16595.  
  16596.             Implementation Permissions
  16597.  
  16598.   17. An implementation of Exception_Name in a space-constrained environment 
  16599.       may return the defining_identifier instead of the full expanded name. 
  16600.  
  16601.   18. The string returned by Exception_Message may be truncated (to no less 
  16602.       than 200 characters) by the Save_Occurrence procedure (not the function), 
  16603.       the Reraise_Occurrence procedure, and the re-raise statement. 
  16604.  
  16605.             Implementation Advice
  16606.  
  16607.   19. Exception_Message (by default) and Exception_Information should produce 
  16608.       information useful for debugging. Exception_Message should be short 
  16609.       (about one line), whereas Exception_Information can be long. 
  16610.       Exception_Message should not include the Exception_Name. 
  16611.       Exception_Information should include both the Exception_Name and the 
  16612.       Exception_Message. 
  16613.  
  16614.  
  16615. ΓòÉΓòÉΓòÉ 14.4.2. Example of Exception Handling ΓòÉΓòÉΓòÉ
  16616.  
  16617.  
  16618.   Examples
  16619.  
  16620.    1. Exception handling may be used to separate the detection of an error from 
  16621.       the response to that error: 
  16622.  
  16623.          2.
  16624.  
  16625.                       with Ada.Exceptions;
  16626.                       use Ada;
  16627.                       package File_System is
  16628.                         type File_Handle is limited private;
  16629.  
  16630.          3.
  16631.  
  16632.                          File_Not_Found : exception;
  16633.                         procedure Open(F : in out File_Handle; Name : String);
  16634.                         --  raises File_Not_Found if named file does not exist
  16635.  
  16636.          4.
  16637.  
  16638.                          End_Of_File : exception;
  16639.                         procedure Read(F : in out File_Handle; Data : out Data_Type);
  16640.                         --  raises End_Of_File if the file is not open
  16641.  
  16642.          5.
  16643.  
  16644.                          ┬╖┬╖┬╖
  16645.                       end File_System;
  16646.  
  16647.          6.
  16648.  
  16649.                       package body File_System is
  16650.                         procedure Open(F : in out File_Handle; Name : String) is
  16651.                         begin
  16652.                           if File_Exists(Name) then
  16653.                             ┬╖┬╖┬╖
  16654.                           else
  16655.                             Exceptions.Raise_Exception
  16656.                              (File_Not_Found'Identity,
  16657.                               "File not found: " & Name & ".");
  16658.                           end if;
  16659.                         end Open;
  16660.  
  16661.          7.
  16662.  
  16663.                          procedure Read(F : in out File_Handle; Data : out Data_Type) is
  16664.                         begin
  16665.                           if F.Current_Position <= F.Last_Position then
  16666.                             ┬╖┬╖┬╖
  16667.                           else
  16668.                             raise End_Of_File;
  16669.                           end if;
  16670.                         end Read;
  16671.  
  16672.          8.
  16673.  
  16674.                          ┬╖┬╖┬╖
  16675.  
  16676.          9.
  16677.  
  16678.                       end File_System;
  16679.  
  16680.         10.
  16681.  
  16682.                       with Ada.Text_IO;
  16683.                       with Ada.Exceptions;
  16684.                       with File_System; use File_System;
  16685.                       use Ada;
  16686.                       procedure Main is
  16687.                       begin
  16688.                         ┬╖┬╖┬╖ -- call operations in File_System
  16689.                       exception
  16690.                         when End_Of_File =>
  16691.                           Close(Some_File);
  16692.                         when Not_Found_Error : File_Not_Found =>
  16693.                           Text_IO.Put_Line
  16694.                            (Exceptions.Exception_Message(Not_Found_Error));
  16695.                         when The_Error : others =>
  16696.                           Text_IO.Put_Line("Unknown error:");
  16697.                           if Verbosity_Desired then
  16698.                             Text_IO.Put_Line(Exceptions.Exception_Information
  16699.                              (The_Error));
  16700.                           else
  16701.                             Text_IO.Put_Line(Exceptions.Exception_Name
  16702.                              (The_Error));
  16703.                             Text_IO.Put_Line(Exceptions.Exception_Message
  16704.                              (The_Error));
  16705.                           end if;
  16706.                           raise;
  16707.                       end Main;
  16708.  
  16709.   11. In the above example, the File_System package contains information about 
  16710.       detecting certain exceptional situations, but it does not specify how to 
  16711.       handle those situations. Procedure Main specifies how to handle them; 
  16712.       other clients of File_System might have different handlers, even though 
  16713.       the exceptional situations arise from the same basic causes. 
  16714.  
  16715.  
  16716. ΓòÉΓòÉΓòÉ 14.5. Suppressing Checks ΓòÉΓòÉΓòÉ
  16717.  
  16718.    1. A pragma Suppress gives permission to an implementation to omit certain 
  16719.       language-defined checks. 
  16720.  
  16721.    2. A language-defined check (or simply, a ``check'') is one of the 
  16722.       situations defined by this International Standard that requires a check 
  16723.       to be made at run time to determine whether some condition is true. A 
  16724.       check fails when the condition being checked is false, causing an 
  16725.       exception to be raised. 
  16726.  
  16727.             Syntax
  16728.  
  16729.    3. The form of a pragma Suppress is as follows: 
  16730.  
  16731.          4.
  16732.  
  16733.                       pragma Suppress(identifier [, [On =>] name]);
  16734.  
  16735.         a. A pragma Suppress is allowed only immediately within a 
  16736.            declarative_part, immediately within a package_specification, or as 
  16737.            a configuration pragma. 
  16738.  
  16739.   Legality Rules
  16740.  
  16741.    1. The identifier shall be the name of a check. The name (if present) shall 
  16742.       statically denote some entity. 
  16743.  
  16744.    2. For a pragma Suppress that is immediately within a package_specification 
  16745.       and includes a name, the name shall denote an entity (or several 
  16746.       overloaded subprograms) declared immediately within the 
  16747.       package_specification. 
  16748.  
  16749.             Static Semantics
  16750.  
  16751.    3. A pragma Suppress gives permission to an implementation to omit the named 
  16752.       check from the place of the pragma to the end of the innermost enclosing 
  16753.       declarative region, or, if the pragma is given in a package_specification 
  16754.       and includes a name, to the end of the scope of the named entity. If the 
  16755.       pragma includes a name, the permission applies only to checks performed 
  16756.       on the named entity, or, for a subtype, on objects and values of its 
  16757.       type. Otherwise, the permission applies to all entities. If permission 
  16758.       has been given to suppress a given check, the check is said to be 
  16759.       suppressed. 
  16760.  
  16761.    4. The following are the language-defined checks: 
  16762.  
  16763.         a. The following checks correspond to situations in which the exception 
  16764.            Constraint_Error is raised upon failure. 
  16765.  
  16766.              1. Access_Check 
  16767.  
  16768.                       When evaluating a dereference (explicit or
  16769.                       implicit), check that the value of the name is
  16770.                       not null. When passing an actual parameter to a
  16771.                       formal access parameter, check that the value of
  16772.                       the actual parameter is not null.
  16773.  
  16774.              2. Discriminant_Check 
  16775.  
  16776.                       Check that the discriminants of a composite value
  16777.                       have the values imposed by a discriminant
  16778.                       constraint. Also, when accessing a record
  16779.                       component, check that it exists for the current
  16780.                       discriminant values.
  16781.  
  16782.              3. Division_Check 
  16783.  
  16784.                       Check that the second operand is not zero for the
  16785.                       operations /, rem and mod.
  16786.  
  16787.              4. Index_Check 
  16788.  
  16789.                       Check that the bounds of an array value are equal
  16790.                       to the corresponding bounds of an index
  16791.                       constraint. Also, when accessing a component of
  16792.                       an array object, check for each dimension that
  16793.                       the given index value belongs to the range
  16794.                       defined by the bounds of the array object. Also,
  16795.                       when accessing a slice of an array object, check
  16796.                       that the given discrete range is compatible with
  16797.                       the range defined by the bounds of the array
  16798.                       object.
  16799.  
  16800.              5. Length_Check 
  16801.  
  16802.                       Check that two arrays have matching components,
  16803.                       in the case of array subtype conversions, and
  16804.                       logical operators for arrays of boolean
  16805.                       components.
  16806.  
  16807.              6. Overflow_Check 
  16808.  
  16809.                       Check that a scalar value is within the base
  16810.                       range of its type, in cases where the
  16811.                       implementation chooses to raise an exception
  16812.                       instead of returning the correct mathematical
  16813.                       result.
  16814.  
  16815.              7. Range_Check 
  16816.  
  16817.                       Check that a scalar value satisfies a range
  16818.                       constraint. Also, for the elaboration of a
  16819.                       subtype_indication, check that the constraint (if
  16820.                       present) is compatible with the subtype denoted
  16821.                       by the subtype_mark. Also, for an aggregate,
  16822.                       check that an index or discriminant value belongs
  16823.                       to the corresponding subtype. Also, check that
  16824.                       when the result of an operation yields an array,
  16825.                       the value of each component belongs to the
  16826.                       component subtype.
  16827.  
  16828.              8. Tag_Check 
  16829.  
  16830.                       Check that operand tags in a dispatching call are
  16831.                       all equal. Check for the correct tag on tagged
  16832.                       type conversions, for an assignment_statement,
  16833.                       and when returning a tagged limited object from a
  16834.                       function.
  16835.  
  16836.         a. The following checks correspond to situations in which the exception 
  16837.            Program_Error is raised upon failure. 
  16838.  
  16839.              1. Elaboration_Check 
  16840.  
  16841.                       When a subprogram or protected entry is called, a
  16842.                       task activation is accomplished, or a generic
  16843.                       instantiation is elaborated, check that the body
  16844.                       of the corresponding unit has already been
  16845.                       elaborated.
  16846.  
  16847.              2. Accessibility_Check 
  16848.  
  16849.                       Check the accessibility level of an entity or
  16850.                       view.
  16851.  
  16852.         a. The following check corresponds to situations in which the exception 
  16853.            Storage_Error is raised upon failure. 
  16854.  
  16855.              1. Storage_Check 
  16856.  
  16857.                       Check that evaluation of an allocator does not
  16858.                       require more space than is available for a
  16859.                       storage pool. Check that the space available for
  16860.                       a task or subprogram has not been exceeded.
  16861.  
  16862.         a. The following check corresponds to all situations in which any 
  16863.            predefined exception is raised. 
  16864.  
  16865.              1. All_Checks 
  16866.  
  16867.                       Represents the union of all checks; suppressing
  16868.                       All_Checks suppresses all checks.
  16869.  
  16870.  
  16871.   Erroneous Execution
  16872.  
  16873.    1. If a given check has been suppressed, and the corresponding error 
  16874.       situation occurs, the execution of the program is erroneous. 
  16875.  
  16876.             Implementation Permissions
  16877.  
  16878.    2. An implementation is allowed to place restrictions on Suppress pragmas. 
  16879.       An implementation is allowed to add additional check names, with 
  16880.       implementation-defined semantics. When Overflow_Check has been 
  16881.       suppressed, an implementation may also suppress an unspecified subset of 
  16882.       the Range_Checks. 
  16883.  
  16884.             Implementation Advice
  16885.  
  16886.    3. The implementation should minimize the code executed for checks that have 
  16887.       been suppressed. 
  16888.  
  16889.       NOTES 
  16890.  
  16891.    4. (2) There is no guarantee that a suppressed check is actually removed; 
  16892.       hence a pragma Suppress should be used only for efficiency reasons. 
  16893.  
  16894.             Examples
  16895.  
  16896.    5. Examples of suppressing checks: 
  16897.  
  16898.          6.
  16899.  
  16900.                       pragma Suppress(Range_Check);
  16901.                       pragma Suppress(Index_Check, On => Table);
  16902.  
  16903.  
  16904. ΓòÉΓòÉΓòÉ 14.6. Exceptions and Optimization ΓòÉΓòÉΓòÉ
  16905.  
  16906.    1. This clause gives permission to the implementation to perform certain 
  16907.       ``optimizations'' that do not necessarily preserve the canonical 
  16908.       semantics. 
  16909.  
  16910.             Dynamic Semantics
  16911.  
  16912.    2. The rest of this International Standard (outside this clause) defines the 
  16913.       canonical semantics of the language. The canonical semantics of a given 
  16914.       (legal) program determines a set of possible external effects that can 
  16915.       result from the execution of the program with given inputs. 
  16916.  
  16917.    3. As explained in 1.1.3: ``Conformity of an Implementation With the 
  16918.       Standard'', the external effect of a program is defined in terms of its 
  16919.       interactions with its external environment. Hence, the implementation can 
  16920.       perform any internal actions whatsoever, in any order or in parallel, so 
  16921.       long as the external effect of the execution of the program is one that 
  16922.       is allowed by the canonical semantics, or by the rules of this clause. 
  16923.  
  16924.             Implementation Permissions
  16925.  
  16926.    4. The following additional permissions are granted to the implementation: 
  16927.  
  16928.         a. An implementation need not always raise an exception when a 
  16929.            language-defined check fails. Instead, the operation that failed the 
  16930.            check can simply yield an undefined result. The exception need be 
  16931.            raised by the implementation only if, in the absence of raising it, 
  16932.            the value of this undefined result would have some effect on the 
  16933.            external interactions of the program. In determining this, the 
  16934.            implementation shall not presume that an undefined result has a 
  16935.            value that belongs to its subtype, nor even to the base range of its 
  16936.            type, if scalar. Having removed the raise of the exception, the 
  16937.            canonical semantics will in general allow the implementation to omit 
  16938.            the code for the check, and some or all of the operation itself. 
  16939.  
  16940.         b. If an exception is raised due to the failure of a language-defined 
  16941.            check, then upon reaching the corresponding exception_handler (or 
  16942.            the termination of the task, if none), the external interactions 
  16943.            that have occurred need reflect only that the exception was raised 
  16944.            somewhere within the execution of the sequence_of_statements with 
  16945.            the handler (or the task_body), possibly earlier (or later if the 
  16946.            interactions are independent of the result of the checked operation) 
  16947.            than that defined by the canonical semantics, but not within the 
  16948.            execution of some abort-deferred operation or independent subprogram 
  16949.            that does not dynamically enclose the execution of the construct 
  16950.            whose check failed. An independent subprogram is one that is defined 
  16951.            outside the library unit containing the construct whose check 
  16952.            failed, and has no Inline pragma applied to it. Any assignment that 
  16953.            occurred outside of such abort-deferred operations or independent 
  16954.            subprograms can be disrupted by the raising of the exception, 
  16955.            causing the object or its parts to become abnormal, and certain 
  16956.            subsequent uses of the object to be erroneous, as explained in 
  16957.            13.9.1. 
  16958.   NOTES 
  16959.  
  16960.    1. (3) The permissions granted by this clause can have an effect on the 
  16961.       semantics of a program only if the program fails a language-defined 
  16962.       check. 
  16963.  
  16964.  
  16965. ΓòÉΓòÉΓòÉ 15. Generic Units ΓòÉΓòÉΓòÉ
  16966.  
  16967.    1. A generic unit is a program unit that is either a generic subprogram or a 
  16968.       generic package. A generic unit is a template, which can be 
  16969.       parameterized, and from which corresponding (nongeneric) subprograms or 
  16970.       packages can be obtained. The resulting program units are said to be 
  16971.       instances of the original generic unit. 
  16972.  
  16973.    2. A generic unit is declared by a generic_declaration. This form of 
  16974.       declaration has a generic_formal_part declaring any generic formal 
  16975.       parameters. An instance of a generic unit is obtained as the result of a 
  16976.       generic_instantiation with appropriate generic actual parameters for the 
  16977.       generic formal parameters. An instance of a generic subprogram is a 
  16978.       subprogram. An instance of a generic package is a package. 
  16979.  
  16980.    3. Generic units are templates. As templates they do not have the properties 
  16981.       that are specific to their nongeneric counterparts. For example, a 
  16982.       generic subprogram can be instantiated but it cannot be called. In 
  16983.       contrast, an instance of a generic subprogram is a (nongeneric) 
  16984.       subprogram; hence, this instance can be called but it cannot be used to 
  16985.       produce further instances. 
  16986.  
  16987.  12.1                          Generic Declarations 
  16988.  12.2                          Generic Bodies 
  16989.  12.3                          Generic Instantiation 
  16990.  12.4                          Formal Objects 
  16991.  12.5                          Formal Types 
  16992.  12.6                          Formal Subprograms 
  16993.  12.7                          Formal Packages 
  16994.  12.8                          Example of a Generic Package --- The Detailed 
  16995.                                Node Listing --- 
  16996.  12.1                          Generic Declarations 
  16997.  12.2                          Generic Bodies 
  16998.  12.3                          Generic Instantiation 
  16999.  12.4                          Formal Objects 
  17000.  12.5                          Formal Types 
  17001.  12.5.1                        Formal Private and Derived Types 
  17002.  12.5.2                        Formal Scalar Types 
  17003.  12.5.3                        Formal Array Types 
  17004.  12.5.4                        Formal Access Types 
  17005.  12.6                          Formal Subprograms 
  17006.  12.7                          Formal Packages 
  17007.  12.8                          Example of a Generic Package 
  17008.  
  17009.  
  17010. ΓòÉΓòÉΓòÉ 15.1. Generic Declarations ΓòÉΓòÉΓòÉ
  17011.  
  17012.    1. A generic_declaration declares a generic unit, which is either a generic 
  17013.       subprogram or a generic package. A generic_declaration includes a 
  17014.       generic_formal_part declaring any generic formal parameters. A generic 
  17015.       formal parameter can be an object; alternatively (unlike a parameter of a 
  17016.       subprogram), it can be a type, a subprogram, or a package. 
  17017.  
  17018.             Syntax
  17019.  
  17020.          2.
  17021.  
  17022.                       generic_declaration ::=
  17023.                         generic_subprogram_declaration | generic_package_declaration
  17024.  
  17025.          3.
  17026.  
  17027.                       generic_subprogram_declaration ::=
  17028.                         generic_formal_part subprogram_specification;
  17029.  
  17030.          4.
  17031.  
  17032.                       generic_package_declaration ::=
  17033.                         generic_formal_part package_specification;
  17034.  
  17035.          5.
  17036.  
  17037.                       generic_formal_part ::=
  17038.                         generic {generic_formal_parameter_declaration | use_clause}
  17039.  
  17040.          6.
  17041.  
  17042.                       generic_formal_parameter_declaration ::=
  17043.                          formal_object_declaration
  17044.                         | formal_type_declaration
  17045.                         | formal_subprogram_declaration
  17046.                         | formal_package_declaration
  17047.  
  17048.         a. The only form of subtype_indication allowed within a 
  17049.            generic_formal_part is a subtype_mark (that is, the 
  17050.            subtype_indication shall not include an explicit constraint). The 
  17051.            defining name of a generic subprogram shall be an identifier (not an 
  17052.            operator_symbol). 
  17053.  
  17054.   Static Semantics
  17055.  
  17056.    1. A generic_declaration declares a generic unit -- a generic package, 
  17057.       generic procedure or generic function, as appropriate. 
  17058.  
  17059.    2. An entity is a generic formal entity if it is declared by a 
  17060.       generic_formal_parameter_declaration. ``Generic formal,'' or simply 
  17061.       ``formal,'' is used as a prefix in referring to objects, subtypes (and 
  17062.       types), functions, procedures and packages, that are generic formal 
  17063.       entities, as well as to their respective declarations. Examples: 
  17064.       ``generic formal procedure'' or a ``formal integer type declaration.'' 
  17065.  
  17066.             Dynamic Semantics
  17067.  
  17068.    3. The elaboration of a generic_declaration has no effect. 
  17069.  
  17070.       NOTES 
  17071.  
  17072.    4. (1) Outside a generic unit a name that denotes the generic_declaration 
  17073.       denotes the generic unit. In contrast, within the declarative region of 
  17074.       the generic unit, a name that denotes the generic_declaration denotes the 
  17075.       current instance. 
  17076.  
  17077.    5. (2) Within a generic subprogram_body, the name of this program unit acts 
  17078.       as the name of a subprogram. Hence this name can be overloaded, and it 
  17079.       can appear in a recursive call of the current instance. For the same 
  17080.       reason, this name cannot appear after the reserved word new in a 
  17081.       (recursive) generic_instantiation. 
  17082.  
  17083.    6. (3) A default_expression or default_name appearing in a 
  17084.       generic_formal_part is not evaluated during elaboration of the 
  17085.       generic_formal_part; instead, it is evaluated when used. (The usual 
  17086.       visibility rules apply to any name used in a default: the denoted 
  17087.       declaration therefore has to be visible at the place of the expression.) 
  17088.  
  17089.             Examples
  17090.  
  17091.    7. Examples of generic formal parts: 
  17092.  
  17093.          8.
  17094.  
  17095.                       generic   --  parameterless
  17096.  
  17097.          9.
  17098.  
  17099.                       generic
  17100.                         Size : Natural;  --  formal object
  17101.  
  17102.         10.
  17103.  
  17104.                       generic
  17105.                         Length : Integer := 200;
  17106.                         --  formal object with a default expression
  17107.  
  17108.         11.
  17109.  
  17110.                         Area : Integer := Length*Length;
  17111.                         --  formal object with a default expression
  17112.  
  17113.         12.
  17114.  
  17115.                       generic
  17116.                         type Item  is private;             -- formal type
  17117.                         type Index is (<>);              -- formal type
  17118.                         type Row  is array(Index range <>) of Item;  -- formal type
  17119.                         with function "<"(X, Y : Item) return Boolean;
  17120.                         --  formal subprogram
  17121.  
  17122.   13. Examples of generic declarations declaring generic subprograms Exchange 
  17123.       and Squaring: 
  17124.  
  17125.         14.
  17126.  
  17127.                       generic
  17128.                         type Elem is private;
  17129.                       procedure Exchange(U, V : in out Elem);
  17130.  
  17131.         15.
  17132.  
  17133.                       generic
  17134.                         type Item is private;
  17135.                         with function "*"(U, V : Item) return Item is <>;
  17136.                       function Squaring(X : Item) return Item;
  17137.  
  17138.   16. Example of a generic declaration declaring a generic package: 
  17139.  
  17140.         17.
  17141.  
  17142.                       generic
  17143.                         type Item  is private;
  17144.                         type Vector is array (Positive range <>) of Item;
  17145.                         with function Sum(X, Y : Item) return Item;
  17146.                       package On_Vectors is
  17147.                         function Sum  (A, B : Vector) return Vector;
  17148.                         function Sigma(A   : Vector) return Item;
  17149.                         Length_Error : exception;
  17150.                       end On_Vectors;
  17151.  
  17152.  
  17153. ΓòÉΓòÉΓòÉ 15.2. Generic Bodies ΓòÉΓòÉΓòÉ
  17154.  
  17155.    1. The body of a generic unit (a generic body) is a template for the 
  17156.       instance bodies. The syntax of a generic body is identical to that of a 
  17157.       nongeneric body. 
  17158.  
  17159.             Dynamic Semantics
  17160.  
  17161.    2. The elaboration of a generic body has no other effect than to establish 
  17162.       that the generic unit can from then on be instantiated without failing 
  17163.       the Elaboration_Check. If the generic body is a child of a generic 
  17164.       package, then its elaboration establishes that each corresponding 
  17165.       declaration nested in an instance of the parent, see 10.1.1, can from 
  17166.       then on be instantiated without failing the Elaboration_Check. 
  17167.  
  17168.       NOTES 
  17169.  
  17170.    3. (4) The syntax of generic subprograms implies that a generic subprogram 
  17171.       body is always the completion of a declaration. 
  17172.  
  17173.             Examples
  17174.  
  17175.    4. Example of a generic procedure body: 
  17176.  
  17177.          5.
  17178.  
  17179.                       procedure Exchange(U, V : in out Elem) is  --  see 12.1
  17180.                         T : Elem;  --  the generic formal type
  17181.                       begin
  17182.                         T := U;
  17183.                         U := V;
  17184.                         V := T;
  17185.                       end Exchange;
  17186.  
  17187.    6. Example of a generic function body: 
  17188.  
  17189.          7.
  17190.  
  17191.                       function Squaring(X : Item) return Item is  --  see 12.1
  17192.                       begin
  17193.                         return X*X;  --  the formal operator "*"
  17194.                       end Squaring;
  17195.  
  17196.    8. Example of a generic package body: 
  17197.  
  17198.          9.
  17199.  
  17200.                       package body On_Vectors is  --  see 12.1
  17201.  
  17202.         10.
  17203.  
  17204.                         function Sum(A, B : Vector) return Vector is
  17205.                          Result : Vector(A'Range); --  the formal type Vector
  17206.                          Bias  : constant Integer := B'First - A'First;
  17207.                         begin
  17208.                          if A'Length /= B'Length then
  17209.                            raise Length_Error;
  17210.                          end if;
  17211.  
  17212.         11.
  17213.  
  17214.                           for N in A'Range loop
  17215.                            Result(N) := Sum(A(N), B(N + Bias));
  17216.                            --  the formal function Sum
  17217.                          end loop;
  17218.                          return Result;
  17219.                         end Sum;
  17220.  
  17221.         12.
  17222.  
  17223.                         function Sigma(A : Vector) return Item is
  17224.                          Total : Item := A(A'First); --  the formal type Item
  17225.                         begin
  17226.                          for N in A'First + 1 ┬╖┬╖ A'Last loop
  17227.                            Total := Sum(Total, A(N)); --  the formal function Sum
  17228.                          end loop;
  17229.                          return Total;
  17230.                         end Sigma;
  17231.                       end On_Vectors;
  17232.  
  17233.  
  17234. ΓòÉΓòÉΓòÉ 15.3. Generic Instantiation ΓòÉΓòÉΓòÉ
  17235.  
  17236.    1. An instance of a generic unit is declared by a generic_instantiation. 
  17237.  
  17238.             Syntax
  17239.  
  17240.          2.
  17241.  
  17242.                       generic_instantiation ::=
  17243.                          package defining_program_unit_name is
  17244.                           new generic_package_name [generic_actual_part];
  17245.                         | procedure defining_program_unit_name is
  17246.                           new generic_procedure_name [generic_actual_part];
  17247.                         | function defining_designator is
  17248.                           new generic_function_name [generic_actual_part];
  17249.  
  17250.          3.
  17251.  
  17252.                       generic_actual_part ::=
  17253.                         (generic_association {, generic_association})
  17254.  
  17255.          4.
  17256.  
  17257.                       generic_association ::=
  17258.                         [generic_formal_parameter_selector_name =>]
  17259.                          explicit_generic_actual_parameter
  17260.  
  17261.          5.
  17262.  
  17263.                       explicit_generic_actual_parameter ::= expression | variable_name
  17264.                         | subprogram_name | entry_name | subtype_mark
  17265.                         | package_instance_name
  17266.  
  17267.         a. A generic_association is named or positional according to whether or 
  17268.            not the generic_formal_parameter_selector_name is specified. Any 
  17269.            positional associations shall precede any named associations. 
  17270.  
  17271.    1. The generic actual parameter is either the 
  17272.       explicit_generic_actual_parameter given in a 
  17273.       generic_parameter_association for each formal, or the corresponding 
  17274.       default_expression or default_name if no generic_parameter_association is 
  17275.       given for the formal. When the meaning is clear from context, the term 
  17276.       ``generic actual,'' or simply ``actual,'' is used as a synonym for 
  17277.       ``generic actual parameter'' and also for the view denoted by one, or the 
  17278.       value of one. 
  17279.  
  17280.             Legality Rules
  17281.  
  17282.    2. In a generic_instantiation for a particular kind of program unit 
  17283.       (package, procedure, or function), the name shall denote a generic unit 
  17284.       of the corresponding kind (generic package, generic procedure, or generic 
  17285.       function, respectively). 
  17286.  
  17287.    3. The generic_formal_parameter_selector_name of a generic_association shall 
  17288.       denote a generic_formal_parameter_declaration of the generic unit being 
  17289.       instantiated. If two or more formal subprograms have the same defining 
  17290.       name, then named associations are not allowed for the corresponding 
  17291.       actuals. 
  17292.  
  17293.    4. A generic_instantiation shall contain at most one generic_association for 
  17294.       each formal. Each formal without an association shall have a 
  17295.       default_expression or subprogram_default. 
  17296.  
  17297.    5. In a generic unit Legality Rules are enforced at compile time of the 
  17298.       generic_declaration and generic body, given the properties of the 
  17299.       formals. In the visible part and formal part of an instance, Legality 
  17300.       Rules are enforced at compile time of the generic_instantiation, given 
  17301.       the properties of the actuals. In other parts of an instance, Legality 
  17302.       Rules are not enforced; this rule does not apply when a given rule 
  17303.       explicitly specifies otherwise. 
  17304.  
  17305.             Static Semantics
  17306.  
  17307.    6. A generic_instantiation declares an instance; it is equivalent to the 
  17308.       instance declaration (a package_declaration or subprogram_declaration) 
  17309.       immediately followed by the instance body, both at the place of the 
  17310.       instantiation. 
  17311.  
  17312.    7. The instance is a copy of the text of the template. Each use of a formal 
  17313.       parameter becomes (in the copy) a use of the actual, as explained below. 
  17314.       An instance of a generic package is a package, that of a generic 
  17315.       procedure is a procedure, and that of a generic function is a function. 
  17316.  
  17317.    8. The interpretation of each construct within a generic declaration or body 
  17318.       is determined using the overloading rules when that generic declaration 
  17319.       or body is compiled. In an instance, the interpretation of each (copied) 
  17320.       construct is the same, except in the case of a name that denotes the 
  17321.       generic_declaration or some declaration within the generic unit; the 
  17322.       corresponding name in the instance then denotes the corresponding copy of 
  17323.       the denoted declaration. The overloading rules do not apply in the 
  17324.       instance. 
  17325.  
  17326.    9. In an instance, a generic_formal_parameter_declaration declares a view 
  17327.       whose properties are identical to those of the actual, except as 
  17328.       specified in 12.4: ``Formal Objects'', and 12.6: ``Formal Subprograms''. 
  17329.       Similarly, for a declaration within a 
  17330.       generic_formal_parameter_declaration, the corresponding declaration in an 
  17331.       instance declares a view whose properties are identical to the 
  17332.       corresponding declaration within the declaration of the actual. 
  17333.  
  17334.   10. Implicit declarations are also copied, and a name that denotes an 
  17335.       implicit declaration in the generic denotes the corresponding copy in the 
  17336.       instance. However, for a type declared within the visible part of the 
  17337.       generic, a whole new set of primitive subprograms is implicitly declared 
  17338.       for use outside the instance, and may differ from the copied set if the 
  17339.       properties of the type in some way depend on the properties of some 
  17340.       actual type specified in the instantiation. For example, if the type in 
  17341.       the generic is derived from a formal private type, then in the instance 
  17342.       the type will inherit subprograms from the corresponding actual type. 
  17343.  
  17344.   11. These new implicit declarations occur immediately after the type 
  17345.       declaration in the instance, and override the copied ones. The copied 
  17346.       ones can be called only from within the instance; the new ones can be 
  17347.       called only from outside the instance, although for tagged types, the 
  17348.       body of a new one can be executed by a call to an old one. 
  17349.  
  17350.   12. In the visible part of an instance, an explicit declaration overrides an 
  17351.       implicit declaration if they are homographs, as described in 8.3. On the 
  17352.       other hand, an explicit declaration in the private part of an instance 
  17353.       overrides an implicit declaration in the instance, only if the 
  17354.       corresponding explicit declaration in the generic overrides a 
  17355.       corresponding implicit declaration in the generic. Corresponding rules 
  17356.       apply to the other kinds of overriding described in 8.3. 
  17357.  
  17358.             Post-Compilation Rules
  17359.  
  17360.   13. Recursive generic instantiation is not allowed in the following sense: if 
  17361.       a given generic unit includes an instantiation of a second generic unit, 
  17362.       then the instance generated by this instantiation shall not include an 
  17363.       instance of the first generic unit (whether this instance is generated 
  17364.       directly, or indirectly by intermediate instantiations). 
  17365.  
  17366.             Dynamic Semantics
  17367.  
  17368.   14. For the elaboration of a generic_instantiation, each generic_association 
  17369.       is first evaluated. If a default is used, an implicit generic_association 
  17370.       is assumed for this rule. These evaluations are done in an arbitrary 
  17371.       order, except that the evaluation for a default actual takes place after 
  17372.       the evaluation for another actual if the default includes a name that 
  17373.       denotes the other one. Finally, the instance declaration and body are 
  17374.       elaborated. 
  17375.  
  17376.   15. For the evaluation of a generic_association the generic actual parameter 
  17377.       is evaluated. Additional actions are performed in the case of a formal 
  17378.       object of mode in, see 12.4. 
  17379.  
  17380.       NOTES 
  17381.  
  17382.   16. (5) If a formal type is not tagged, then the type is treated as an 
  17383.       untagged type within the generic body. Deriving from such a type in a 
  17384.       generic body is permitted; the new type does not get a new tag value, 
  17385.       even if the actual is tagged. Overriding operations for such a derived 
  17386.       type cannot be dispatched to from outside the instance. 
  17387.  
  17388.             Examples
  17389.  
  17390.   17. Examples of generic instantiations, see 12.1 
  17391.  
  17392.         18.
  17393.  
  17394.                       procedure Swap is new Exchange(Elem => Integer);
  17395.                       procedure Swap is new Exchange(Character);
  17396.                       --  Swap is overloaded
  17397.                       function Square is new Squaring(Integer);
  17398.                       --  "*" of Integer used by default
  17399.                       function Square is new Squaring
  17400.                        (Item => Matrix, "*" => Matrix_Product);
  17401.                       function Square is new Squaring
  17402.                        (Matrix, Matrix_Product); -- same as previous
  17403.  
  17404.         19.
  17405.  
  17406.                       package Int_Vectors is new On_Vectors(Integer, Table, "+");
  17407.  
  17408.   20. Examples of uses of instantiated units: 
  17409.  
  17410.         21.
  17411.  
  17412.                       Swap(A, B);
  17413.                       A := Square(A);
  17414.  
  17415.         22.
  17416.  
  17417.                       T : Table(1 ┬╖┬╖ 5) := (10, 20, 30, 40, 50);
  17418.                       N : Integer := Int_Vectors.Sigma(T);
  17419.                       --  150 (see 12.2: ``Generic Bodies'', for the body of Sigma)
  17420.  
  17421.         23.
  17422.  
  17423.                       use Int_Vectors;
  17424.                       M : Integer := Sigma(T);  --  150
  17425.  
  17426.  
  17427. ΓòÉΓòÉΓòÉ 15.4. Formal Objects ΓòÉΓòÉΓòÉ
  17428.  
  17429.    1. A generic formal object can be used to pass a value or variable to a 
  17430.       generic unit. 
  17431.  
  17432.             Syntax
  17433.  
  17434.          2.
  17435.  
  17436.                       formal_object_declaration ::=
  17437.                         defining_identifier_list : mode subtype_mark
  17438.                          [:= default_expression];
  17439.  
  17440.   Name Resolution Rules
  17441.  
  17442.    3. The expected type for the default_expression, if any, of a formal object 
  17443.       is the type of the formal object. 
  17444.  
  17445.    4. For a generic formal object of mode in, the expected type for the actual 
  17446.       is the type of the formal. 
  17447.  
  17448.    5. For a generic formal object of mode in out, the type of the actual shall 
  17449.       resolve to the type of the formal. 
  17450.  
  17451.             Legality Rules
  17452.  
  17453.    6. If a generic formal object has a default_expression, then the mode shall 
  17454.       be in (either explicitly or by default); otherwise, its mode shall be 
  17455.       either in or in out. 
  17456.  
  17457.    7. For a generic formal object of mode in, the actual shall be an 
  17458.       expression. For a generic formal object of mode in out, the actual shall 
  17459.       be a name that denotes a variable for which renaming is allowed (see 
  17460.       8.5.1). 
  17461.  
  17462.    8. The type of a generic formal object of mode in shall be nonlimited. 
  17463.  
  17464.             Static Semantics
  17465.  
  17466.    9. A formal_object_declaration declares a generic formal object. The default 
  17467.       mode is in. For a formal object of mode in, the nominal subtype is the 
  17468.       one denoted by the subtype_mark in the declaration of the formal. For a 
  17469.       formal object of mode in out, its type is determined by the subtype_mark 
  17470.       in the declaration; its nominal subtype is nonstatic, even if the 
  17471.       subtype_mark denotes a static subtype. 
  17472.  
  17473.   10. In an instance, a formal_object_declaration of mode in declares a new 
  17474.       stand-alone constant object whose initialization expression is the 
  17475.       actual, whereas a formal_object_declaration of mode in out declares a 
  17476.       view whose properties are identical to those of the actual. 
  17477.  
  17478.             Dynamic Semantics
  17479.  
  17480.   11. For the evaluation of a generic_association for a formal object of mode 
  17481.       in, a constant object is created, the value of the actual parameter is 
  17482.       converted to the nominal subtype of the formal object, and assigned to 
  17483.       the object, including any value adjustment --  see 7.6. 
  17484.  
  17485.       NOTES 
  17486.  
  17487.   12. (6) The constraints that apply to a generic formal object of mode in out 
  17488.       are those of the corresponding generic actual parameter (not those 
  17489.       implied by the subtype_mark that appears in the 
  17490.       formal_object_declaration). Therefore, to avoid confusion, it is 
  17491.       recommended that the name of a first subtype be used for the declaration 
  17492.       of such a formal object. 
  17493.  
  17494.  
  17495. ΓòÉΓòÉΓòÉ 15.5. Formal Types ΓòÉΓòÉΓòÉ
  17496.  
  17497.    1. A generic formal subtype can be used to pass to a generic unit a subtype 
  17498.       whose type is in a certain class of types. 
  17499.  
  17500.             Syntax
  17501.  
  17502.          2.
  17503.  
  17504.                       formal_type_declaration ::=
  17505.                         type defining_identifier[discriminant_part] is
  17506.                          formal_type_definition;
  17507.  
  17508.          3.
  17509.  
  17510.                       formal_type_definition ::=
  17511.                          formal_private_type_definition
  17512.                         | formal_derived_type_definition
  17513.                         | formal_discrete_type_definition
  17514.                         | formal_signed_integer_type_definition
  17515.                         | formal_modular_type_definition
  17516.                         | formal_floating_point_definition
  17517.                         | formal_ordinary_fixed_point_definition
  17518.                         | formal_decimal_fixed_point_definition
  17519.                         | formal_array_type_definition
  17520.                         | formal_access_type_definition
  17521.  
  17522.   Legality Rules
  17523.  
  17524.    4. For a generic formal subtype, the actual shall be a subtype_mark; it 
  17525.       denotes the (generic) actual subtype. 
  17526.  
  17527.             Static Semantics
  17528.  
  17529.    5. A formal_type_declaration declares a (generic) formal type, and its first 
  17530.       subtype, the (generic) formal subtype. 
  17531.  
  17532.    6. The form of a formal_type_definition determines a class to which the 
  17533.       formal type belongs. For a formal_private_type_definition the reserved 
  17534.       words tagged and limited indicate the class, see 12.5.1. For a 
  17535.       formal_derived_type_definition the class is the derivation class rooted 
  17536.       at the ancestor type. For other formal types, the name of the syntactic 
  17537.       category indicates the class; a formal_discrete_type_definition defines a 
  17538.       discrete type, and so on. 
  17539.  
  17540.             Legality Rules
  17541.  
  17542.    7. The actual type shall be in the class determined for the formal. 
  17543.  
  17544.             Static Semantics
  17545.  
  17546.    8. The formal type also belongs to each class that contains the determined 
  17547.       class. The primitive subprograms of the type are as for any type in the 
  17548.       determined class. For a formal type other than a formal derived type, 
  17549.       these are the predefined operators of the type; they are implicitly 
  17550.       declared immediately after the declaration of the formal type. In an 
  17551.       instance, the copy of such an implicit declaration declares a view of the 
  17552.       predefined operator of the actual type, even if this operator has been 
  17553.       overridden for the actual type. The rules specific to formal derived 
  17554.       types are given in 12.5.1. 
  17555.  
  17556.       NOTES 
  17557.  
  17558.    9. (7) Generic formal types, like all types, are not named. Instead, a name 
  17559.       can denote a generic formal subtype. Within a generic unit, a generic 
  17560.       formal type is considered as being distinct from all other (formal or 
  17561.       nonformal) types. 
  17562.  
  17563.   10. (8) A discriminant_part is allowed only for certain kinds of types, and 
  17564.       therefore only for certain kinds of generic formal types (see 3.7). 
  17565.  
  17566.             Examples
  17567.  
  17568.   11. Examples of generic formal types: 
  17569.  
  17570.         12.
  17571.  
  17572.                       type Item is private;
  17573.                       type Buffer(Length : Natural) is limited private;
  17574.  
  17575.         13.
  17576.  
  17577.                       type Enum  is (<>);
  17578.                       type Int  is range <>;
  17579.                       type Angle is delta <>;
  17580.                       type Mass  is digits <>;
  17581.  
  17582.         14.
  17583.  
  17584.                       type Table is array (Enum) of Item;
  17585.  
  17586.   15. Example of a generic formal part declaring a formal integer type: 
  17587.  
  17588.         16.
  17589.  
  17590.                       generic
  17591.                         type Rank is range <>;
  17592.                         First  : Rank := Rank'First;
  17593.                         Second : Rank := First + 1;
  17594.                         --  the operator "+" of the type Rank
  17595.  
  17596.  12.5.1                        Formal Private and Derived Types 
  17597.  12.5.2                        Formal Scalar Types 
  17598.  12.5.3                        Formal Array Types 
  17599.  12.5.4                        Formal Access Types 
  17600.  
  17601.  
  17602. ΓòÉΓòÉΓòÉ 15.5.1. Formal Private and Derived Types ΓòÉΓòÉΓòÉ
  17603.  
  17604.    1. The class determined for a formal private type can be either limited or 
  17605.       nonlimited, and either tagged or untagged; no more specific class is 
  17606.       known for such a type. The class determined for a formal derived type is 
  17607.       the derivation class rooted at the ancestor type. 
  17608.  
  17609.             Syntax
  17610.  
  17611.          2.
  17612.  
  17613.                       formal_private_type_definition ::=
  17614.                         [[abstract] tagged] [limited] private
  17615.  
  17616.          3.
  17617.  
  17618.                       formal_derived_type_definition ::=
  17619.                         [abstract] new subtype_mark [with private]
  17620.  
  17621.   Legality Rules
  17622.  
  17623.    4. If a generic formal type declaration has a known_discriminant_part, then 
  17624.       it shall not include a default_expression for a discriminant. 
  17625.  
  17626.    5. The ancestor subtype of a formal derived type is the subtype denoted by 
  17627.       the subtype_mark of the formal_derived_type_definition. For a formal 
  17628.       derived type declaration, the reserved words with private shall appear if 
  17629.       and only if the ancestor type is a tagged type; in this case the formal 
  17630.       derived type is a private extension of the ancestor type and the ancestor 
  17631.       shall not be a class-wide type. Similarly, the optional reserved word 
  17632.       abstract shall appear only if the ancestor type is a tagged type. 
  17633.  
  17634.    6. If the formal subtype is definite, then the actual subtype shall also be 
  17635.       definite. 
  17636.  
  17637.    7. For a generic formal derived type with no discriminant_part: 
  17638.  
  17639.         a. If the ancestor subtype is constrained, the actual subtype shall be 
  17640.            constrained, and shall be statically compatible with the ancestor; 
  17641.  
  17642.         b. If the ancestor subtype is an unconstrained access or composite 
  17643.            subtype, the actual subtype shall be unconstrained. 
  17644.  
  17645.         c. If the ancestor subtype is an unconstrained discriminated subtype, 
  17646.            then the actual shall have the same number of discriminants, and 
  17647.            each discriminant of the actual shall correspond to a discriminant 
  17648.            of the ancestor, in the sense of 3.7. 
  17649.  
  17650.    1. The declaration of a formal derived type shall not have a 
  17651.       known_discriminant_part. For a generic formal private type with a 
  17652.       known_discriminant_part: 
  17653.  
  17654.         a. The actual type shall be a type with the same number of 
  17655.            discriminants. 
  17656.  
  17657.         b. The actual subtype shall be unconstrained. 
  17658.  
  17659.         c. The subtype of each discriminant of the actual type shall statically 
  17660.            match the subtype of the corresponding discriminant of the formal 
  17661.            type. 
  17662.  
  17663.    1. For a generic formal type with an unknown_discriminant_part, the actual 
  17664.       may, but need not, have discriminants, and may be definite or indefinite. 
  17665.  
  17666.             Static Semantics
  17667.  
  17668.    2. The class determined for a formal private type is as follows: 
  17669.  
  17670.          3.
  17671.  
  17672.                       Type Definition     Determined Class
  17673.                       limited private     the class of all types
  17674.                       private         the class of all nonlimited types
  17675.                       tagged limited private  the class of all tagged types
  17676.                       tagged private      the class of all nonlimited tagged types
  17677.  
  17678.    4. The presence of the reserved word abstract determines whether the actual 
  17679.       type may be abstract. 
  17680.  
  17681.    5. A formal private or derived type is a private or derived type, 
  17682.       respectively. A formal derived tagged type is a private extension. A 
  17683.       formal private or derived type is abstract if the reserved word abstract 
  17684.       appears in its declaration. 
  17685.  
  17686.    6. If the ancestor type is a composite type that is not an array type, the 
  17687.       formal type inherits components from the ancestor type (including 
  17688.       discriminants if a new discriminant_part is not specified), as for a 
  17689.       derived type defined by a derived_type_definition, see 3.4. 
  17690.  
  17691.    7. For a formal derived type, the predefined operators and inherited 
  17692.       user-defined subprograms are determined by the ancestor type, and are 
  17693.       implicitly declared at the earliest place, if any, within the immediate 
  17694.       scope of the formal type, where the corresponding primitive subprogram of 
  17695.       the ancestor is visible, see 7.3.1. In an instance, the copy of such an 
  17696.       implicit declaration declares a view of the corresponding primitive 
  17697.       subprogram of the ancestor, even if this primitive has been overridden 
  17698.       for the actual type. In the case of a formal private extension, however, 
  17699.       the tag of the formal type is that of the actual type, so if the tag in a 
  17700.       call is statically determined to be that of the formal type, the body 
  17701.       executed will be that corresponding to the actual type. 
  17702.  
  17703.    8. For a prefix S that denotes a formal indefinite subtype, the following 
  17704.       attribute is defined: 
  17705.  
  17706.    9. S'Definite 
  17707.  
  17708.                       S'Definite yields True if the actual subtype corresponding to
  17709.                       S is definite; otherwise it yields False. The value of this
  17710.                       attribute is of the predefined type Boolean.
  17711.  
  17712.  NOTES 
  17713.  
  17714.   10. (9) In accordance with the general rule that the actual type shall belong 
  17715.       to the class determined for the formal, see 12.5: ``Formal Types''.: 
  17716.  
  17717.         a. If the formal type is nonlimited, then so shall be the actual; 
  17718.  
  17719.         b. For a formal derived type, the actual shall be in the class rooted 
  17720.            at the ancestor subtype. 
  17721.  
  17722.    1. (10) The actual type can be abstract only if the formal type is abstract 
  17723.       (see 3.9.3). 
  17724.  
  17725.    2. (11) If the formal has a discriminant_part, the actual can be either 
  17726.       definite or indefinite. Otherwise, the actual has to be definite. 
  17727.  
  17728.  
  17729. ΓòÉΓòÉΓòÉ 15.5.2. Formal Scalar Types ΓòÉΓòÉΓòÉ
  17730.  
  17731.    1. A formal scalar type is one defined by any of the formal_type_definitions 
  17732.       in this subclause. The class determined for a formal scalar type is 
  17733.       discrete, signed integer, modular, floating point, ordinary fixed point, 
  17734.       or decimal. 
  17735.  
  17736.             Syntax
  17737.  
  17738.          2.
  17739.  
  17740.                       formal_discrete_type_definition ::= (<>)
  17741.  
  17742.          3.
  17743.  
  17744.                       formal_signed_integer_type_definition ::= range <>
  17745.  
  17746.          4.
  17747.  
  17748.                       formal_modular_type_definition ::= mod <>
  17749.  
  17750.          5.
  17751.  
  17752.                       formal_floating_point_definition ::= digits <>
  17753.  
  17754.          6.
  17755.  
  17756.                       formal_ordinary_fixed_point_definition ::= delta <>
  17757.  
  17758.          7.
  17759.  
  17760.                       formal_decimal_fixed_point_definition ::= delta <> digits <>
  17761.  
  17762.   Legality Rules
  17763.  
  17764.    8. The actual type for a formal scalar type shall not be a nonstandard 
  17765.       numeric type. 
  17766.  
  17767.       NOTES 
  17768.  
  17769.    9. (12) The actual type shall be in the class of types implied by the 
  17770.       syntactic category of the formal type definition, see 12.5: ``Formal 
  17771.       Types''. For example, the actual for a formal_modular_type_definition 
  17772.       shall be a modular type. 
  17773.  
  17774.  
  17775. ΓòÉΓòÉΓòÉ 15.5.3. Formal Array Types ΓòÉΓòÉΓòÉ
  17776.  
  17777.    1. The class determined for a formal array type is the class of all array 
  17778.       types. 
  17779.  
  17780.             Syntax
  17781.  
  17782.          2.
  17783.  
  17784.                       formal_array_type_definition ::= array_type_definition
  17785.  
  17786.   Legality Rules
  17787.  
  17788.    3. The only form of discrete_subtype_definition that is allowed within the 
  17789.       declaration of a generic formal (constrained) array subtype is a 
  17790.       subtype_mark. 
  17791.  
  17792.    4. For a formal array subtype, the actual subtype shall satisfy the 
  17793.       following conditions: 
  17794.  
  17795.         a. The formal array type and the actual array type shall have the same 
  17796.            dimensionality; the formal subtype and the actual subtype shall be 
  17797.            either both constrained or both unconstrained. 
  17798.  
  17799.         b. For each index position, the index types shall be the same, and the 
  17800.            index subtypes (if unconstrained), or the index ranges (if 
  17801.            constrained), shall statically match, see 4.9.1. 
  17802.  
  17803.         c. The component subtypes of the formal and actual array types shall 
  17804.            statically match. 
  17805.  
  17806.         d. If the formal type has aliased components, then so shall the actual. 
  17807.  
  17808.   Examples
  17809.  
  17810.    1. Example of formal array types: 
  17811.  
  17812.          2.
  17813.  
  17814.                       --  given the generic package
  17815.  
  17816.          3.
  17817.  
  17818.                       generic
  17819.                         type Item  is private;
  17820.                         type Index  is (<>);
  17821.                         type Vector is array (Index range <>) of Item;
  17822.                         type Table  is array (Index) of Item;
  17823.                       package P is
  17824.                         ┬╖┬╖┬╖
  17825.                       end P;
  17826.  
  17827.          4.
  17828.  
  17829.                       --  and the types
  17830.  
  17831.          5.
  17832.  
  17833.                       type Mix   is array (Color range <>) of Boolean;
  17834.                       type Option is array (Color) of Boolean;
  17835.  
  17836.          6.
  17837.  
  17838.                       --  then Mix can match Vector and Option can match Table
  17839.  
  17840.          7.
  17841.  
  17842.                       package R is new P(Item  => Boolean, Index => Color,
  17843.                                 Vector => Mix,   Table => Option);
  17844.  
  17845.          8.
  17846.  
  17847.                       --  Note that Mix cannot match Table and Option cannot match Vector
  17848.  
  17849.  
  17850. ΓòÉΓòÉΓòÉ 15.5.4. Formal Access Types ΓòÉΓòÉΓòÉ
  17851.  
  17852.    1. The class determined for a formal access type is the class of all access 
  17853.       types. 
  17854.  
  17855.             Syntax
  17856.  
  17857.          2.
  17858.  
  17859.                       formal_access_type_definition ::= access_type_definition
  17860.  
  17861.   Legality Rules
  17862.  
  17863.    3. For a formal access-to-object type, the designated subtypes of the formal 
  17864.       and actual types shall statically match. 
  17865.  
  17866.    4. If and only if the general_access_modifier constant applies to the 
  17867.       formal, the actual shall be an access-to-constant type. If the 
  17868.       general_access_modifier all applies to the formal, then the actual shall 
  17869.       be a general access-to-variable type, see 3.10. 
  17870.  
  17871.    5. For a formal access-to-subprogram subtype, the designated profiles of the 
  17872.       formal and the actual shall be mode-conformant, and the calling 
  17873.       convention of the actual shall be protected if and only if that of the 
  17874.       formal is protected. 
  17875.  
  17876.             Examples
  17877.  
  17878.    6. Example of formal access types: 
  17879.  
  17880.          7.
  17881.  
  17882.                       --  the formal types of the generic package
  17883.  
  17884.          8.
  17885.  
  17886.                       generic
  17887.                         type Node is private;
  17888.                         type Link is access Node;
  17889.                       package P is
  17890.                         ┬╖┬╖┬╖
  17891.                       end P;
  17892.  
  17893.          9.
  17894.  
  17895.                       --  can be matched by the actual types
  17896.  
  17897.         10.
  17898.  
  17899.                       type Car;
  17900.                       type Car_Name is access Car;
  17901.  
  17902.         11.
  17903.  
  17904.                       type Car is
  17905.                         record
  17906.                          Pred, Succ : Car_Name;
  17907.                          Number   : License_Number;
  17908.                          Owner    : Person;
  17909.                         end record;
  17910.  
  17911.         12.
  17912.  
  17913.                       --  in the following generic instantiation
  17914.  
  17915.         13.
  17916.  
  17917.                       package R is new P(Node => Car, Link => Car_Name);
  17918.  
  17919.  
  17920. ΓòÉΓòÉΓòÉ 15.6. Formal Subprograms ΓòÉΓòÉΓòÉ
  17921.  
  17922.    1. Formal subprograms can be used to pass callable entities to a generic 
  17923.       unit. 
  17924.  
  17925.             Syntax
  17926.  
  17927.          2.
  17928.  
  17929.                       formal_subprogram_declaration ::=
  17930.                         with subprogram_specification [is subprogram_default];
  17931.  
  17932.          3.
  17933.  
  17934.                       subprogram_default ::= default_name | <>
  17935.  
  17936.          4.
  17937.  
  17938.                       default_name ::= name
  17939.  
  17940.   Name Resolution Rules
  17941.  
  17942.    5. The expected profile for the default_name, if any, is that of the formal 
  17943.       subprogram. 
  17944.  
  17945.    6. For a generic formal subprogram, the expected profile for the actual is 
  17946.       that of the formal subprogram. 
  17947.  
  17948.             Legality Rules
  17949.  
  17950.    7. The profiles of the formal and any named default shall be 
  17951.       mode-conformant. 
  17952.  
  17953.    8. The profiles of the formal and actual shall be mode-conformant. 
  17954.  
  17955.             Static Semantics
  17956.  
  17957.    9. A formal_subprogram_declaration declares a generic formal subprogram. The 
  17958.       types of the formal parameters and result, if any, of the formal 
  17959.       subprogram are those determined by the subtype_marks given in the 
  17960.       formal_subprogram_declaration; however, independent of the particular 
  17961.       subtypes that are denoted by the subtype_marks, the nominal subtypes of 
  17962.       the formal parameters and result, if any, are defined to be nonstatic, 
  17963.       and unconstrained if of an array type (no applicable index constraint is 
  17964.       provided in a call on a formal subprogram). In an instance, a 
  17965.       formal_subprogram_declaration declares a view of the actual. The profile 
  17966.       of this view takes its subtypes and calling convention from the original 
  17967.       profile of the actual entity, while taking the formal parameter names and 
  17968.       default_expressions from the profile given in the 
  17969.       formal_subprogram_declaration. The view is a function or procedure, never 
  17970.       an entry. 
  17971.  
  17972.   10. If a generic unit has a subprogram_default specified by a box, and the 
  17973.       corresponding actual parameter is omitted, then it is equivalent to an 
  17974.       explicit actual parameter that is a usage name identical to the defining 
  17975.       name of the formal. 
  17976.  
  17977.       NOTES 
  17978.  
  17979.   11. (13) The matching rules for formal subprograms state requirements that 
  17980.       are similar to those applying to subprogram_renaming_declarations (see 
  17981.       8.5.4). In particular, the name of a parameter of the formal subprogram 
  17982.       need not be the same as that of the corresponding parameter of the actual 
  17983.       subprogram; similarly, for these parameters, default_expressions need not 
  17984.       correspond. 
  17985.  
  17986.   12. (14) The constraints that apply to a parameter of a formal subprogram are 
  17987.       those of the corresponding formal parameter of the matching actual 
  17988.       subprogram (not those implied by the corresponding subtype_mark in the 
  17989.       _specification of the formal subprogram). A similar remark applies to the 
  17990.       result of a function. Therefore, to avoid confusion, it is recommended 
  17991.       that the name of a first subtype be used in any declaration of a formal 
  17992.       subprogram. 
  17993.  
  17994.   13. (15) The subtype specified for a formal parameter of a generic formal 
  17995.       subprogram can be any visible subtype, including a generic formal subtype 
  17996.       of the same generic_formal_part. 
  17997.  
  17998.   14. (16) A formal subprogram is matched by an attribute of a type if the 
  17999.       attribute is a function with a matching specification. An enumeration 
  18000.       literal of a given type matches a parameterless formal function whose 
  18001.       result type is the given type. 
  18002.  
  18003.   15. (17) A default_name denotes an entity that is visible or directly visible 
  18004.       at the place of the generic_declaration; a box used as a default is 
  18005.       equivalent to a name that denotes an entity that is directly visible at 
  18006.       the place of the _instantiation. 
  18007.  
  18008.   16. (18) The actual subprogram cannot be abstract, see 3.9.3. 
  18009.  
  18010.             Examples
  18011.  
  18012.   17. Examples of generic formal subprograms: 
  18013.  
  18014.         18.
  18015.  
  18016.                       with function "+"(X, Y : Item) return Item is <>;
  18017.                       with function Image(X : Enum) return String is Enum'Image;
  18018.                       with procedure Update is Default_Update;
  18019.  
  18020.         19.
  18021.  
  18022.                       --  given the generic procedure declaration
  18023.  
  18024.         20.
  18025.  
  18026.                       generic
  18027.                         with procedure Action (X : in Item);
  18028.                       procedure Iterate(Seq : in Item_Sequence);
  18029.  
  18030.         21.
  18031.  
  18032.                       --  and the procedure
  18033.  
  18034.         22.
  18035.  
  18036.                       procedure Put_Item(X : in Item);
  18037.  
  18038.         23.
  18039.  
  18040.                       --  the following instantiation is possible
  18041.  
  18042.         24.
  18043.  
  18044.                       procedure Put_List is new Iterate(Action => Put_Item);
  18045.  
  18046.  
  18047. ΓòÉΓòÉΓòÉ 15.7. Formal Packages ΓòÉΓòÉΓòÉ
  18048.  
  18049.    1. Formal packages can be used to pass packages to a generic unit. The 
  18050.       formal_package_declaration declares that the formal package is an 
  18051.       instance of a given generic package. Upon instantiation, the actual 
  18052.       package has to be an instance of that generic package. 
  18053.  
  18054.             Syntax
  18055.  
  18056.          2.
  18057.  
  18058.                       formal_package_declaration ::=
  18059.                         with package defining_identifier is new
  18060.                          generic_package_name formal_package_actual_part;
  18061.  
  18062.          3.
  18063.  
  18064.                       formal_package_actual_part ::= (<>) | [generic_actual_part]
  18065.  
  18066.   Legality Rules
  18067.  
  18068.    4. The generic_package_name shall denote a generic package (the template for 
  18069.       the formal package); the formal package is an instance of the template. 
  18070.  
  18071.    5. The actual shall be an instance of the template. If the 
  18072.       formal_package_actual_part is (<>), then the actual may be any instance 
  18073.       of the template; otherwise, each actual parameter of the actual instance 
  18074.       shall match the corresponding actual parameter of the formal package 
  18075.       (whether the actual parameter is given explicitly or by default), as 
  18076.       follows: 
  18077.  
  18078.         a. For a formal object of mode in the actuals match if they are static 
  18079.            expressions with the same value, or if they statically denote the 
  18080.            same constant, or if they are both the literal null. 
  18081.  
  18082.         b. For a formal subtype, the actuals match if they denote statically 
  18083.            matching subtypes. 
  18084.  
  18085.         c. For other kinds of formals, the actuals match if they statically 
  18086.            denote the same entity. 
  18087.  
  18088.   Static Semantics
  18089.  
  18090.    1. A formal_package_declaration declares a generic formal package. 
  18091.  
  18092.    2. The visible part of a formal package includes the first list of 
  18093.       basic_declarative_items of the package_specification. In addition, if the 
  18094.       formal_package_actual_part is (<>), it also includes the 
  18095.       generic_formal_part of the template for the formal package. 
  18096.  
  18097.  
  18098. ΓòÉΓòÉΓòÉ 15.8. Example of a Generic Package ΓòÉΓòÉΓòÉ
  18099.  
  18100.    1. The following example provides a possible formulation of stacks by means 
  18101.       of a generic package. The size of each stack and the type of the stack 
  18102.       elements are provided as generic formal parameters. 
  18103.  
  18104.             Examples
  18105.  
  18106.          1.
  18107.  
  18108.                       generic
  18109.                         Size : Positive;
  18110.                         type Item is private;
  18111.                       package Stack is
  18112.                         procedure Push(E : in  Item);
  18113.                         procedure Pop (E : out Item);
  18114.                         Overflow, Underflow : exception;
  18115.                       end Stack;
  18116.  
  18117.          2.
  18118.  
  18119.                       package body Stack is
  18120.  
  18121.          3.
  18122.  
  18123.                         type Table is array (Positive range <>) of Item;
  18124.                         Space : Table(1 ┬╖┬╖ Size);
  18125.                         Index : Natural := 0;
  18126.  
  18127.          4.
  18128.  
  18129.                         procedure Push(E : in Item) is
  18130.                         begin
  18131.                          if Index >= Size then
  18132.                            raise Overflow;
  18133.                          end if;
  18134.                          Index := Index + 1;
  18135.                          Space(Index) := E;
  18136.                         end Push;
  18137.  
  18138.          5.
  18139.  
  18140.                         procedure Pop(E : out Item) is
  18141.                         begin
  18142.                          if Index = 0 then
  18143.                            raise Underflow;
  18144.                          end if;
  18145.                          E := Space(Index);
  18146.                          Index := Index - 1;
  18147.                         end Pop;
  18148.  
  18149.          6.
  18150.  
  18151.                       end Stack;
  18152.  
  18153.    7. Instances of this generic package can be obtained as follows: 
  18154.  
  18155.          8.
  18156.  
  18157.                       package Stack_Int  is new Stack(Size => 200, Item => Integer);
  18158.                       package Stack_Bool is new Stack(100, Boolean);
  18159.  
  18160.    9. Thereafter, the procedures of the instantiated packages can be called as 
  18161.       follows: 
  18162.  
  18163.         10.
  18164.  
  18165.                       Stack_Int.Push(N);
  18166.                       Stack_Bool.Push(True);
  18167.  
  18168.   11. Alternatively, a generic formulation of the type Stack can be given as 
  18169.       follows (package body omitted): 
  18170.  
  18171.         12.
  18172.  
  18173.                       generic
  18174.                         type Item is private;
  18175.                       package On_Stacks is
  18176.                         type Stack(Size : Positive) is limited private;
  18177.                         procedure Push(S : in out Stack; E : in  Item);
  18178.                         procedure Pop (S : in out Stack; E : out Item);
  18179.                         Overflow, Underflow : exception;
  18180.                       private
  18181.                         type Table is array (Positive range <>) of Item;
  18182.                         type Stack(Size : Positive) is
  18183.                          record
  18184.                            Space : Table(1 ┬╖┬╖ Size);
  18185.                            Index : Natural := 0;
  18186.                          end record;
  18187.                       end On_Stacks;
  18188.  
  18189.   13. In order to use such a package, an instance has to be created and 
  18190.       thereafter stacks of the corresponding type can be declared: 
  18191.  
  18192.         14.
  18193.  
  18194.                       declare
  18195.                         package Stack_Real is new On_Stacks(Real); use Stack_Real;
  18196.                         S : Stack(100);
  18197.                       begin
  18198.                         ┬╖┬╖┬╖
  18199.                         Push(S, 2.54);
  18200.                         ┬╖┬╖┬╖
  18201.                       end;
  18202.  
  18203.  
  18204. ΓòÉΓòÉΓòÉ 16. Representation Issues ΓòÉΓòÉΓòÉ
  18205.  
  18206.    1. This section describes features for querying and controlling aspects of 
  18207.       representation and for interfacing to hardware. 
  18208.  
  18209.  13.1                          Representation Items 
  18210.  13.2                          Pragma Pack 
  18211.  13.3                          Representation Attributes 
  18212.  13.4                          Enumeration Representation Clauses 
  18213.  13.5                          Record Layout 
  18214.  13.6                          Change of Representation 
  18215.  13.7                          The Package System 
  18216.  13.8                          Machine Code Insertions 
  18217.  13.9                          Unchecked Type Conversions 
  18218.  13.10                         Unchecked Access Value Creation 
  18219.  13.11                         Storage Management 
  18220.  13.12                         Pragma Restrictions 
  18221.  13.13                         Streams 
  18222.  13.14                         Freezing Rules --- The Detailed Node Listing --- 
  18223.  13.1                          Representation Items 
  18224.  13.2                          Pragma Pack 
  18225.  13.3                          Representation Attributes 
  18226.  13.4                          Enumeration Representation Clauses 
  18227.  13.5                          Record Layout 
  18228.  13.5.1                        Record Representation Clauses 
  18229.  13.5.2                        Storage Place Attributes 
  18230.  13.5.3                        Bit Ordering 
  18231.  13.6                          Change of Representation 
  18232.  13.7                          The Package System 
  18233.  13.7.1                        The Package System.Storage_Elements 
  18234.  13.7.2                        The Package System.Address_To_Access_Conversions 
  18235.  13.8                          Machine Code Insertions 
  18236.  13.9                          Unchecked Type Conversions 
  18237.  13.9.1                        Data Validity 
  18238.  13.9.2                        The Valid Attribute 
  18239.  13.10                         Unchecked Access Value Creation 
  18240.  13.11                         Storage Management 
  18241.  13.11.1                       The Max_Size_In_Storage_Elements Attribute 
  18242.  13.11.2                       Unchecked Storage Deallocation 
  18243.  13.11.3                       Pragma Controlled 
  18244.  13.12                         Pragma Restrictions 
  18245.  13.13                         Streams 
  18246.  13.13.1                       The Package Streams 
  18247.  13.13.2                       Stream-Oriented Attributes 
  18248.  13.14                         Freezing Rules 
  18249.  
  18250.  
  18251. ΓòÉΓòÉΓòÉ 16.1. Representation Items ΓòÉΓòÉΓòÉ
  18252.  
  18253.    1. There are three kinds of representation items: representation_clauses, 
  18254.       component_clauses, and representation pragmas. Representation items 
  18255.       specify how the types and other entities of the language are to be mapped 
  18256.       onto the underlying machine. They can be provided to give more efficient 
  18257.       representation or to interface with features that are outside the domain 
  18258.       of the language (for example, peripheral hardware). Representation items 
  18259.       also specify other specifiable properties of entities. A representation 
  18260.       item applies to an entity identified by a local_name, which denotes an 
  18261.       entity declared local to the current declarative region, or a library 
  18262.       unit declared immediately preceding a representation pragma in a 
  18263.       compilation. 
  18264.  
  18265.             Syntax
  18266.  
  18267.          2.
  18268.  
  18269.                       representation_clause ::=
  18270.                          attribute_definition_clause
  18271.                         | enumeration_representation_clause
  18272.                         | record_representation_clause
  18273.                         | at_clause
  18274.  
  18275.          3.
  18276.  
  18277.                       local_name ::=
  18278.                          direct_name
  18279.                         | direct_name'attribute_designator
  18280.                         | library_unit_name
  18281.  
  18282.         a. A representation pragma is allowed only at places where a 
  18283.            representation_clause or compilation_unit is allowed. 
  18284.  
  18285.   Name Resolution Rules
  18286.  
  18287.    1. In a representation item, if the local_name is a direct_name, then it 
  18288.       shall resolve to denote a declaration (or, in the case of a pragma, one 
  18289.       or more declarations) that occurs immediately within the same 
  18290.       declarative_region as the representation item. If the local_name has an 
  18291.       attribute_designator, then it shall resolve to denote an 
  18292.       implementation-defined component, see 13.5.1, or a class-wide type 
  18293.       implicitly declared immediately within the same declarative_region as the 
  18294.       representation item. A local_name that is a library_unit_name (only 
  18295.       permitted in a representation pragma) shall resolve to denote the 
  18296.       library_item that immediately precedes (except for other pragmas) the 
  18297.       representation pragma. 
  18298.  
  18299.             Legality Rules
  18300.  
  18301.    2. The local_name of a representation_clause or representation pragma shall 
  18302.       statically denote an entity (or, in the case of a pragma, one or more 
  18303.       entities) declared immediately preceding it in a compilation, or within 
  18304.       the same declarative_part, package_specification, task_definition, 
  18305.       protected_definition, or record_definition as the representation item. If 
  18306.       a local_name denotes a local callable entity, it may do so through a 
  18307.       local subprogram_renaming_declaration (as a way to resolve ambiguity in 
  18308.       the presence of overloading); otherwise, the local_name shall not denote 
  18309.       a renaming_declaration. 
  18310.  
  18311.    3. The representation of an object consists of a certain number of bits (the 
  18312.       size of the object). These are the bits that are normally read or updated 
  18313.       by the machine code when loading, storing, or operating-on the value of 
  18314.       the object. This includes some padding bits, when the size of the object 
  18315.       is greater than the size of its subtype. Such padding bits are considered 
  18316.       to be part of the representation of the object, rather than being gaps 
  18317.       between objects, if these bits are normally read and updated. 
  18318.  
  18319.    4. A representation item directly specifies an aspect of representation of 
  18320.       the entity denoted by the local_name, except in the case of a 
  18321.       type-related representation item, whose local_name shall denote a first 
  18322.       subtype, and which directly specifies an aspect of the subtype's type. A 
  18323.       representation item that names a subtype is either subtype-specific (Size 
  18324.       and Alignment clauses) or type-related (all others). Subtype-specific 
  18325.       aspects may differ for different subtypes of the same type. 
  18326.  
  18327.    5. A representation item that directly specifies an aspect of a subtype or 
  18328.       type shall appear after the type is completely defined, see 3.11.1, and 
  18329.       before the subtype or type is frozen, see 13.14. If a representation item 
  18330.       is given that directly specifies an aspect of an entity, then it is 
  18331.       illegal to give another representation item that directly specifies the 
  18332.       same aspect of the entity. 
  18333.  
  18334.    6. For an untagged derived type, no type-related representation items are 
  18335.       allowed if the parent type is a by-reference type, or has any 
  18336.       user-defined primitive subprograms. 
  18337.  
  18338.    7. Representation aspects of a generic formal parameter are the same as 
  18339.       those of the actual. A type-related representation item is not allowed 
  18340.       for a descendant of a generic formal untagged type. 
  18341.  
  18342.    8. A representation item that specifies the Size for a given subtype, or the 
  18343.       size or storage place for an object (including a component) of a given 
  18344.       subtype, shall allow for enough storage space to accommodate any value of 
  18345.       the subtype. 
  18346.  
  18347.    9. A representation item that is not supported by the implementation is 
  18348.       illegal, or raises an exception at run time. 
  18349.  
  18350.             Static Semantics
  18351.  
  18352.   10. If two subtypes statically match, then their subtype-specific aspects 
  18353.       (Size and Alignment) are the same. 
  18354.  
  18355.   11. A derived type inherits each type-related aspect of its parent type that 
  18356.       was directly specified before the declaration of the derived type, or (in 
  18357.       the case where the parent is derived) that was inherited by the parent 
  18358.       type from the grandparent type. A derived subtype inherits each 
  18359.       subtype-specific aspect of its parent subtype that was directly specified 
  18360.       before the declaration of the derived type, or (in the case where the 
  18361.       parent is derived) that was inherited by the parent subtype from the 
  18362.       grandparent subtype, but only if the parent subtype statically matches 
  18363.       the first subtype of the parent type. An inherited aspect of 
  18364.       representation is overridden by a subsequent representation item that 
  18365.       specifies the same aspect of the type or subtype. 
  18366.  
  18367.   12. Each aspect of representation of an entity is as follows: 
  18368.  
  18369.         a. If the aspect is specified for the entity, meaning that it is either 
  18370.            directly specified or inherited, then that aspect of the entity is 
  18371.            as specified, except in the case of Storage_Size, which specifies a 
  18372.            minimum. 
  18373.  
  18374.         b. If an aspect of representation of an entity is not specified, it is 
  18375.            chosen by default in an unspecified manner. 
  18376.  
  18377.   Dynamic Semantics
  18378.  
  18379.    1. For the elaboration of a representation_clause, any evaluable constructs 
  18380.       within it are evaluated. 
  18381.  
  18382.             Implementation Permissions
  18383.  
  18384.    2. An implementation may interpret aspects of representation in an 
  18385.       implementation-defined manner. An implementation may place 
  18386.       implementation-defined restrictions on representation items. A 
  18387.       recommended level of support is specified for representation items and 
  18388.       related features in each subclause. These recommendations are changed to 
  18389.       requirements for implementations that support the Systems Programming 
  18390.       Annex, see C.2: ``Required Representation Support''. 
  18391.  
  18392.             Implementation Advice
  18393.  
  18394.    3. The recommended level of support for all representation items is 
  18395.       qualified as follows: 
  18396.  
  18397.         a. An implementation need not support representation items containing 
  18398.            nonstatic expressions, except that an implementation should support 
  18399.            a representation item for a given entity if each nonstatic 
  18400.            expression in the representation item is a name that statically 
  18401.            denotes a constant declared before the entity. 
  18402.  
  18403.         b. An implementation need not support a specification for the Size for 
  18404.            a given composite subtype, nor the size or storage place for an 
  18405.            object (including a component) of a given composite subtype, unless 
  18406.            the constraints on the subtype and its composite subcomponents (if 
  18407.            any) are all static constraints. 
  18408.  
  18409.         c. An aliased component, or a component whose type is by-reference, 
  18410.            should always be allocated at an addressable location. 
  18411.  
  18412.  
  18413. ΓòÉΓòÉΓòÉ 16.2. Pragma Pack ΓòÉΓòÉΓòÉ
  18414.  
  18415.    1. A pragma Pack specifies that storage minimization should be the main 
  18416.       criterion when selecting the representation of a composite type. 
  18417.  
  18418.             Syntax
  18419.  
  18420.    2. The form of a pragma Pack is as follows: 
  18421.  
  18422.          3.
  18423.  
  18424.                       pragma Pack(first_subtype_local_name);
  18425.  
  18426.   Legality Rules
  18427.  
  18428.    4. The first_subtype_local_name of a pragma Pack shall denote a composite 
  18429.       subtype. 
  18430.  
  18431.             Static Semantics
  18432.  
  18433.    5. A pragma Pack specifies the packing aspect of representation; the type 
  18434.       (or the extension part) is said to be packed. For a type extension, the 
  18435.       parent part is packed as for the parent type, and a pragma Pack causes 
  18436.       packing only of the extension part. 
  18437.  
  18438.             Implementation Advice
  18439.  
  18440.    6. If a type is packed, then the implementation should try to minimize 
  18441.       storage allocated to objects of the type, possibly at the expense of 
  18442.       speed of accessing components, subject to reasonable complexity in 
  18443.       addressing calculations. 
  18444.  
  18445.    7. The recommended level of support for pragma Pack is: 
  18446.  
  18447.         a. For a packed record type, the components should be packed as tightly 
  18448.            as possible subject to the Sizes of the component subtypes, and 
  18449.            subject to any record_representation_clause that applies to the 
  18450.            type; the implementation may, but need not, reorder components or 
  18451.            cross aligned word boundaries to improve the packing. A component 
  18452.            whose Size is greater than the word size may be allocated an 
  18453.            integral number of words. 
  18454.  
  18455.         b. For a packed array type, if the component subtype's Size is less 
  18456.            than or equal to the word size, and Component_Size is not specified 
  18457.            for the type, Component_Size should be less than or equal to the 
  18458.            Size of the component subtype, rounded up to the nearest factor of 
  18459.            the word size. 
  18460.  
  18461.  
  18462. ΓòÉΓòÉΓòÉ 16.3. Representation Attributes ΓòÉΓòÉΓòÉ
  18463.  
  18464.    1. The values of certain implementation-dependent characteristics can be 
  18465.       obtained by interrogating appropriate representation attributes. Some of 
  18466.       these attributes are specifiable via an attribute_definition_clause. 
  18467.  
  18468.             Syntax
  18469.  
  18470.          2.
  18471.  
  18472.                       attribute_definition_clause ::=
  18473.                          for local_name'attribute_designator use expression;
  18474.                         | for local_name'attribute_designator use name;
  18475.  
  18476.   Name Resolution Rules
  18477.  
  18478.    3. For an attribute_definition_clause that specifies an attribute that 
  18479.       denotes a value, the form with an expression shall be used. Otherwise, 
  18480.       the form with a name shall be used. 
  18481.  
  18482.    4. For an attribute_definition_clause that specifies an attribute that 
  18483.       denotes a value or an object, the expected type for the expression or 
  18484.       name is that of the attribute. For an attribute_definition_clause that 
  18485.       specifies an attribute that denotes a subprogram, the expected profile 
  18486.       for the name is the profile required for the attribute. For an 
  18487.       attribute_definition_clause that specifies an attribute that denotes some 
  18488.       other kind of entity, the name shall resolve to denote an entity of the 
  18489.       appropriate kind. 
  18490.  
  18491.             Legality Rules
  18492.  
  18493.    5. An attribute_designator is allowed in an attribute_definition_clause only 
  18494.       if this International Standard explicitly allows it, or for an 
  18495.       implementation-defined attribute if the implementation allows it. Each 
  18496.       specifiable attribute constitutes an aspect of representation. 
  18497.  
  18498.    6. For an attribute_definition_clause that specifies an attribute that 
  18499.       denotes a subprogram, the profile shall be mode conformant with the one 
  18500.       required for the attribute, and the convention shall be Ada. Additional 
  18501.       requirements are defined for particular attributes. 
  18502.  
  18503.             Static Semantics
  18504.  
  18505.    7. A Size clause is an attribute_definition_clause whose 
  18506.       attribute_designator is Size. Similar definitions apply to the other 
  18507.       specifiable attributes. 
  18508.  
  18509.    8. A storage element is an addressable element of storage in the machine. A 
  18510.       word is the largest amount of storage that can be conveniently and 
  18511.       efficiently manipulated by the hardware, given the implementation's 
  18512.       run-time model. A word consists of an integral number of storage 
  18513.       elements. 
  18514.  
  18515.    9. The following attributes are defined: 
  18516.  
  18517.   10. For a prefix X that denotes an object, program unit, or label: 
  18518.  
  18519.   11. X'Address 
  18520.  
  18521.                       Denotes the address of the first of the storage elements
  18522.                       allocated to X. For a program unit or label, this value
  18523.                       refers to the machine code associated with the corresponding
  18524.                       body or statement. The value of this attribute is of type
  18525.                       System.Address.
  18526.  
  18527.         12.
  18528.  
  18529.                       Address may be specified for stand-alone objects and for
  18530.                       program units via an attribute_definition_clause.
  18531.  
  18532.   Erroneous Execution
  18533.  
  18534.   13. If an Address is specified, it is the programmer's responsibility to 
  18535.       ensure that the address is valid; otherwise, program execution is 
  18536.       erroneous. 
  18537.  
  18538.             Implementation Advice
  18539.  
  18540.   14. For an array X, X'Address should point at the first component of the 
  18541.       array, and not at the array bounds. 
  18542.  
  18543.   15. The recommended level of support for the Address attribute is: 
  18544.  
  18545.         a. X'Address should produce a useful result if X is an object that is 
  18546.            aliased or of a by-reference type, or is an entity whose Address has 
  18547.            been specified. 
  18548.  
  18549.         b. An implementation should support Address clauses for imported 
  18550.            subprograms. 
  18551.  
  18552.         c. Objects (including subcomponents) that are aliased or of a 
  18553.            by-reference type should be allocated on storage element boundaries. 
  18554.  
  18555.         d. If the Address of an object is specified, or it is imported or 
  18556.            exported, then the implementation should not perform optimizations 
  18557.            based on assumptions of no aliases. 
  18558.   NOTES 
  18559.  
  18560.    1. (1) The specification of a link name in a pragma Export, see B.1 for a 
  18561.       subprogram or object is an alternative to explicit specification of its 
  18562.       link-time address, allowing a link-time directive to place the subprogram 
  18563.       or object within memory. 
  18564.  
  18565.    2. (2) The rules for the Size attribute imply, for an aliased object X, that 
  18566.       if X'Size = Storage_Unit, then X'Address points at a storage element 
  18567.       containing all of the bits of X, and only the bits of X. 
  18568.  
  18569.             Static Semantics
  18570.  
  18571.    3. For a prefix X that denotes a subtype or object: 
  18572.  
  18573.    4. X'Alignment 
  18574.  
  18575.                       The Address of an object that is allocated under control of
  18576.                       the implementation is an integral multiple of the Alignment
  18577.                       of the object (that is, the Address modulo the Alignment is
  18578.                       zero). The offset of a record component is a multiple of the
  18579.                       Alignment of the component. For an object that is not
  18580.                       allocated under control of the implementation (that is, one
  18581.                       that is imported, that is allocated by a user-defined
  18582.                       allocator, whose Address has been specified, or is designated
  18583.                       by an access value returned by an instance of
  18584.                       Unchecked_Conversion), the implementation may assume that the
  18585.                       Address is an integral multiple of its Alignment. The
  18586.                       implementation shall not assume a stricter alignment.
  18587.  
  18588.          5.
  18589.  
  18590.                       The value of this attribute is of type
  18591.                       universal_integer, and nonnegative; zero means that the
  18592.                       object is not necessarily aligned on a storage element
  18593.                       boundary.
  18594.  
  18595.          6.
  18596.  
  18597.                       Alignment may be specified for first subtypes and
  18598.                       stand-alone objects via an attribute_definition_clause; the
  18599.                       expression of such a clause shall be static, and its value
  18600.                       nonnegative. If the Alignment of a subtype is specified,
  18601.                       then the Alignment of an object of the subtype is at least as
  18602.                       strict, unless the object's Alignment is also specified. The
  18603.                       Alignment of an object created by an allocator is that of the
  18604.                       designated subtype.
  18605.  
  18606.          7.
  18607.  
  18608.                       If an Alignment is specified for a composite subtype or
  18609.                       object, this Alignment shall be equal to the least common
  18610.                       multiple of any specified Alignments of the subcomponent
  18611.                       subtypes, or an integer multiple thereof.
  18612.  
  18613.   Erroneous Execution
  18614.  
  18615.    8. Program execution is erroneous if an Address clause is given that 
  18616.       conflicts with the Alignment. 
  18617.  
  18618.    9. If the Alignment is specified for an object that is not allocated under 
  18619.       control of the implementation, execution is erroneous if the object is 
  18620.       not aligned according to the Alignment. 
  18621.  
  18622.             Implementation Advice
  18623.  
  18624.   10. The recommended level of support for the Alignment attribute for subtypes 
  18625.       is: 
  18626.  
  18627.         a. An implementation should support specified Alignments that are 
  18628.            factors and multiples of the number of storage elements per word, 
  18629.            subject to the following: 
  18630.  
  18631.         b. An implementation need not support specified Alignments for 
  18632.            combinations of Sizes and Alignments that cannot be easily loaded 
  18633.            and stored by available machine instructions. 
  18634.  
  18635.         c. An implementation need not support specified Alignments that are 
  18636.            greater than the maximum Alignment the implementation ever returns 
  18637.            by default. 
  18638.  
  18639.    1. The recommended level of support for the Alignment attribute for objects 
  18640.       is: 
  18641.  
  18642.         a. Same as above, for subtypes, but in addition: 
  18643.  
  18644.         b. For stand-alone library-level objects of statically constrained 
  18645.            subtypes, the implementation should support all Alignments supported 
  18646.            by the target linker. For example, page alignment is likely to be 
  18647.            supported for such objects, but not for subtypes. 
  18648.   NOTES 
  18649.  
  18650.    1. (3) Alignment is a subtype-specific attribute. 
  18651.  
  18652.    2. (4) The Alignment of a composite object is always equal to the least 
  18653.       common multiple of the Alignments of its components, or a multiple 
  18654.       thereof. 
  18655.  
  18656.    3. (5) A component_clause, Component_Size clause, or a pragma Pack can 
  18657.       override a specified Alignment. 
  18658.  
  18659.             Static Semantics
  18660.  
  18661.    4. For a prefix X that denotes an object: 
  18662.  
  18663.    5. X'Size 
  18664.  
  18665.                       Denotes the size in bits of the representation of the object.
  18666.                       The value of this attribute is of the type universal_integer.
  18667.  
  18668.         a. Size may be specified for stand-alone objects via an 
  18669.            attribute_definition_clause; the expression of such a clause shall 
  18670.            be static and its value nonnegative. 
  18671.  
  18672.   Implementation Advice
  18673.  
  18674.    1. The recommended level of support for the Size attribute of objects is: 
  18675.  
  18676.         a. A Size clause should be supported for an object if the specified 
  18677.            Size is at least as large as its subtype's Size, and corresponds to 
  18678.            a size in storage elements that is a multiple of the object's 
  18679.            Alignment (if the Alignment is nonzero). 
  18680.  
  18681.   Static Semantics
  18682.  
  18683.    1. For every subtype S: 
  18684.  
  18685.    2. S'Size 
  18686.  
  18687.                       If S is definite, denotes the size (in bits) that the
  18688.                       implementation would choose for the following objects of
  18689.                       subtype S:
  18690.  
  18691.         a. A record component of subtype S when the record type is packed. 
  18692.  
  18693.         b. The formal parameter of an instance of Unchecked_Conversion that 
  18694.            converts from subtype S to some other subtype. 
  18695.  
  18696.         c. If S is indefinite, the meaning is implementation defined. The value 
  18697.            of this attribute is of the type universal_integer. The Size of an 
  18698.            object is at least as large as that of its subtype, unless the 
  18699.            object's Size is determined by a Size clause, a component_clause, or 
  18700.            a Component_Size clause. Size may be specified for first subtypes 
  18701.            via an attribute_definition_clause; the expression of such a clause 
  18702.            shall be static and its value nonnegative. 
  18703.  
  18704.   Implementation Requirements
  18705.  
  18706.    1. In an implementation, Boolean'Size shall be 1. 
  18707.  
  18708.             Implementation Advice
  18709.  
  18710.    2. If the Size of a subtype is specified, and allows for efficient 
  18711.       independent addressability, see 9.10, on the target architecture, then 
  18712.       the Size of the following objects of the subtype should equal the Size of 
  18713.       the subtype: 
  18714.  
  18715.         a. Aliased objects (including components). 
  18716.  
  18717.         b. Unaliased components, unless the Size of the component is determined 
  18718.            by a component_clause or Component_Size clause. 
  18719.  
  18720.    1. A Size clause on a composite subtype should not affect the internal 
  18721.       layout of components. 
  18722.  
  18723.    2. The recommended level of support for the Size attribute of subtypes is: 
  18724.  
  18725.         a. The Size (if not specified) of a static discrete or fixed point 
  18726.            subtype should be the number of bits needed to represent each value 
  18727.            belonging to the subtype using an unbiased representation, leaving 
  18728.            space for a sign bit only if the subtype contains negative values. 
  18729.            If such a subtype is a first subtype, then an implementation should 
  18730.            support a specified Size for it that reflects this representation. 
  18731.  
  18732.         b. For a subtype implemented with levels of indirection, the Size 
  18733.            should include the size of the pointers, but not the size of what 
  18734.            they point at. 
  18735.   NOTES 
  18736.  
  18737.    1. (6) Size is a subtype-specific attribute. 
  18738.  
  18739.    2. (7) A component_clause or Component_Size clause can override a specified 
  18740.       Size. A pragma Pack cannot. 
  18741.  
  18742.             Static Semantics
  18743.  
  18744.    3. For a prefix T that denotes a task object (after any implicit 
  18745.       dereference): 
  18746.  
  18747.    4. T'Storage_Size 
  18748.  
  18749.                       Denotes the number of storage elements reserved for the task.
  18750.                       The value of this attribute is of the type universal_integer.
  18751.                       The Storage_Size includes the size of the task's stack, if
  18752.                       any. The language does not specify whether or not it
  18753.                       includes other storage associated with the task (such as the
  18754.                       ``task control block'' used by some implementations.)  If a
  18755.                       pragma Storage_Size is given, the value of the Storage_Size
  18756.                       attribute is at least the value specified in the pragma.
  18757.  
  18758.    5. A pragma Storage_Size specifies the amount of storage to be reserved for 
  18759.       the execution of a task. 
  18760.  
  18761.             Syntax
  18762.  
  18763.    6. The form of a pragma Storage_Size is as follows: 
  18764.  
  18765.          7.
  18766.  
  18767.                       pragma Storage_Size(expression);
  18768.  
  18769.         a. A pragma Storage_Size is allowed only immediately within a 
  18770.            task_definition. 
  18771.  
  18772.   Name Resolution Rules
  18773.  
  18774.    1. The expression of a pragma Storage_Size is expected to be of any integer 
  18775.       type. 
  18776.  
  18777.             Dynamic Semantics
  18778.  
  18779.    2. A pragma Storage_Size is elaborated when an object of the type defined by 
  18780.       the immediately enclosing task_definition is created. For the elaboration 
  18781.       of a pragma Storage_Size, the expression is evaluated; the Storage_Size 
  18782.       attribute of the newly created task object is at least the value of the 
  18783.       expression. 
  18784.  
  18785.    3. At the point of task object creation, or upon task activation, 
  18786.       Storage_Error is raised if there is insufficient free storage to 
  18787.       accommodate the requested Storage_Size. Static Semantics 
  18788.  
  18789.    4. For a prefix X that denotes an array subtype or array object (after any 
  18790.       implicit dereference): 
  18791.  
  18792.    5. X'Component_Size 
  18793.  
  18794.                       Denotes the size in bits of components of the type of X. The
  18795.                       value of this attribute is of type universal_integer.
  18796.  
  18797.         a. Component_Size may be specified for array types via an 
  18798.            attribute_definition_clause; the expression of such a clause shall 
  18799.            be static, and its value nonnegative. 
  18800.  
  18801.   Implementation Advice
  18802.  
  18803.    1. The recommended level of support for the Component_Size attribute is: 
  18804.  
  18805.         a. An implementation need not support specified Component_Sizes that 
  18806.            are less than the Size of the component subtype. 
  18807.  
  18808.         b. An implementation should support specified Component_Sizes that are 
  18809.            factors and multiples of the word size. For such Component_Sizes, 
  18810.            the array should contain no gaps between components. For other 
  18811.            Component_Sizes (if supported), the array should contain no gaps 
  18812.            between components when packing is also specified; the 
  18813.            implementation should forbid this combination in cases where it 
  18814.            cannot support a no-gaps representation. 
  18815.  
  18816.   Static Semantics
  18817.  
  18818.    1. For every subtype S of a tagged type T (specific or class-wide), the 
  18819.       following attribute is defined: 
  18820.  
  18821.    2. S'External_Tag 
  18822.  
  18823.                       S'External_Tag denotes an external string representation for
  18824.                       S'Tag; it is of the predefined type String. External_Tag may
  18825.                       be specified for a specific tagged type via an
  18826.                       attribute_definition_clause; the expression of such a
  18827.                       clause shall be static. The default external tag
  18828.                       representation is implementation defined. See 3.9.2, and
  18829.                       13.13.2.
  18830.  
  18831.   Implementation Requirements
  18832.  
  18833.    3. In an implementation, the default external tag for each specific tagged 
  18834.       type declared in a partition shall be distinct, so long as the type is 
  18835.       declared outside an instance of a generic body. If the compilation unit 
  18836.       in which a given tagged type is declared, and all compilation units on 
  18837.       which it semantically depends, are the same in two different partitions, 
  18838.       then the external tag for the type shall be the same in the two 
  18839.       partitions. What it means for a compilation unit to be the same in two 
  18840.       different partitions is implementation defined. At a minimum, if the 
  18841.       compilation unit is not recompiled between building the two different 
  18842.       partitions that include it, the compilation unit is considered the same 
  18843.       in the two partitions. 
  18844.  
  18845.          NOTES 
  18846.  
  18847.    4. (8) The following language-defined attributes are specifiable, at least 
  18848.       for some of the kinds of entities to which they apply: Address, Size, 
  18849.       Component_Size, Alignment, External_Tag, Small, Bit_Order, Storage_Pool, 
  18850.       Storage_Size, Write, Output, Read, Input, and Machine_Radix. 
  18851.  
  18852.    5. (9) It follows from the general rules in 13.1, that if one writes ``for 
  18853.       X'Size use Y;'' then the X'Size attribute_reference will return Y 
  18854.       (assuming the implementation allows the Size clause). The same is true 
  18855.       for all of the specifiable attributes except Storage_Size. 
  18856.  
  18857.             Examples
  18858.  
  18859.    6. Examples of attribute definition clauses: 
  18860.  
  18861.          7.
  18862.  
  18863.                       Byte : constant := 8;
  18864.                       Page : constant := 2**12;
  18865.  
  18866.          8.
  18867.  
  18868.                       type Medium is range 0 ┬╖┬╖ 65_000;
  18869.                       for Medium'Size use 2*Byte;
  18870.                       for Medium'Alignment use 2;
  18871.                       Device_Register : Medium;
  18872.                       for Device_Register'Size use Medium'Size;
  18873.                       for Device_Register'Address use
  18874.                        System.Storage_Elements.To_Address(16#FFFF_0020#);
  18875.  
  18876.          9.
  18877.  
  18878.                       type Short is delta 0.01 range -100.0 ┬╖┬╖ 100.0;
  18879.                       for Short'Size use 15;
  18880.  
  18881.         10.
  18882.  
  18883.                       for Car_Name'Storage_Size use
  18884.                       -- specify access type's storage pool size
  18885.                        2000*((Car'Size/System.Storage_Unit) +1);
  18886.                        -- approximately 2000 cars
  18887.  
  18888.         11.
  18889.  
  18890.                       function My_Read(Stream : access Ada.Streams.Root_Stream_Type'Class)
  18891.                        return T;
  18892.                       for T'Read use My_Read;  --  see 13.13.2
  18893.  
  18894.     NOTES 
  18895.  
  18896.   12. (10) Notes on the examples: In the Size clause for Short, fifteen bits is 
  18897.       the minimum necessary, since the type definition requires Short'Small <= 
  18898.       2**(-7). 
  18899.  
  18900.  
  18901. ΓòÉΓòÉΓòÉ 16.4. Enumeration Representation Clauses ΓòÉΓòÉΓòÉ
  18902.  
  18903.    1. An enumeration_representation_clause specifies the internal codes for 
  18904.       enumeration literals. 
  18905.  
  18906.             Syntax
  18907.  
  18908.          2.
  18909.  
  18910.                       enumeration_representation_clause ::=
  18911.                         for first_subtype_local_name use enumeration_aggregate;
  18912.  
  18913.          3.
  18914.  
  18915.                       enumeration_aggregate ::= array_aggregate
  18916.  
  18917.   Name Resolution Rules
  18918.  
  18919.    4. The enumeration_aggregate shall be written as a one-dimensional 
  18920.       array_aggregate, for which the index subtype is the unconstrained subtype 
  18921.       of the enumeration type, and each component expression is expected to be 
  18922.       of any integer type. 
  18923.  
  18924.             Legality Rules
  18925.  
  18926.    5. The first_subtype_local_name of an enumeration_representation_clause 
  18927.       shall denote an enumeration subtype. 
  18928.  
  18929.    6. The expressions given in the array_aggregate shall be static, and shall 
  18930.       specify distinct integer codes for each value of the enumeration type; 
  18931.       the associated integer codes shall satisfy the predefined ordering 
  18932.       relation of the type. 
  18933.  
  18934.             Static Semantics
  18935.  
  18936.    7. An enumeration_representation_clause specifies the coding aspect of 
  18937.       representation. The coding consists of the internal code for each 
  18938.       enumeration literal, that is, the integral value used internally to 
  18939.       represent each literal. 
  18940.  
  18941.             Implementation Requirements
  18942.  
  18943.    8. For nonboolean enumeration types, if the coding is not specified for the 
  18944.       type, then for each value of the type, the internal code shall be equal 
  18945.       to its position number. 
  18946.  
  18947.             Implementation Advice
  18948.  
  18949.    9. The recommended level of support for enumeration_representation_clauses 
  18950.       is: 
  18951.  
  18952.         a. An implementation should support at least the internal codes in the 
  18953.            range System.Min_Int┬╖┬╖System.Max_Int. An implementation need not 
  18954.            support enumeration_representation_clauses for boolean types. 
  18955.   NOTES 
  18956.  
  18957.    1. (11) Unchecked_Conversion may be used to query the internal codes used 
  18958.       for an enumeration type. The attributes of the type, such as Succ, Pred, 
  18959.       and Pos, are unaffected by the representation_clause. For example, Pos 
  18960.       always returns the position number, not the internal integer code that 
  18961.       might have been specified in a representation_clause. 
  18962.  
  18963.             Examples
  18964.  
  18965.    2. Example of an enumeration representation clause: 
  18966.  
  18967.          3.
  18968.  
  18969.                       type Mix_Code is (ADD, SUB, MUL, LDA, STA, STZ);
  18970.  
  18971.          4.
  18972.  
  18973.                       for Mix_Code use
  18974.                         (ADD => 1, SUB => 2, MUL => 3, LDA => 8, STA => 24, STZ =>33);
  18975.  
  18976.  
  18977. ΓòÉΓòÉΓòÉ 16.5. Record Layout ΓòÉΓòÉΓòÉ
  18978.  
  18979.    1. The (record) layout aspect of representation consists of the storage 
  18980.       places for some or all components, that is, storage place attributes of 
  18981.       the components. The layout can be specified with a 
  18982.       record_representation_clause. 
  18983.  
  18984.  13.5.1                        Record Representation Clauses 
  18985.  13.5.2                        Storage Place Attributes 
  18986.  13.5.3                        Bit Ordering 
  18987.  
  18988.  
  18989. ΓòÉΓòÉΓòÉ 16.5.1. Record Representation Clauses ΓòÉΓòÉΓòÉ
  18990.  
  18991.    1. A record_representation_clause specifies the storage representation of 
  18992.       records and record extensions, that is, the order, position, and size of 
  18993.       components (including discriminants, if any). 
  18994.  
  18995.             Syntax
  18996.  
  18997.          2.
  18998.  
  18999.                       record_representation_clause ::=
  19000.                         for first_subtype_local_name use
  19001.                          record [mod_clause]
  19002.                            {component_clause}
  19003.                          end record;
  19004.  
  19005.          3.
  19006.  
  19007.                       component_clause ::=
  19008.                         component_local_name at position range first_bit ┬╖┬╖ last_bit;
  19009.  
  19010.          4.
  19011.  
  19012.                       position ::= static_expression
  19013.  
  19014.          5.
  19015.  
  19016.                       first_bit ::= static_simple_expression
  19017.  
  19018.          6.
  19019.  
  19020.                       last_bit ::= static_simple_expression
  19021.  
  19022.   Name Resolution Rules
  19023.  
  19024.    7. Each position, first_bit, and last_bit is expected to be of any integer 
  19025.       type. 
  19026.  
  19027.             Legality Rules
  19028.  
  19029.    8. The first_subtype_local_name of a record_representation_clause shall 
  19030.       denote a specific nonlimited record or record extension subtype. 
  19031.  
  19032.    9. If the component_local_name is a direct_name, the local_name shall denote 
  19033.       a component of the type. For a record extension, the component shall not 
  19034.       be inherited, and shall not be a discriminant that corresponds to a 
  19035.       discriminant of the parent type. If the component_local_name has an 
  19036.       attribute_designator, the direct_name of the local_name shall denote 
  19037.       either the declaration of the type or a component of the type, and the 
  19038.       attribute_designator shall denote an implementation-defined implicit 
  19039.       component of the type. 
  19040.  
  19041.   10. The position, first_bit, and last_bit shall be static expressions. The 
  19042.       value of position and first_bit shall be nonnegative. The value of 
  19043.       last_bit shall be no less than first_bit - 1. 
  19044.  
  19045.   11. At most one component_clause is allowed for each component of the type, 
  19046.       including for each discriminant (component_clauses may be given for some, 
  19047.       all, or none of the components). Storage places within a component_list 
  19048.       shall not overlap, unless they are for components in distinct variants of 
  19049.       the same variant_part. 
  19050.  
  19051.   12. A name that denotes a component of a type is not allowed within a 
  19052.       record_representation_clause for the type, except as the 
  19053.       component_local_name of a component_clause. 
  19054.  
  19055.             Static Semantics
  19056.  
  19057.   13. A record_representation_clause (without the mod_clause) specifies the 
  19058.       layout. The storage place attributes, see 13.5.2, are taken from the 
  19059.       values of the position, first_bit, and last_bit expressions after 
  19060.       normalizing those values so that first_bit is less than Storage_Unit. 
  19061.  
  19062.   14. A record_representation_clause for a record extension does not override 
  19063.       the layout of the parent part; if the layout was specified for the parent 
  19064.       type, it is inherited by the record extension. 
  19065.  
  19066.             Implementation Permissions
  19067.  
  19068.   15. An implementation may generate implementation-defined components (for 
  19069.       example, one containing the offset of another component). An 
  19070.       implementation may generate names that denote such implementation-defined 
  19071.       components; such names shall be implementation-defined 
  19072.       attribute_references. An implementation may allow such 
  19073.       implementation-defined names to be used in record_ 
  19074.       representation_clauses. An implementation can restrict such 
  19075.       component_clauses in any manner it sees fit. 
  19076.  
  19077.   16. If a record_representation_clause is given for an untagged derived type, 
  19078.       the storage place attributes for all of the components of the derived 
  19079.       type may differ from those of the corresponding components of the parent 
  19080.       type, even for components whose storage place is not specified explicitly 
  19081.       in the record_representation_clause. 
  19082.  
  19083.             Implementation Advice
  19084.  
  19085.   17. The recommended level of support for record_representation_clauses is: 
  19086.  
  19087.         a. An implementation should support storage places that can be 
  19088.            extracted with a load, mask, shift sequence of machine code, and set 
  19089.            with a load, shift, mask, store sequence, given the available 
  19090.            machine instructions and run-time model. 
  19091.  
  19092.         b. A storage place should be supported if its size is equal to the Size 
  19093.            of the component subtype, and it starts and ends on a boundary that 
  19094.            obeys the Alignment of the component subtype. 
  19095.  
  19096.         c. If the default bit ordering applies to the declaration of a given 
  19097.            type, then for a component whose subtype's Size is less than the 
  19098.            word size, any storage place that does not cross an aligned word 
  19099.            boundary should be supported. 
  19100.  
  19101.         d. An implementation may reserve a storage place for the tag field of a 
  19102.            tagged type, and disallow other components from overlapping that 
  19103.            place. 
  19104.  
  19105.         e. An implementation need not support a component_clause for a 
  19106.            component of an extension part if the storage place is not after the 
  19107.            storage places of all components of the parent type, whether or not 
  19108.            those storage places had been specified. 
  19109.   NOTES 
  19110.  
  19111.    1. (12) If no component_clause is given for a component, then the choice of 
  19112.       the storage place for the component is left to the implementation. If 
  19113.       component_clauses are given for all components, the 
  19114.       record_representation_clause completely specifies the representation of 
  19115.       the type and will be obeyed exactly by the implementation. 
  19116.  
  19117.             Examples
  19118.  
  19119.    2. Example of specifying the layout of a record type: 
  19120.  
  19121.          3.
  19122.  
  19123.                       Word : constant := 4;  --  storage element is byte, 4 bytes per word
  19124.  
  19125.          4.
  19126.  
  19127.                       type State    is (A,M,W,P);
  19128.                       type Mode    is (Fix, Dec, Exp, Signif);
  19129.  
  19130.          5.
  19131.  
  19132.                       type Byte_Mask  is array (0┬╖┬╖7)  of Boolean;
  19133.                       type State_Mask is array (State) of Boolean;
  19134.                       type Mode_Mask  is array (Mode)  of Boolean;
  19135.  
  19136.          6.
  19137.  
  19138.                       type Program_Status_Word is
  19139.                        record
  19140.                          System_Mask   : Byte_Mask;
  19141.                          Protection_Key  : Integer range 0 ┬╖┬╖ 3;
  19142.                          Machine_State  : State_Mask;
  19143.                          Interrupt_Cause : Interruption_Code;
  19144.                          Ilc       : Integer range 0 ┬╖┬╖ 3;
  19145.                          Cc        : Integer range 0 ┬╖┬╖ 3;
  19146.                          Program_Mask   : Mode_Mask;
  19147.                          Inst_Address   : Address;
  19148.                       end record;
  19149.  
  19150.          7.
  19151.  
  19152.                       for Program_Status_Word use
  19153.                        record
  19154.                          System_Mask   at 0*Word range 0  ┬╖┬╖ 7;
  19155.                          Protection_Key  at 0*Word range 10 ┬╖┬╖ 11; -- bits 8,9 unused
  19156.                          Machine_State  at 0*Word range 12 ┬╖┬╖ 15;
  19157.                          Interrupt_Cause at 0*Word range 16 ┬╖┬╖ 31;
  19158.                          Ilc       at 1*Word range 0  ┬╖┬╖ 1;  -- second word
  19159.                          Cc        at 1*Word range 2  ┬╖┬╖ 3;
  19160.                          Program_Mask   at 1*Word range 4  ┬╖┬╖ 7;
  19161.                          Inst_Address   at 1*Word range 8  ┬╖┬╖ 31;
  19162.                        end record;
  19163.  
  19164.          8.
  19165.  
  19166.                       for Program_Status_Word'Size use 8*System.Storage_Unit;
  19167.                       for Program_Status_Word'Alignment use 8;
  19168.  
  19169.  NOTES 
  19170.  
  19171.    9. (13) Note on the example: The record_representation_clause defines the 
  19172.       record layout. The Size clause guarantees that (at least) eight storage 
  19173.       elements are used for objects of the type. The Alignment clause 
  19174.       guarantees that aliased, imported, or exported objects of the type will 
  19175.       have addresses divisible by eight. 
  19176.  
  19177.  
  19178. ΓòÉΓòÉΓòÉ 16.5.2. Storage Place Attributes ΓòÉΓòÉΓòÉ
  19179.  
  19180.  
  19181.   Static Semantics
  19182.  
  19183.    1. For a component C of a composite, non-array object R, the storage place 
  19184.       attributes are defined: 
  19185.  
  19186.    2. R.C'Position 
  19187.  
  19188.                       Denotes the same value as R.C'Address - R'Address. The value
  19189.                       of this attribute is of the type universal_integer.
  19190.  
  19191.    3. R.C'First_Bit 
  19192.  
  19193.                       Denotes the offset, from the start of the first of the
  19194.                       storage elements occupied by C, of the first bit occupied by
  19195.                       C. This offset is measured in bits. The first bit of a
  19196.                       storage element is numbered zero. The value of this
  19197.                       attribute is of the type universal_integer.
  19198.  
  19199.    4. R.C'Last_Bit 
  19200.  
  19201.                       Denotes the offset, from the start of the first of the
  19202.                       storage elements occupied by C, of the last bit occupied by
  19203.                       C. This offset is measured in bits. The value of this
  19204.                       attribute is of the type universal_integer.
  19205.  
  19206.   Implementation Advice
  19207.  
  19208.    5. If a component is represented using some form of pointer (such as an 
  19209.       offset) to the actual data of the component, and this data is contiguous 
  19210.       with the rest of the object, then the storage place attributes should 
  19211.       reflect the place of the actual data, not the pointer. If a component is 
  19212.       allocated discontiguously from the rest of the object, then a warning 
  19213.       should be generated upon reference to one of its storage place 
  19214.       attributes. 
  19215.  
  19216.  
  19217. ΓòÉΓòÉΓòÉ 16.5.3. Bit Ordering ΓòÉΓòÉΓòÉ
  19218.  
  19219.    1. The Bit_Order attribute specifies the interpretation of the storage place 
  19220.       attributes. 
  19221.  
  19222.             Static Semantics
  19223.  
  19224.    2. A bit ordering is a method of interpreting the meaning of the storage 
  19225.       place attributes. High_Order_First (known in the vernacular as ``big 
  19226.       endian'') means that the first bit of a storage element (bit 0) is the 
  19227.       most significant bit (interpreting the sequence of bits that represent a 
  19228.       component as an unsigned integer value). Low_Order_First (known in the 
  19229.       vernacular as ``little endian'') means the opposite: the first bit is the 
  19230.       least significant. 
  19231.  
  19232.    3. For every specific record subtype S, the following attribute is defined: 
  19233.  
  19234.    4. S'Bit_Order 
  19235.  
  19236.                       Denotes the bit ordering for the type of S. The value of this
  19237.                       attribute is of type System.Bit_Order. Bit_Order may be
  19238.                       specified for specific record types via an
  19239.                       attribute_definition_clause; the expression of such a
  19240.                       clause shall be static.
  19241.  
  19242.    5. If Word_Size = Storage_Unit, the default bit ordering is implementation 
  19243.       defined. If Word_Size > Storage_Unit, the default bit ordering is the 
  19244.       same as the ordering of storage elements in a word, when interpreted as 
  19245.       an integer. 
  19246.  
  19247.    6. The storage place attributes of a component of a type are interpreted 
  19248.       according to the bit ordering of the type. 
  19249.  
  19250.             Implementation Advice
  19251.  
  19252.    7. The recommended level of support for the nondefault bit ordering is: 
  19253.  
  19254.         a. If Word_Size = Storage_Unit, then the implementation should support 
  19255.            the nondefault bit ordering in addition to the default bit ordering. 
  19256.  
  19257.  
  19258. ΓòÉΓòÉΓòÉ 16.6. Change of Representation ΓòÉΓòÉΓòÉ
  19259.  
  19260.    1. A type_conversion, see 4.6 can be used to convert between two different 
  19261.       representations of the same array or record. To convert an array from one 
  19262.       representation to another, two array types need to be declared with 
  19263.       matching component subtypes, and convertible index types. If one type has 
  19264.       packing specified and the other does not, then explicit conversion can be 
  19265.       used to pack or unpack an array. 
  19266.  
  19267.    2. To convert a record from one representation to another, two record types 
  19268.       with a common ancestor type need to be declared, with no inherited 
  19269.       subprograms. Distinct representations can then be specified for the 
  19270.       record types, and explicit conversion between the types can be used to 
  19271.       effect a change in representation. 
  19272.  
  19273.             Examples
  19274.  
  19275.    3. Example of change of representation: 
  19276.  
  19277.          4.
  19278.  
  19279.                       -- Packed_Descriptor and Descriptor are two different types
  19280.                       -- with identical characteristics, apart from their
  19281.                       -- representation
  19282.  
  19283.          5.
  19284.  
  19285.                       type Descriptor is
  19286.                         record
  19287.                          -- components of a descriptor
  19288.                         end record;
  19289.  
  19290.          6.
  19291.  
  19292.                       type Packed_Descriptor is new Descriptor;
  19293.  
  19294.          7.
  19295.  
  19296.                       for Packed_Descriptor use
  19297.                         record
  19298.                          -- component clauses for some or for all components
  19299.                         end record;
  19300.  
  19301.          8.
  19302.  
  19303.                       --  Change of representation can now be accomplished
  19304.                       --  by explicit type conversions:
  19305.  
  19306.          9.
  19307.  
  19308.                       D : Descriptor;
  19309.                       P : Packed_Descriptor;
  19310.  
  19311.         10.
  19312.  
  19313.                       P := Packed_Descriptor(D);  -- pack D
  19314.                       D := Descriptor(P);     -- unpack P
  19315.  
  19316.  
  19317. ΓòÉΓòÉΓòÉ 16.7. The Package System ΓòÉΓòÉΓòÉ
  19318.  
  19319.    1. For each implementation there is a library package called System which 
  19320.       includes the definitions of certain configuration-dependent 
  19321.       characteristics. 
  19322.  
  19323.             Static Semantics
  19324.  
  19325.    2. The following language-defined library package exists: 
  19326.  
  19327.          3.
  19328.  
  19329.                       package System is
  19330.                         pragma Preelaborate(System);
  19331.  
  19332.          4.
  19333.  
  19334.                         type Name is implementation-defined-enumeration-type;
  19335.                         System_Name : constant Name := implementation-defined;
  19336.  
  19337.          5.
  19338.  
  19339.                         -- System-Dependent Named Numbers:
  19340.  
  19341.          6.
  19342.  
  19343.                         Min_Int        : constant := root_integer'First;
  19344.                         Max_Int        : constant := root_integer'Last;
  19345.  
  19346.          7.
  19347.  
  19348.                         Max_Binary_Modulus   : constant := implementation-defined;
  19349.                         Max_Nonbinary_Modulus : constant := implementation-defined;
  19350.  
  19351.          8.
  19352.  
  19353.                         Max_Base_Digits    : constant := root_real'Digits;
  19354.                         Max_Digits       : constant := implementation-defined;
  19355.  
  19356.          9.
  19357.  
  19358.                         Max_Mantissa      : constant := implementation-defined;
  19359.                         Fine_Delta       : constant := implementation-defined;
  19360.  
  19361.         10.
  19362.  
  19363.                         Tick          : constant := implementation-defined;
  19364.  
  19365.         11.
  19366.  
  19367.                         -- Storage-related Declarations:
  19368.  
  19369.         12.
  19370.  
  19371.                         type Address is implementation-defined;
  19372.                         Null_Address : constant Address;
  19373.  
  19374.         13.
  19375.  
  19376.                         Storage_Unit : constant := implementation-defined;
  19377.                         Word_Size   : constant := implementation-defined * Storage_Unit;
  19378.                         Memory_Size  : constant := implementation-defined;
  19379.  
  19380.         14.
  19381.  
  19382.                         -- Address Comparison:
  19383.                         function "<" (Left, Right : Address) return Boolean;
  19384.                         function "<="(Left, Right : Address) return Boolean;
  19385.                         function ">" (Left, Right : Address) return Boolean;
  19386.                         function ">="(Left, Right : Address) return Boolean;
  19387.                         function "=" (Left, Right : Address) return Boolean;
  19388.                       -- function "/=" (Left, Right : Address) return Boolean;
  19389.                         -- "/=" is implicitly defined
  19390.                         pragma Convention(Intrinsic, "<");
  19391.                         ┬╖┬╖┬╖
  19392.                         -- and so on for all language-defined subprograms in this package
  19393.  
  19394.         15.
  19395.  
  19396.                         -- Other System-Dependent Declarations:
  19397.                         type Bit_Order is (High_Order_First, Low_Order_First);
  19398.                         Default_Bit_Order : constant Bit_Order;
  19399.  
  19400.         16.
  19401.  
  19402.                         -- Priority-related declarations, see D.1.:
  19403.                         subtype Any_Priority is Integer
  19404.                          range implementation-defined;
  19405.                         subtype Priority is Any_Priority
  19406.                          range Any_Priority'First ┬╖┬╖ implementation-defined;
  19407.                         subtype Interrupt_Priority is Any_Priority
  19408.                          range Priority'Last+1 ┬╖┬╖ Any_Priority'Last;
  19409.  
  19410.         17.
  19411.  
  19412.                         Default_Priority : constant Priority
  19413.                          := (Priority'First + Priority'Last)/2;
  19414.  
  19415.         18.
  19416.  
  19417.                       private
  19418.                         ┬╖┬╖┬╖ -- not specified by the language
  19419.                       end System;
  19420.  
  19421.   19. Name is an enumeration subtype. Values of type Name are the names of 
  19422.       alternative machine configurations handled by the implementation. 
  19423.       System_Name represents the current machine configuration. 
  19424.  
  19425.   20. The named numbers Fine_Delta and Tick are of the type universal_real; the 
  19426.       others are of the type universal_integer. 
  19427.  
  19428.   21. The meanings of the named numbers are: 
  19429.  
  19430.   22. Min_Int 
  19431.  
  19432.                       The smallest (most negative) value allowed for the
  19433.                       expressions of a signed_integer_type_definition.
  19434.  
  19435.   23. Max_Int 
  19436.  
  19437.                       The largest (most positive) value allowed for the expressions
  19438.                       of a signed_integer_type_definition.
  19439.  
  19440.   24. Max_Binary_Modulus 
  19441.  
  19442.                       A power of two such that it, and all lesser positive powers
  19443.                       of two, are allowed as the modulus of a
  19444.                       modular_type_definition.
  19445.  
  19446.   25. Max_Nonbinary_Modulus 
  19447.  
  19448.                       A value such that it, and all lesser positive integers, are
  19449.                       allowed as the modulus of a modular_type_definition.
  19450.  
  19451.   26. Max_Base_Digits 
  19452.  
  19453.                       The largest value allowed for the requested decimal precision
  19454.                       in a floating_point_definition.
  19455.  
  19456.   27. Max_Digits 
  19457.  
  19458.                       The largest value allowed for the requested decimal precision
  19459.                       in a floating_point_definition that has no
  19460.                       real_range_specification. Max_Digits is less than or equal
  19461.                       to Max_Base_Digits.
  19462.  
  19463.   28. Max_Mantissa 
  19464.  
  19465.                       The largest possible number of binary digits in the mantissa
  19466.                       of machine numbers of a user-defined ordinary fixed point
  19467.                       type. (The mantissa is defined in G.)
  19468.  
  19469.   29. Fine_Delta 
  19470.  
  19471.                       The smallest delta allowed in an
  19472.                       ordinary_fixed_point_definition that has the
  19473.                       real_range_specification range -1.0 ┬╖┬╖ 1.0.
  19474.  
  19475.   30. Tick 
  19476.  
  19477.                       A period in seconds approximating the real time interval
  19478.                       during which the value of Calendar.Clock remains constant.
  19479.  
  19480.   31. Storage_Unit 
  19481.  
  19482.                       The number of bits per storage element.
  19483.  
  19484.   32. Word_Size 
  19485.  
  19486.                       The number of bits per word.
  19487.  
  19488.   33. Memory_Size 
  19489.  
  19490.                       An implementation-defined value that is intended to reflect
  19491.                       the memory size of the configuration in storage elements.
  19492.  
  19493.   34. Address is of a definite, nonlimited type. Address represents machine 
  19494.       addresses capable of addressing individual storage elements. Null_Address 
  19495.       is an address that is distinct from the address of any object or program 
  19496.       unit. 
  19497.  
  19498.   35. See 13.5.3, for an explanation of Bit_Order and Default_Bit_Order. 
  19499.  
  19500.             Implementation Permissions
  19501.  
  19502.   36. An implementation may add additional implementation-defined declarations 
  19503.       to package System and its children. However, it is usually better for the 
  19504.       implementation to provide additional functionality via 
  19505.       implementation-defined children of System. Package System may be declared 
  19506.       pure. 
  19507.  
  19508.             Implementation Advice
  19509.  
  19510.   37. Address should be of a private type. 
  19511.  
  19512.       NOTES 
  19513.  
  19514.   38. (14) There are also some language-defined child packages of System 
  19515.       defined elsewhere. 
  19516.  
  19517.  13.7.1                        The Package System.Storage_Elements 
  19518.  13.7.2                        The Package System.Address_To_Access_Conversions 
  19519.  
  19520.  
  19521. ΓòÉΓòÉΓòÉ 16.7.1. The Package System.Storage_Elements ΓòÉΓòÉΓòÉ
  19522.  
  19523.  
  19524.   Static Semantics
  19525.  
  19526.    1. The following language-defined library package exists: 
  19527.  
  19528.          2.
  19529.  
  19530.                       package System.Storage_Elements is
  19531.                         pragma Preelaborate(System.Storage_Elements);
  19532.  
  19533.          3.
  19534.  
  19535.                         type Storage_Offset is range implementation-defined;
  19536.  
  19537.          4.
  19538.  
  19539.                         subtype Storage_Count is Storage_Offset
  19540.                          range 0┬╖┬╖Storage_Offset'Last;
  19541.  
  19542.          5.
  19543.  
  19544.                         type Storage_Element is mod implementation-defined;
  19545.                         for Storage_Element'Size use Storage_Unit;
  19546.                         type Storage_Array is array
  19547.                          (Storage_Offset range <>) of aliased Storage_Element;
  19548.                         for Storage_Array'Component_Size use Storage_Unit;
  19549.  
  19550.          6.
  19551.  
  19552.                         -- Address Arithmetic:
  19553.  
  19554.          7.
  19555.  
  19556.                         function "+"(Left : Address; Right : Storage_Offset)
  19557.                          return Address;
  19558.                         function "+"(Left : Storage_Offset; Right : Address)
  19559.                          return Address;
  19560.                         function "-"(Left : Address; Right : Storage_Offset)
  19561.                          return Address;
  19562.                         function "-"(Left, Right : Address)
  19563.                          return Storage_Offset;
  19564.  
  19565.          8.
  19566.  
  19567.                         function "mod"(Left : Address; Right : Storage_Offset)
  19568.                          return Storage_Offset;
  19569.  
  19570.          9.
  19571.  
  19572.                         -- Conversion to/from integers:
  19573.  
  19574.         10.
  19575.  
  19576.                         type Integer_Address is implementation-defined;
  19577.                         function To_Address(Value : Integer_Address) return Address;
  19578.                         function To_Integer(Value : Address) return Integer_Address;
  19579.  
  19580.         11.
  19581.  
  19582.                         pragma Convention(Intrinsic, "+");
  19583.                          -- ┬╖┬╖┬╖and so on for all language-defined subprograms
  19584.                          -- declared in this package.
  19585.                       end System.Storage_Elements;
  19586.  
  19587.   12. Storage_Element represents a storage element. Storage_Offset represents 
  19588.       an offset in storage elements. Storage_Count represents a number of 
  19589.       storage elements. Storage_Array represents a contiguous sequence of 
  19590.       storage elements. 
  19591.  
  19592.   13. Integer_Address is a (signed or modular) integer subtype. To_Address and 
  19593.       To_Integer convert back and forth between this type and Address. 
  19594.  
  19595.             Implementation Requirements
  19596.  
  19597.   14. Storage_Offset'Last shall be greater than or equal to Integer'Last or the 
  19598.       largest possible storage offset, whichever is smaller. 
  19599.       Storage_Offset'First shall be <= (-Storage_Offset'Last). 
  19600.  
  19601.             Implementation Permissions
  19602.  
  19603.   15. Package System.Storage_Elements may be declared pure. 
  19604.  
  19605.             Implementation Advice
  19606.  
  19607.   16. Operations in System and its children should reflect the target 
  19608.       environment semantics as closely as is reasonable. For example, on most 
  19609.       machines, it makes sense for address arithmetic to ``wrap around.'' 
  19610.       Operations that do not make sense should raise Program_Error. 
  19611.  
  19612.  
  19613. ΓòÉΓòÉΓòÉ 16.7.2. The Package System.Address_To_Access_Conversions ΓòÉΓòÉΓòÉ
  19614.  
  19615.  
  19616.   Static Semantics
  19617.  
  19618.    1. The following language-defined generic library package exists: 
  19619.  
  19620.          2.
  19621.  
  19622.                       generic
  19623.                         type Object(<>) is limited private;
  19624.                       package System.Address_To_Access_Conversions is
  19625.                         pragma Preelaborate(Address_To_Access_Conversions);
  19626.  
  19627.          3.
  19628.  
  19629.                         type Object_Pointer is access all Object;
  19630.                         function To_Pointer(Value : Address) return Object_Pointer;
  19631.                         function To_Address(Value : Object_Pointer) return Address;
  19632.  
  19633.          4.
  19634.  
  19635.                         pragma Convention(Intrinsic, To_Pointer);
  19636.                         pragma Convention(Intrinsic, To_Address);
  19637.                       end System.Address_To_Access_Conversions;
  19638.  
  19639.    5. The To_Pointer and To_Address subprograms convert back and forth between 
  19640.       values of types Object_Pointer and Address. To_Pointer(X'Address) is 
  19641.       equal to X'Unchecked_Access for any X that allows Unchecked_Access. 
  19642.       To_Pointer(Null_Address) returns null. For other addresses, the behavior 
  19643.       is unspecified. To_Address(null) returns Null_Address (for null of the 
  19644.       appropriate type). To_Address(Y), where Y /= null, returns Y.all'Address. 
  19645.  
  19646.             Implementation Permissions
  19647.  
  19648.    6. An implementation may place restrictions on instantiations of 
  19649.       Address_To_Access_Conversions. 
  19650.  
  19651.  
  19652. ΓòÉΓòÉΓòÉ 16.8. Machine Code Insertions ΓòÉΓòÉΓòÉ
  19653.  
  19654.    1. A machine code insertion can be achieved by a call to a subprogram whose 
  19655.       sequence_of_statements contains code_statements. 
  19656.  
  19657.             Syntax
  19658.  
  19659.          2.
  19660.  
  19661.                       code_statement ::= qualified_expression;
  19662.  
  19663.         a. A code_statement is only allowed in the 
  19664.            handled_sequence_of_statements of a subprogram_body. If a 
  19665.            subprogram_body contains any code_statements, then within this 
  19666.            subprogram_body the only allowed form of statement is a 
  19667.            code_statement (labeled or not), the only allowed declarative_items 
  19668.            are use_clauses, and no exception_handler is allowed (comments and 
  19669.            pragmas are allowed as usual). 
  19670.  
  19671.   Name Resolution Rules
  19672.  
  19673.    1. The qualified_expression is expected to be of any type. 
  19674.  
  19675.             Legality Rules
  19676.  
  19677.    2. The qualified_expression shall be of a type declared in package 
  19678.       System.Machine_Code. 
  19679.  
  19680.    3. A code_statement shall appear only within the scope of a with_clause that 
  19681.       mentions package System.Machine_Code. 
  19682.  
  19683.             Static Semantics
  19684.  
  19685.    4. The contents of the library package System.Machine_Code (if provided) are 
  19686.       implementation defined. The meaning of code_statements is implementation 
  19687.       defined. Typically, each qualified_expression represents a machine 
  19688.       instruction or assembly directive. 
  19689.  
  19690.             Implementation Permissions
  19691.  
  19692.    5. An implementation may place restrictions on code_statements. An 
  19693.       implementation is not required to provide package System.Machine_Code. 
  19694.  
  19695.       NOTES 
  19696.  
  19697.    6. (15) An implementation may provide implementation-defined pragmas 
  19698.       specifying register conventions and calling conventions. 
  19699.  
  19700.    7. (16) Machine code functions are exempt from the rule that a 
  19701.       return_statement is required. In fact, return_statements are forbidden, 
  19702.       since only code_statements are allowed. 
  19703.  
  19704.    8. (17) Intrinsic subprograms, see 6.3.1: ``Conformance Rules'', can also be 
  19705.       used to achieve machine code insertions. Interface to assembly language 
  19706.       can be achieved using the features in Annex B, see B: ``Interface to 
  19707.       Other Languages''. 
  19708.  
  19709.             Examples
  19710.  
  19711.    9. Example of a code statement: 
  19712.  
  19713.         10.
  19714.  
  19715.                       M : Mask;
  19716.                       procedure Set_Mask; pragma Inline(Set_Mask);
  19717.  
  19718.         11.
  19719.  
  19720.                       procedure Set_Mask is
  19721.                        use System.Machine_Code;
  19722.                        -- assume ``with System.Machine_Code;'' appears somewhere above
  19723.                       begin
  19724.                        SI_Format'(Code => SSM, B => M'Base_Reg, D => M'Disp);
  19725.                        --  Base_Reg and Disp are implementation-defined attributes
  19726.                       end Set_Mask;
  19727.  
  19728.  
  19729. ΓòÉΓòÉΓòÉ 16.9. Unchecked Type Conversions ΓòÉΓòÉΓòÉ
  19730.  
  19731.    1. An unchecked type conversion can be achieved by a call to an instance of 
  19732.       the generic function Unchecked_Conversion. 
  19733.  
  19734.             Static Semantics
  19735.  
  19736.    2. The following language-defined generic library function exists: 
  19737.  
  19738.          3.
  19739.  
  19740.                       generic
  19741.                         type Source(<>) is limited private;
  19742.                         type Target(<>) is limited private;
  19743.                       function Ada.Unchecked_Conversion(S : Source) return Target;
  19744.                       pragma Convention(Intrinsic, Ada.Unchecked_Conversion);
  19745.                       pragma Pure(Ada.Unchecked_Conversion);
  19746.  
  19747.   Dynamic Semantics
  19748.  
  19749.    4. The size of the formal parameter S in an instance of Unchecked_Conversion 
  19750.       is that of its subtype. This is the actual subtype passed to Source, 
  19751.       except when the actual is an unconstrained composite subtype, in which 
  19752.       case the subtype is constrained by the bounds or discriminants of the 
  19753.       value of the actual expression passed to S. 
  19754.  
  19755.    5. If all of the following are true, the effect of an unchecked conversion 
  19756.       is to return the value of an object of the target subtype whose 
  19757.       representation is the same as that of the source object S: 
  19758.  
  19759.         a. S'Size = Target'Size. 
  19760.  
  19761.         b. S'Alignment = Target'Alignment. 
  19762.  
  19763.         c. The target subtype is not an unconstrained composite subtype. 
  19764.  
  19765.         d. S and the target subtype both have a contiguous representation. 
  19766.  
  19767.         e. The representation of S is a representation of an object of the 
  19768.            target subtype. 
  19769.  
  19770.    1. Otherwise, the effect is implementation defined; in particular, the 
  19771.       result can be abnormal, see 13.9.1. 
  19772.  
  19773.             Implementation Permissions
  19774.  
  19775.    2. An implementation may return the result of an unchecked conversion by 
  19776.       reference, if the Source type is not a by-copy type. In this case, the 
  19777.       result of the unchecked conversion represents simply a different 
  19778.       (read-only) view of the operand of the conversion. 
  19779.  
  19780.    3. An implementation may place restrictions on Unchecked_Conversion. 
  19781.  
  19782.             Implementation Advice
  19783.  
  19784.    4. The Size of an array object should not include its bounds; hence, the 
  19785.       bounds should not be part of the converted data. 
  19786.  
  19787.    5. The implementation should not generate unnecessary run-time checks to 
  19788.       ensure that the representation of S is a representation of the target 
  19789.       type. It should take advantage of the permission to return by reference 
  19790.       when possible. Restrictions on unchecked conversions should be avoided 
  19791.       unless required by the target environment. 
  19792.  
  19793.    6. The recommended level of support for unchecked conversions is:  Unchecked 
  19794.       conversions should be supported and should be reversible in the cases 
  19795.       where this clause defines the result. To enable meaningful use of 
  19796.       unchecked conversion, a contiguous representation should be used for 
  19797.       elementary subtypes, for statically constrained array subtypes whose 
  19798.       component subtype is one of the subtypes described in this paragraph, and 
  19799.       for record subtypes without discriminants whose component subtypes are 
  19800.       described in this paragraph. 
  19801.  
  19802.  13.9.1                        Data Validity 
  19803.  13.9.2                        The Valid Attribute 
  19804.  
  19805.  
  19806. ΓòÉΓòÉΓòÉ 16.9.1. Data Validity ΓòÉΓòÉΓòÉ
  19807.  
  19808.    1. Certain actions that can potentially lead to erroneous execution are not 
  19809.       directly erroneous, but instead can cause objects to become abnormal. 
  19810.       Subsequent uses of abnormal objects can be erroneous. 
  19811.  
  19812.    2. A scalar object can have an invalid representation, which means that the 
  19813.       object's representation does not represent any value of the object's 
  19814.       subtype. The primary cause of invalid representations is uninitialized 
  19815.       variables. 
  19816.  
  19817.    3. Abnormal objects and invalid representations are explained in this 
  19818.       subclause. 
  19819.  
  19820.             Dynamic Semantics
  19821.  
  19822.    4. When an object is first created, and any explicit or default 
  19823.       initializations have been performed, the object and all of its parts are 
  19824.       in the normal state. Subsequent operations generally leave them normal. 
  19825.       However, an object or part of an object can become abnormal in the 
  19826.       following ways: 
  19827.  
  19828.         a. An assignment to the object is disrupted due to an abort, see 9.8, 
  19829.            or due to the failure of a language-defined check, see 11.6. 
  19830.  
  19831.         b. The object is not scalar, and is passed to an in out or out 
  19832.            parameter of an imported procedure or language-defined input 
  19833.            procedure, if after return from the procedure the representation of 
  19834.            the parameter does not represent a value of the parameter's subtype. 
  19835.  
  19836.    1. Whether or not an object actually becomes abnormal in these cases is not 
  19837.       specified. An abnormal object becomes normal again upon successful 
  19838.       completion of an assignment to the object as a whole. 
  19839.  
  19840.             Erroneous Execution
  19841.  
  19842.    2. It is erroneous to evaluate a primary that is a name denoting an abnormal 
  19843.       object, or to evaluate a prefix that denotes an abnormal object. 
  19844.  
  19845.             Bounded (Run-Time) Errors
  19846.  
  19847.    3. If the representation of a scalar object does not represent a value of 
  19848.       the object's subtype (perhaps because the object was not initialized), 
  19849.       the object is said to have an invalid representation. It is a bounded 
  19850.       error to evaluate the value of such an object. If the error is detected, 
  19851.       either Constraint_Error or Program_Error is raised. Otherwise, execution 
  19852.       continues using the invalid representation. The rules of the language 
  19853.       outside this subclause assume that all objects have valid 
  19854.       representations. The semantics of operations on invalid representations 
  19855.       are as follows: 
  19856.  
  19857.         a. If the representation of the object represents a value of the 
  19858.            object's type, the value of the type is used. 
  19859.  
  19860.         b. If the representation of the object does not represent a value of 
  19861.            the object's type, the semantics of operations on such 
  19862.            representations is implementation-defined, but does not by itself 
  19863.            lead to erroneous or unpredictable execution, or to other objects 
  19864.            becoming abnormal. 
  19865.  
  19866.   Erroneous Execution
  19867.  
  19868.    1. A call to an imported function or an instance of Unchecked_Conversion is 
  19869.       erroneous if the result is scalar, and the result object has an invalid 
  19870.       representation. 
  19871.  
  19872.    2. The dereference of an access value is erroneous if it does not designate 
  19873.       an object of an appropriate type or a subprogram with an appropriate 
  19874.       profile, if it designates a nonexistent object, or if it is an 
  19875.       access-to-variable value that designates a constant object. Such an 
  19876.       access value can exist, for example, because of Unchecked_Deallocation, 
  19877.       Unchecked_Access, or Unchecked_Conversion. 
  19878.  
  19879.       NOTES 
  19880.  
  19881.    3. (18) Objects can become abnormal due to other kinds of actions that 
  19882.       directly update the object's representation; such actions are generally 
  19883.       considered directly erroneous, however. 
  19884.  
  19885.  
  19886. ΓòÉΓòÉΓòÉ 16.9.2. The Valid Attribute ΓòÉΓòÉΓòÉ
  19887.  
  19888.    1. The Valid attribute can be used to check the validity of data produced by 
  19889.       unchecked conversion, input, interface to foreign languages, and the 
  19890.       like. 
  19891.  
  19892.             Static Semantics
  19893.  
  19894.    2. For a prefix X that denotes a scalar object (after any implicit 
  19895.       dereference), the following attribute is defined: 
  19896.  
  19897.    3. X'Valid 
  19898.  
  19899.                       Yields True if and only if the object denoted by X is normal
  19900.                       and has a valid representation. The value of this attribute
  19901.                       is of the predefined type Boolean.
  19902.  
  19903.  NOTES 
  19904.  
  19905.    4. (19) Invalid data can be created in the following cases (not counting 
  19906.       erroneous or unpredictable execution): 
  19907.  
  19908.         a. an uninitialized scalar object, 
  19909.  
  19910.         b. the result of an unchecked conversion, 
  19911.  
  19912.         c. input, 
  19913.  
  19914.         d. interface to another language (including machine code), 
  19915.  
  19916.         e. aborting an assignment, 
  19917.  
  19918.         f. disrupting an assignment due to the failure of a language-defined 
  19919.            check (see 11.6) and 
  19920.  
  19921.         g. use of an object whose Address has been specified. 
  19922.  
  19923.    1. (20) X'Valid is not considered to be a read of X; hence, it is not an 
  19924.       error to check the validity of invalid data. 
  19925.  
  19926.  
  19927. ΓòÉΓòÉΓòÉ 16.10. Unchecked Access Value Creation ΓòÉΓòÉΓòÉ
  19928.  
  19929.    1. The attribute Unchecked_Access is used to create access values in an 
  19930.       unsafe manner -- the programmer is responsible for preventing ``dangling 
  19931.       references.'' 
  19932.  
  19933.             Static Semantics
  19934.  
  19935.    2. The following attribute is defined for a prefix X that denotes an aliased 
  19936.       view of an object: 
  19937.  
  19938.    3. X'Unchecked_Access 
  19939.  
  19940.                       All rules and semantics that apply to X'Access, see 3.10.2,
  19941.                       apply also to X'Unchecked_Access, except that, for the
  19942.                       purposes of accessibility rules and checks, it is as if X
  19943.                       were declared immediately within a library package.
  19944.  
  19945.  NOTES 
  19946.  
  19947.    4. (21) This attribute is provided to support the situation where a local 
  19948.       object is to be inserted into a global linked data structure, when the 
  19949.       programmer knows that it will always be removed from the data structure 
  19950.       prior to exiting the object's scope. The Access attribute would be 
  19951.       illegal in this case, see 3.10.2: ``Operations of Access Types''. 
  19952.  
  19953.    5. (22) There is no Unchecked_Access attribute for subprograms. 
  19954.  
  19955.  
  19956. ΓòÉΓòÉΓòÉ 16.11. Storage Management ΓòÉΓòÉΓòÉ
  19957.  
  19958.    1. Each access-to-object type has an associated storage pool. The storage 
  19959.       allocated by an allocator comes from the pool; instances of 
  19960.       Unchecked_Deallocation return storage to the pool. Several access types 
  19961.       can share the same pool. 
  19962.  
  19963.    2. A storage pool is a variable of a type in the class rooted at 
  19964.       Root_Storage_Pool, which is an abstract limited controlled type. By 
  19965.       default, the implementation chooses a standard storage pool for each 
  19966.       access type. The user may define new pool types, and may override the 
  19967.       choice of pool for an access type by specifying Storage_Pool for the 
  19968.       type. 
  19969.  
  19970.             Legality Rules
  19971.  
  19972.    3. If Storage_Pool is specified for a given access type, Storage_Size shall 
  19973.       not be specified for it. 
  19974.  
  19975.             Static Semantics
  19976.  
  19977.    4. The following language-defined library package exists: 
  19978.  
  19979.          5.
  19980.  
  19981.                       with Ada.Finalization;
  19982.                       with System.Storage_Elements;
  19983.                       package System.Storage_Pools is
  19984.                         pragma Preelaborate(System.Storage_Pools);
  19985.  
  19986.          6.
  19987.  
  19988.                          type Root_Storage_Pool is
  19989.                           abstract new
  19990.                            Ada.Finalization.Limited_Controlled with private;
  19991.  
  19992.          7.
  19993.  
  19994.                          procedure Allocate(
  19995.                          Pool : in out Root_Storage_Pool;
  19996.                          Storage_Address : out Address;
  19997.                          Size_In_Storage_Elements : in Storage_Elements.Storage_Count;
  19998.                          Alignment : in Storage_Elements.Storage_Count) is abstract;
  19999.  
  20000.          8.
  20001.  
  20002.                          procedure Deallocate(
  20003.                          Pool : in out Root_Storage_Pool;
  20004.                          Storage_Address : in Address;
  20005.                          Size_In_Storage_Elements : in Storage_Elements.Storage_Count;
  20006.                          Alignment : in Storage_Elements.Storage_Count) is abstract;
  20007.  
  20008.          9.
  20009.  
  20010.                          function Storage_Size(Pool : Root_Storage_Pool)
  20011.                           return Storage_Elements.Storage_Count is abstract;
  20012.  
  20013.         10.
  20014.  
  20015.                       private
  20016.                         ┬╖┬╖┬╖ -- not specified by the language
  20017.                       end System.Storage_Pools;
  20018.  
  20019.   11. A storage pool type (or pool type) is a descendant of Root_Storage_Pool. 
  20020.       The elements of a storage pool are the objects allocated in the pool by 
  20021.       allocators. 
  20022.  
  20023.   12. For every access subtype S, the following attributes are defined: 
  20024.  
  20025.   13. S'Storage_Pool 
  20026.  
  20027.                       Denotes the storage pool of the type of S. The type of this
  20028.                       attribute is Root_Storage_Pool'Class.
  20029.  
  20030.   14. S'Storage_Size 
  20031.  
  20032.                       Yields the result of calling Storage_Size(S'Storage_Pool),
  20033.                       which is intended to be a measure of the number of storage
  20034.                       elements reserved for the pool. The type of this attribute
  20035.                       is universal_integer.
  20036.  
  20037.   15. Storage_Size or Storage_Pool may be specified for a non-derived 
  20038.       access-to-object type via an attribute_definition_clause; the name in a 
  20039.       Storage_Pool clause shall denote a variable. 
  20040.  
  20041.   16. An allocator of type T allocates storage from T's storage pool. If the 
  20042.       storage pool is a user-defined object, then the storage is allocated by 
  20043.       calling Allocate, passing T'Storage_Pool as the Pool parameter. The 
  20044.       Size_In_Storage_Elements parameter indicates the number of storage 
  20045.       elements to be allocated, and is no more than 
  20046.       D'Max_Size_In_Storage_Elements, where D is the designated subtype. The 
  20047.       Alignment parameter is D'Alignment. The result returned in the 
  20048.       Storage_Address parameter is used by the allocator as the address of the 
  20049.       allocated storage, which is a contiguous block of memory of 
  20050.       Size_In_Storage_Elements storage elements. Any exception propagated by 
  20051.       Allocate is propagated by the allocator. 
  20052.  
  20053.   17. If Storage_Pool is not specified for a type defined by an 
  20054.       access_to_object_definition, then the implementation chooses a standard 
  20055.       storage pool for it in an implementation-defined manner. In this case, 
  20056.       the exception Storage_Error is raised by an allocator if there is not 
  20057.       enough storage. It is implementation defined whether or not the 
  20058.       implementation provides user-accessible names for the standard pool 
  20059.       type(s). 
  20060.  
  20061.   18. If Storage_Size is specified for an access type, then the Storage_Size of 
  20062.       this pool is at least that requested, and the storage for the pool is 
  20063.       reclaimed when the master containing the declaration of the access type 
  20064.       is left. If the implementation cannot satisfy the request, Storage_Error 
  20065.       is raised at the point of the attribute_definition_clause. If neither 
  20066.       Storage_Pool nor Storage_Size are specified, then the meaning of 
  20067.       Storage_Size is implementation defined. 
  20068.  
  20069.   19. If Storage_Pool is specified for an access type, then the specified pool 
  20070.       is used. 
  20071.  
  20072.   20. The effect of calling Allocate and Deallocate for a standard storage pool 
  20073.       directly (rather than implicitly via an allocator or an instance of 
  20074.       Unchecked_Deallocation) is unspecified. 
  20075.  
  20076.             Erroneous Execution
  20077.  
  20078.   21. If Storage_Pool is specified for an access type, then if Allocate can 
  20079.       satisfy the request, it should allocate a contiguous block of memory, and 
  20080.       return the address of the first storage element in Storage_Address. The 
  20081.       block should contain Size_In_Storage_Elements storage elements, and 
  20082.       should be aligned according to Alignment. The allocated storage should 
  20083.       not be used for any other purpose while the pool element remains in 
  20084.       existence. If the request cannot be satisfied, then Allocate should 
  20085.       propagate an exception (such as Storage_Error). If Allocate behaves in 
  20086.       any other manner, then the program execution is erroneous. 
  20087.  
  20088.             Documentation Requirements
  20089.  
  20090.   22. An implementation shall document the set of values that a user-defined 
  20091.       Allocate procedure needs to accept for the Alignment parameter. An 
  20092.       implementation shall document how the standard storage pool is chosen, 
  20093.       and how storage is allocated by standard storage pools. 
  20094.  
  20095.             Implementation Advice
  20096.  
  20097.   23. An implementation should document any cases in which it dynamically 
  20098.       allocates heap storage for a purpose other than the evaluation of an 
  20099.       allocator. 
  20100.  
  20101.   24. A default (implementation-provided) storage pool for an 
  20102.       access-to-constant type should not have overhead to support deallocation 
  20103.       of individual objects. 
  20104.  
  20105.   25. A storage pool for an anonymous access type should be created at the 
  20106.       point of an allocator for the type, and be reclaimed when the designated 
  20107.       object becomes inaccessible. 
  20108.  
  20109.       NOTES 
  20110.  
  20111.   26. (23) A user-defined storage pool type can be obtained by extending the 
  20112.       Root_Storage_Pool type, and overriding the primitive subprograms 
  20113.       Allocate, Deallocate, and Storage_Size. A user-defined storage pool can 
  20114.       then be obtained by declaring an object of the type extension. The user 
  20115.       can override Initialize and Finalize if there is any need for non-trivial 
  20116.       initialization and finalization for a user-defined pool type. For 
  20117.       example, Finalize might reclaim blocks of storage that are allocated 
  20118.       separately from the pool object itself. 
  20119.  
  20120.   27. (24) The writer of the user-defined allocation and deallocation 
  20121.       procedures, and users of allocators for the associated access type, are 
  20122.       responsible for dealing with any interactions with tasking. In 
  20123.       particular: 
  20124.  
  20125.         a. If the allocators are used in different tasks, they require mutual 
  20126.            exclusion. 
  20127.  
  20128.         b. If they are used inside protected objects, they cannot block. 
  20129.  
  20130.         c. If they are used by interrupt handlers, see C.3: ``Interrupt 
  20131.            Support'', the mutual exclusion mechanism has to work properly in 
  20132.            that context. 
  20133.  
  20134.    1. (25) The primitives Allocate, Deallocate, and Storage_Size are declared 
  20135.       as abstract, see 3.9.3, and therefore they have to be overridden when a 
  20136.       new (non-abstract) storage pool type is declared. 
  20137.  
  20138.             Examples
  20139.  
  20140.    2. To associate an access type with a storage pool object, the user first 
  20141.       declares a pool object of some type derived from Root_Storage_Pool. Then, 
  20142.       the user defines its Storage_Pool attribute, as follows: 
  20143.  
  20144.          3.
  20145.  
  20146.                       Pool_Object : Some_Storage_Pool_Type;
  20147.  
  20148.          4.
  20149.  
  20150.                       type T is access Designated;
  20151.                       for T'Storage_Pool use Pool_Object;
  20152.  
  20153.    5. Another access type may be added to an existing storage pool, via: 
  20154.  
  20155.          6.
  20156.  
  20157.                       for T2'Storage_Pool use T'Storage_Pool;
  20158.  
  20159.    7. The semantics of this is implementation defined for a standard storage 
  20160.       pool. 
  20161.  
  20162.    8. As usual, a derivative of Root_Storage_Pool may define additional 
  20163.       operations. For example, presuming that Mark_Release_Pool_Type has two 
  20164.       additional operations, Mark and Release, the following is a possible use: 
  20165.  
  20166.          9.
  20167.  
  20168.                       type Mark_Release_Pool_Type
  20169.                         (Pool_Size : Storage_Elements.Storage_Count;
  20170.                         Block_Size : Storage_Elements.Storage_Count)
  20171.                           is new Root_Storage_Pool with limited private;
  20172.  
  20173.         10.
  20174.  
  20175.                       ┬╖┬╖┬╖
  20176.  
  20177.         11.
  20178.  
  20179.                       MR_Pool : Mark_Release_Pool_Type (Pool_Size => 2000,
  20180.                                        Block_Size => 100);
  20181.  
  20182.         12.
  20183.  
  20184.                       type Acc is access ┬╖┬╖┬╖;
  20185.                       for Acc'Storage_Pool use MR_Pool;
  20186.                       ┬╖┬╖┬╖
  20187.  
  20188.         13.
  20189.  
  20190.                       Mark(MR_Pool);
  20191.                       ┬╖┬╖┬╖ -- Allocate objects using ``new Designated(┬╖┬╖┬╖)''.
  20192.                       Release(MR_Pool); -- Reclaim the storage.
  20193.  
  20194.  13.11.1                       The Max_Size_In_Storage_Elements Attribute 
  20195.  13.11.2                       Unchecked Storage Deallocation 
  20196.  13.11.3                       Pragma Controlled 
  20197.  
  20198.  
  20199. ΓòÉΓòÉΓòÉ 16.11.1. The Max_Size_In_Storage_Elements Attribute ΓòÉΓòÉΓòÉ
  20200.  
  20201.    1. The Max_Size_In_Storage_Elements attribute is useful in writing 
  20202.       user-defined pool types. 
  20203.  
  20204.             Static Semantics
  20205.  
  20206.    2. For every subtype S, the following attribute is defined: 
  20207.  
  20208.    3. S'Max_Size_In_Storage_Elements 
  20209.  
  20210.          4.
  20211.  
  20212.                       Denotes the maximum value for Size_In_Storage_Elements that
  20213.                       will be requested via Allocate for an access type whose
  20214.                       designated subtype is S. The value of this attribute is of
  20215.                       type universal_integer.
  20216.  
  20217.  
  20218. ΓòÉΓòÉΓòÉ 16.11.2. Unchecked Storage Deallocation ΓòÉΓòÉΓòÉ
  20219.  
  20220.    1. Unchecked storage deallocation of an object designated by a value of an 
  20221.       access type is achieved by a call to an instance of the generic procedure 
  20222.       Unchecked_Deallocation. 
  20223.  
  20224.             Static Semantics
  20225.  
  20226.    2. The following language-defined generic library procedure exists: 
  20227.  
  20228.          3.
  20229.  
  20230.                       generic
  20231.                         type Object(<>) is limited private;
  20232.                         type Name  is access  Object;
  20233.                       procedure Ada.Unchecked_Deallocation(X : in out Name);
  20234.                       pragma Convention(Intrinsic, Ada.Unchecked_Deallocation);
  20235.                       pragma Preelaborate(Ada.Unchecked_Deallocation);
  20236.  
  20237.   Dynamic Semantics
  20238.  
  20239.    4. Given an instance of Unchecked_Deallocation declared as follows: 
  20240.  
  20241.          5.
  20242.  
  20243.                       procedure Free is
  20244.                         new Ada.Unchecked_Deallocation
  20245.                          (object_subtype_name, access_to_variable_subtype_name);
  20246.  
  20247.    6. Procedure Free has the following effect: 
  20248.  
  20249.         a. After executing Free(X), the value of X is null. 
  20250.  
  20251.         b. Free(X), when X is already equal to null, has no effect. 
  20252.  
  20253.         c. Free(X), when X is not equal to null first performs finalization, as 
  20254.            described in 7.6. It then deallocates the storage occupied by the 
  20255.            object designated by X. If the storage pool is a user-defined 
  20256.            object, then the storage is deallocated by calling Deallocate, 
  20257.            passing access_to_variable_subtype_name'Storage_Pool as the Pool 
  20258.            parameter. Storage_Address is the value returned in the 
  20259.            Storage_Address parameter of the corresponding Allocate call. 
  20260.            Size_In_Storage_Elements and Alignment are the same values passed to 
  20261.            the corresponding Allocate call. There is one exception: if the 
  20262.            object being freed contains tasks, the object might not be 
  20263.            deallocated. 
  20264.  
  20265.    1. After Free(X), the object designated by X, and any subcomponents thereof, 
  20266.       no longer exist; their storage can be reused for other purposes. 
  20267.  
  20268.             Bounded (Run-Time) Errors
  20269.  
  20270.    2. It is a bounded error to free a discriminated, unterminated task object. 
  20271.       The possible consequences are: 
  20272.  
  20273.         a. No exception is raised. 
  20274.  
  20275.         b. Program_Error or Tasking_Error is raised at the point of the 
  20276.            deallocation. 
  20277.  
  20278.         c. Program_Error or Tasking_Error is raised in the task the next time 
  20279.            it references any of the discriminants. 
  20280.  
  20281.    1. In the first two cases, the storage for the discriminants (and for any 
  20282.       enclosing object if it is designated by an access discriminant of the 
  20283.       task) is not reclaimed prior to task termination. 
  20284.  
  20285.             Erroneous Execution
  20286.  
  20287.    2. Evaluating a name that denotes a nonexistent object is erroneous. The 
  20288.       execution of a call to an instance of Unchecked_Deallocation is erroneous 
  20289.       if the object was created other than by an allocator for an access type 
  20290.       whose pool is Name'Storage_Pool. 
  20291.  
  20292.             Implementation Advice
  20293.  
  20294.    3. For a standard storage pool, Free should actually reclaim the storage. 
  20295.  
  20296.       NOTES 
  20297.  
  20298.    4. (26) The rules here that refer to Free apply to any instance of 
  20299.       Unchecked_Deallocation. 
  20300.  
  20301.    5. (27) Unchecked_Deallocation cannot be instantiated for an 
  20302.       access-to-constant type. This is implied by the rules of 12.5.4. 
  20303.  
  20304.  
  20305. ΓòÉΓòÉΓòÉ 16.11.3. Pragma Controlled ΓòÉΓòÉΓòÉ
  20306.  
  20307.    1. Pragma Controlled is used to prevent any automatic reclamation of storage 
  20308.       (garbage collection) for the objects created by allocators of a given 
  20309.       access type. 
  20310.  
  20311.             Syntax
  20312.  
  20313.    2. The form of a pragma Controlled is as follows: 
  20314.  
  20315.          3.
  20316.  
  20317.                       pragma Controlled(first_subtype_local_name);
  20318.  
  20319.   Legality Rules
  20320.  
  20321.    4. The first_subtype_local_name of a pragma Controlled shall denote a 
  20322.       non-derived access subtype. 
  20323.  
  20324.             Static Semantics
  20325.  
  20326.    5. A pragma Controlled is a representation pragma that specifies the 
  20327.       controlled aspect of representation. 
  20328.  
  20329.    6. Garbage collection is a process that automatically reclaims storage, or 
  20330.       moves objects to a different address, while the objects still exist. 
  20331.  
  20332.    7. If a pragma Controlled is specified for an access type with a standard 
  20333.       storage pool, then garbage collection is not performed for objects in 
  20334.       that pool. 
  20335.  
  20336.             Implementation Permissions
  20337.  
  20338.    8. An implementation need not support garbage collection, in which case, a 
  20339.       pragma Controlled has no effect. 
  20340.  
  20341.  
  20342. ΓòÉΓòÉΓòÉ 16.12. Pragma Restrictions ΓòÉΓòÉΓòÉ
  20343.  
  20344.    1. A pragma Restrictions expresses the user's intent to abide by certain 
  20345.       restrictions. This may facilitate the construction of simpler run-time 
  20346.       environments. 
  20347.  
  20348.             Syntax
  20349.  
  20350.    2. The form of a pragma Restrictions is as follows: 
  20351.  
  20352.          3.
  20353.  
  20354.                       pragma Restrictions(restriction{, restriction});
  20355.  
  20356.          4.
  20357.  
  20358.                       restriction ::= restriction_identifier
  20359.                         | restriction_parameter_identifier => expression
  20360.  
  20361.   Name Resolution Rules
  20362.  
  20363.    5. Unless otherwise specified for a particular restriction, the expression 
  20364.       is expected to be of any integer type. 
  20365.  
  20366.             Legality Rules
  20367.  
  20368.    6. Unless otherwise specified for a particular restriction, the expression 
  20369.       shall be static, and its value shall be nonnegative. 
  20370.  
  20371.             Static Semantics
  20372.  
  20373.    7. The set of restrictions is implementation defined. 
  20374.  
  20375.             Post-Compilation Rules
  20376.  
  20377.    8. A pragma Restrictions is a configuration pragma; unless otherwise 
  20378.       specified for a particular restriction, a partition shall obey the 
  20379.       restriction if a pragma Restrictions applies to any compilation unit 
  20380.       included in the partition. 
  20381.  
  20382.             Implementation Permissions
  20383.  
  20384.    9. An implementation may place limitations on the values of the expression 
  20385.       that are supported, and limitations on the supported combinations of 
  20386.       restrictions. The consequences of violating such limitations are 
  20387.       implementation defined. 
  20388.  
  20389.       NOTES 
  20390.  
  20391.   10. (28) Restrictions intended to facilitate the construction of efficient 
  20392.       tasking run-time systems are defined in D.7. Safety- and security-related 
  20393.       restrictions are defined in H.4. 
  20394.  
  20395.   11. (29) An implementation has to enforce the restrictions in cases where 
  20396.       enforcement is required, even if it chooses not to take advantage of the 
  20397.       restrictions in terms of efficiency. 
  20398.  
  20399.  
  20400. ΓòÉΓòÉΓòÉ 16.13. Streams ΓòÉΓòÉΓòÉ
  20401.  
  20402.    1. A stream is a sequence of elements comprising values from possibly 
  20403.       different types and allowing sequential access to these values. A stream 
  20404.       type is a type in the class whose root type is Streams.Root_Stream_Type. 
  20405.       A stream type may be implemented in various ways, such as an external 
  20406.       sequential file, an internal buffer, or a network channel. 
  20407.  
  20408.  13.13.1                       The Package Streams 
  20409.  13.13.2                       Stream-Oriented Attributes 
  20410.  
  20411.  
  20412. ΓòÉΓòÉΓòÉ 16.13.1. The Package Streams ΓòÉΓòÉΓòÉ
  20413.  
  20414.  
  20415.   Static Semantics
  20416.  
  20417.    1. The abstract type Root_Stream_Type is the root type of the class of 
  20418.       stream types. The types in this class represent different kinds of 
  20419.       streams. A new stream type is defined by extending the root type (or some 
  20420.       other stream type), overriding the Read and Write operations, and 
  20421.       optionally defining additional primitive subprograms, according to the 
  20422.       requirements of the particular kind of stream. The predefined 
  20423.       stream-oriented attributes like T'Read and T'Write make dispatching calls 
  20424.       on the Read and Write procedures of the Root_Stream_Type. (User-defined 
  20425.       T'Read and T'Write attributes can also make such calls, or can call the 
  20426.       Read and Write attributes of other types.) 
  20427.  
  20428.          2.
  20429.  
  20430.                       package Ada.Streams is
  20431.                         pragma Pure(Streams);
  20432.  
  20433.          3.
  20434.  
  20435.                          type Root_Stream_Type is abstract tagged limited private;
  20436.  
  20437.          4.
  20438.  
  20439.                          type Stream_Element is mod implementation-defined;
  20440.                         type Stream_Element_Offset is range implementation-defined;
  20441.                         subtype Stream_Element_Count is
  20442.                           Stream_Element_Offset range 0┬╖┬╖Stream_Element_Offset'Last;
  20443.                         type Stream_Element_Array is
  20444.                           array(Stream_Element_Offset range <>) of Stream_Element;
  20445.  
  20446.          5.
  20447.  
  20448.                          procedure Read(
  20449.                          Stream : in out Root_Stream_Type;
  20450.                          Item  : out Stream_Element_Array;
  20451.                          Last  : out Stream_Element_Offset) is abstract;
  20452.  
  20453.          6.
  20454.  
  20455.                          procedure Write(
  20456.                          Stream : in out Root_Stream_Type;
  20457.                          Item  : in Stream_Element_Array) is abstract;
  20458.  
  20459.          7.
  20460.  
  20461.                       private
  20462.                         ┬╖┬╖┬╖ -- not specified by the language
  20463.                       end Ada.Streams;
  20464.  
  20465.    8. The Read operation transfers Item'Length stream elements from the 
  20466.       specified stream to fill the array Item. The index of the last stream 
  20467.       element transferred is returned in Last. Last is less than Item'Last only 
  20468.       if the end of the stream is reached. 
  20469.  
  20470.    9. The Write operation appends Item to the specified stream. 
  20471.  
  20472.       NOTES 
  20473.  
  20474.   10. (30) See A.12.1: ``The Package Streams.Stream_IO'', for an example of 
  20475.       extending type Root_Stream_Type. 
  20476.  
  20477.  
  20478. ΓòÉΓòÉΓòÉ 16.13.2. Stream-Oriented Attributes ΓòÉΓòÉΓòÉ
  20479.  
  20480.    1. The Write, Read, Output, and Input attributes convert values to a stream 
  20481.       of elements and reconstruct values from a stream. 
  20482.  
  20483.             Static Semantics
  20484.  
  20485.    2. For every subtype S of a specific type T, the following attributes are 
  20486.       defined. 
  20487.  
  20488.    3. S'Write 
  20489.  
  20490.                       S'Write denotes a procedure with the following specification:
  20491.  
  20492.                    a.
  20493.  
  20494.                       procedure S'Write(
  20495.                         Stream : access Ada.Streams.Root_Stream_Type'Class;
  20496.                         Item : in T)
  20497.  
  20498.         b. S'Write writes the value of Item to Stream. 
  20499.  
  20500.    1. S'Read 
  20501.  
  20502.                       S'Read denotes a procedure with the following specification:
  20503.  
  20504.                    a.
  20505.  
  20506.                       procedure S'Read(
  20507.                         Stream : access Ada.Streams.Root_Stream_Type'Class;
  20508.                         Item : out T)
  20509.  
  20510.         b. S'Read reads the value of Item from Stream. 
  20511.  
  20512.    1. For elementary types, the representation in terms of stream elements is 
  20513.       implementation defined. For composite types, the Write or Read attribute 
  20514.       for each component is called in a canonical order. The canonical order of 
  20515.       components is last dimension varying fastest for an array, and positional 
  20516.       aggregate order for a record. Bounds are not included in the stream if T 
  20517.       is an array type. If T is a discriminated type, discriminants are 
  20518.       included only if they have defaults. If T is a tagged type, the tag is 
  20519.       not included. 
  20520.  
  20521.    2. For every subtype S'Class of a class-wide type T'Class: 
  20522.  
  20523.    3. S'Class'Write 
  20524.  
  20525.                       S'Class'Write denotes a procedure with the following
  20526.                       specification:
  20527.  
  20528.                    a.
  20529.  
  20530.                       procedure S'Class'Write(
  20531.                         Stream : access Ada.Streams.Root_Stream_Type'Class;
  20532.                         Item  : in T'Class)
  20533.  
  20534.         b. Dispatches to the subprogram denoted by the Write attribute of the 
  20535.            specific type identified by the tag of Item. 
  20536.  
  20537.    1. S'Class'Read 
  20538.  
  20539.                       S'Class'Read denotes a procedure with the following
  20540.                       specification:
  20541.  
  20542.                    a.
  20543.  
  20544.                       procedure S'Class'Read(
  20545.                         Stream : access Ada.Streams.Root_Stream_Type'Class;
  20546.                         Item : out T'Class)
  20547.  
  20548.         b. Dispatches to the subprogram denoted by the Read attribute of the 
  20549.            specific type identified by the tag of Item. 
  20550.  
  20551.   Implementation Advice
  20552.  
  20553.    1. If a stream element is the same size as a storage element, then the 
  20554.       normal in-memory representation should be used by Read and Write for 
  20555.       scalar objects. Otherwise, Read and Write should use the smallest number 
  20556.       of stream elements needed to represent all values in the base range of 
  20557.       the scalar type. 
  20558.  
  20559.             Static Semantics
  20560.  
  20561.    2. For every subtype S of a specific type T, the following attributes are 
  20562.       defined. 
  20563.  
  20564.    3. S'Output 
  20565.  
  20566.                       S'Output denotes a procedure with the following specification:
  20567.  
  20568.                    a.
  20569.  
  20570.                       procedure S'Output(
  20571.                         Stream : access Ada.Streams.Root_Stream_Type'Class;
  20572.                         Item : in T)
  20573.  
  20574.         b. S'Output writes the value of Item to Stream, including any bounds or 
  20575.            discriminants. 
  20576.  
  20577.    1. S'Input 
  20578.  
  20579.                       S'Input denotes a function with the following specification:
  20580.  
  20581.                    a.
  20582.  
  20583.                       function S'Input(
  20584.                         Stream : access Ada.Streams.Root_Stream_Type'Class)
  20585.                         return T
  20586.  
  20587.         b. S'Input reads and returns one value from Stream, using any bounds or 
  20588.            discriminants written by a corresponding S'Output to determine how 
  20589.            much to read. 
  20590.  
  20591.    1. Unless overridden by an attribute_definition_clause, these subprograms 
  20592.       execute as follows: 
  20593.  
  20594.         a. If T is an array type, S'Output first writes the bounds, and S'Input 
  20595.            first reads the bounds. If T has discriminants without defaults, 
  20596.            S'Output first writes the discriminants (using S'Write for each), 
  20597.            and S'Input first reads the discriminants (using S'Read for each). 
  20598.  
  20599.         b. S'Output then calls S'Write to write the value of Item to the 
  20600.            stream. S'Input then creates an object (with the bounds or 
  20601.            discriminants, if any, taken from the stream), initializes it with 
  20602.            S'Read, and returns the value of the object. 
  20603.  
  20604.    1. For every subtype S'Class of a class-wide type T'Class: 
  20605.  
  20606.    2. S'Class'Output 
  20607.  
  20608.                       S'Class'Output denotes a procedure with the following
  20609.                       specification:
  20610.  
  20611.                    a.
  20612.  
  20613.                       procedure S'Class'Output(
  20614.                         Stream : access Ada.Streams.Root_Stream_Type'Class;
  20615.                         Item  : in T'Class)
  20616.  
  20617.         b. First writes the external tag of Item to Stream (by calling 
  20618.            String'Output(Tags.External_Tag(Item'Tag) --  see 3.9.) and then 
  20619.            dispatches to the subprogram denoted by the Output attribute of the 
  20620.            specific type identified by the tag. 
  20621.  
  20622.    1. S'Class'Input 
  20623.  
  20624.                       S'Class'Input denotes a function with the following
  20625.                       specification:
  20626.  
  20627.                    a.
  20628.  
  20629.                       function S'Class'Input(
  20630.                         Stream : access Ada.Streams.Root_Stream_Type'Class)
  20631.                         return T'Class
  20632.  
  20633.         b. First reads the external tag from Stream and determines the 
  20634.            corresponding internal tag (by calling 
  20635.            Tags.Internal_Tag(String'Input(Stream)) --  see 3.9.) and then 
  20636.            dispatches to the subprogram denoted by the Input attribute of the 
  20637.            specific type identified by the internal tag; returns that result. 
  20638.  
  20639.    1. In the default implementation of Read and Input for a composite type, for 
  20640.       each scalar component that is a discriminant or whose 
  20641.       component_declaration includes a default_expression, a check is made that 
  20642.       the value returned by Read for the component belongs to its subtype. 
  20643.       Constraint_Error is raised if this check fails. For other scalar 
  20644.       components, no check is made. For each component that is of an access 
  20645.       type, if the implementation can detect that the value returned by Read 
  20646.       for the component is not a value of its subtype, Constraint_Error is 
  20647.       raised. If the value is not a value of its subtype and this error is not 
  20648.       detected, the component has an abnormal value, and erroneous execution 
  20649.       can result, see 13.9.1. 
  20650.  
  20651.    2. The stream-oriented attributes may be specified for any type via an 
  20652.       attribute_definition_clause. All nonlimited types have default 
  20653.       implementations for these operations. An attribute_reference for one of 
  20654.       these attributes is illegal if the type is limited, unless the attribute 
  20655.       has been specified by an attribute_definition_clause. For an 
  20656.       attribute_definition_clause specifying one of these attributes, the 
  20657.       subtype of the Item parameter shall be the base subtype if scalar, and 
  20658.       the first subtype otherwise. The same rule applies to the result of the 
  20659.       Input function. 
  20660.  
  20661.       NOTES 
  20662.  
  20663.    3. (31) For a definite subtype S of a type T, only T'Write and T'Read are 
  20664.       needed to pass an arbitrary value of the subtype through a stream. For an 
  20665.       indefinite subtype S of a type T, T'Output and T'Input will normally be 
  20666.       needed, since T'Write and T'Read do not pass bounds, discriminants, or 
  20667.       tags. 
  20668.  
  20669.    4. (32) User-specified attributes of S'Class are not inherited by other 
  20670.       class-wide types descended from S. 
  20671.  
  20672.             Examples
  20673.  
  20674.    5. Example of user-defined Write attribute: 
  20675.  
  20676.          6.
  20677.  
  20678.                       procedure My_Write
  20679.                        (Stream : access Ada.Streams.Root_Stream_Type'Class;
  20680.                         Item  : My_Integer'Base);
  20681.                       for My_Integer'Write use My_Write;
  20682.  
  20683.  
  20684. ΓòÉΓòÉΓòÉ 16.14. Freezing Rules ΓòÉΓòÉΓòÉ
  20685.  
  20686.    1. This clause defines a place in the program text where each declared 
  20687.       entity becomes ``frozen.'' A use of an entity, such as a reference to it 
  20688.       by name, or (for a type) an expression of the type, causes freezing of 
  20689.       the entity in some contexts, as described below. The Legality Rules 
  20690.       forbid certain kinds of uses of an entity in the region of text where it 
  20691.       is frozen. 
  20692.  
  20693.    2. The freezing of an entity occurs at one or more places (freezing points) 
  20694.       in the program text where the representation for the entity has to be 
  20695.       fully determined. Each entity is frozen from its first freezing point to 
  20696.       the end of the program text (given the ordering of compilation units 
  20697.       defined in 10.1.4. 
  20698.  
  20699.    3. The end of a declarative_part, protected_body, or a declaration of a 
  20700.       library package or generic library package, causes freezing of each 
  20701.       entity declared within it, except for incomplete types. A noninstance 
  20702.       body causes freezing of each entity declared before it within the same 
  20703.       declarative_part. 
  20704.  
  20705.    4. A construct that (explicitly or implicitly) references an entity can 
  20706.       cause the freezing of the entity, as defined by subsequent paragraphs. At 
  20707.       the place where a construct causes freezing, each name, expression, or 
  20708.       range within the construct causes freezing: 
  20709.  
  20710.         a. The occurrence of a generic_instantiation causes freezing; also, if 
  20711.            a parameter of the instantiation is defaulted, the 
  20712.            default_expression or default_name for that parameter causes 
  20713.            freezing. 
  20714.  
  20715.         b. The occurrence of an object_declaration that has no corresponding 
  20716.            completion causes freezing. 
  20717.  
  20718.         c. The declaration of a record extension causes freezing of the parent 
  20719.            subtype. 
  20720.  
  20721.    1. A static expression causes freezing where it occurs. A nonstatic 
  20722.       expression causes freezing where it occurs, unless the expression is part 
  20723.       of a default_expression, a default_name, or a per-object expression of a 
  20724.       component's constraint, in which case, the freezing occurs later as part 
  20725.       of another construct. 
  20726.  
  20727.    2. The following rules define which entities are frozen at the place where a 
  20728.       construct causes freezing: 
  20729.  
  20730.         a. At the place where an expression causes freezing, the type of the 
  20731.            expression is frozen, unless the expression is an enumeration 
  20732.            literal used as a discrete_choice of the array_aggregate of an 
  20733.            enumeration_representation_clause. 
  20734.  
  20735.         b. At the place where a name causes freezing, the entity denoted by the 
  20736.            name is frozen, unless the name is a prefix of an expanded name; at 
  20737.            the place where an object name causes freezing, the nominal subtype 
  20738.            associated with the name is frozen. 
  20739.  
  20740.         c. At the place where a range causes freezing, the type of the range is 
  20741.            frozen. 
  20742.  
  20743.         d. At the place where an allocator causes freezing, the designated 
  20744.            subtype of its type is frozen. If the type of the allocator is a 
  20745.            derived type, then all ancestor types are also frozen. 
  20746.  
  20747.         e. At the place where a callable entity is frozen, each subtype of its 
  20748.            profile is frozen. If the callable entity is a member of an entry 
  20749.            family, the index subtype of the family is frozen. At the place 
  20750.            where a function call causes freezing, if a parameter of the call is 
  20751.            defaulted, the default_expression for that parameter causes 
  20752.            freezing. 
  20753.  
  20754.         f. At the place where a subtype is frozen, its type is frozen. At the 
  20755.            place where a type is frozen, any expressions or names within the 
  20756.            full type definition cause freezing; the first subtype, and any 
  20757.            component subtypes, index subtypes, and parent subtype of the type 
  20758.            are frozen as well. For a specific tagged type, the corresponding 
  20759.            class-wide type is frozen as well. For a class-wide type, the 
  20760.            corresponding specific type is frozen as well. 
  20761.  
  20762.   Legality Rules
  20763.  
  20764.    1. The explicit declaration of a primitive subprogram of a tagged type shall 
  20765.       occur before the type is frozen, see 3.9.2. 
  20766.  
  20767.    2. A type shall be completely defined before it is frozen (see 3.11.1, and 
  20768.       7.3.). 
  20769.  
  20770.    3. The completion of a deferred constant declaration shall occur before the 
  20771.       constant is frozen, see 7.4. 
  20772.  
  20773.    4. A representation item that directly specifies an aspect of an entity 
  20774.       shall appear before the entity is frozen, see 13.1. 
  20775.  
  20776.  
  20777. ΓòÉΓòÉΓòÉ 17. Predefined Language Environment (normative) ΓòÉΓòÉΓòÉ
  20778.  
  20779.    1. This Annex contains the specifications of library units that shall be 
  20780.       provided by every implementation. There are three root library units: 
  20781.       Ada, Interfaces, and System; other library units are children of these: 
  20782.  
  20783.          2.
  20784.  
  20785.                       Standard --  see A.1.
  20786.                        Ada --  see A.2.
  20787.                          Asynchronous_Task_Control --  see D.11.
  20788.                          Calendar --  see 9.6.
  20789.                          Characters --  see A.3.1.
  20790.                           Handling --  see A.3.2.
  20791.                           Latin_1 --  see A.3.3.
  20792.                          Command_Line --  see A.15.
  20793.                          Decimal --  see F.2.
  20794.                          Direct_IO --  see A.8.4.
  20795.                          Dynamic_Priorities --  see D.5.
  20796.                          Exceptions --  see 11.4.1.
  20797.                          Finalization --  see 7.6.
  20798.                          Interrupts --  see C.3.2.
  20799.                           Names --  see C.3.2.
  20800.                          IO_Exceptions --  see A.13.
  20801.                          Numerics --  see A.5.
  20802.                           Complex_Elementary_Functions --  see G.1.2.
  20803.                           Complex_Types --  see G.1.1.
  20804.                           Discrete_Random --  see A.5.2.
  20805.                           Elementary_Functions --  see A.5.1.
  20806.                           Float_Random --  see A.5.2.
  20807.                           Generic_Complex_Elementary_Functions --  see G.1.2.
  20808.                           Generic_Complex_Types --  see G.1.1.
  20809.                           Generic_Elementary_Functions --  see A.5.1.
  20810.                          Real_Time --  see D.8.
  20811.                          Sequential_IO --  see A.8.1.
  20812.                          Storage_IO --  see A.9.
  20813.                          Streams --  see 13.13.1.
  20814.                           Stream_IO --  see A.12.1.
  20815.                          Strings --  see A.4.1.
  20816.                           Bounded --  see A.4.4.
  20817.                           Fixed --  see A.4.3.
  20818.                           Maps --  see A.4.2.
  20819.                             Constants --  see A.4.6.
  20820.                           Unbounded --  see A.4.5.
  20821.                           Wide_Bounded --  see A.4.7.
  20822.                           Wide_Fixed --  see A.4.7.
  20823.                           Wide_Maps --  see A.4.7.
  20824.                             Wide_Constants --  see A.4.7.
  20825.                           Wide_Unbounded --  see A.4.7.
  20826.                       Standard (┬╖┬╖┬╖continued)
  20827.                        Ada (┬╖┬╖┬╖continued)
  20828.                          Synchronous_Task_Control --  see D.10.
  20829.                          Tags --  see 3.9.
  20830.                          Task_Attributes --  see C.7.2.
  20831.                          Task_Identification --  see C.7.1.
  20832.                          Text_IO --  see A.10.1.
  20833.                           Complex_IO --  see G.1.3.
  20834.                           Editing --  see F.3.3.
  20835.                           Text_Streams --  see A.12.2.
  20836.                          Unchecked_Conversion --  see 13.9.
  20837.                          Unchecked_Deallocation --  see 13.11.2.
  20838.                          Wide_Text_IO --  see A.11.
  20839.                           Complex_IO --  see G.1.3.
  20840.                           Editing --  see F.3.4.
  20841.                           Text_Streams --  see A.12.3.
  20842.                        Interfaces --  see B.2.
  20843.                          C --  see B.3.
  20844.                           Pointers --  see B.3.2.
  20845.                           Strings --  see B.3.1.
  20846.                          COBOL --  see B.4.
  20847.                          Fortran --  see B.5.
  20848.                        System --  see 13.7.
  20849.                          Address_To_Access_Conversions --  see 13.7.2.
  20850.                          Machine_Code --  see 13.8.
  20851.                          RPC --  see E.5.
  20852.                          Storage_Elements --  see 13.7.1.
  20853.                          Storage_Pools --  see 13.11.
  20854.  
  20855.   Implementation Requirements
  20856.  
  20857.    3. The implementation shall ensure that each language defined subprogram is 
  20858.       reentrant in the sense that concurrent calls on the same subprogram 
  20859.       perform as specified, so long as all parameters that could be passed by 
  20860.       reference denote nonoverlapping objects. 
  20861.  
  20862.             Implementation Permissions
  20863.  
  20864.    4. The implementation may restrict the replacement of language-defined 
  20865.       compilation units. The implementation may restrict children of 
  20866.       language-defined library units (other than Standard). 
  20867.  
  20868.  A.1                           The Package Standard 
  20869.  A.2                           The Package Ada 
  20870.  A.3                           Character Handling 
  20871.  A.4                           String Handling 
  20872.  A.5                           The Numerics Packages 
  20873.  A.6                           Input-Output 
  20874.  A.7                           External Files and File Objects 
  20875.  A.8                           Sequential and Direct Files 
  20876.  A.9                           The Generic Package Storage_IO 
  20877.  A.10                          Text Input-Output 
  20878.  A.11                          Wide Text Input-Output 
  20879.  A.12                          Stream Input-Output 
  20880.  A.13                          Exceptions in Input-Output 
  20881.  A.14                          File Sharing 
  20882.  A.15                          The Package Command_Line --- The Detailed Node 
  20883.                                Listing --- 
  20884.  A.1                           The Package Standard 
  20885.  A.2                           The Package Ada 
  20886.  A.3                           Character Handling 
  20887.  A.3.1                         The Package Characters 
  20888.  A.3.2                         The Package Characters.Handling 
  20889.  A.3.3                         The Package Characters.Latin_1 
  20890.  A.4                           String Handling 
  20891.  A.4.1                         The Package Strings 
  20892.  A.4.2                         The Package Strings.Maps 
  20893.  A.4.3                         Fixed-Length String Handling 
  20894.  A.4.4                         Bounded-Length String Handling 
  20895.  A.4.5                         Unbounded-Length String Handling 
  20896.  A.4.6                         String-Handling Sets and Mappings 
  20897.  A.4.7                         Wide_String Handling 
  20898.  A.5                           The Numerics Packages 
  20899.  A.5.1                         Elementary Functions 
  20900.  A.5.2                         Random Number Generation 
  20901.  A.5.3                         Attributes of Floating Point Types 
  20902.  A.5.4                         Attributes of Fixed Point Types 
  20903.  A.6                           Input-Output 
  20904.  A.7                           External Files and File Objects 
  20905.  A.8                           Sequential and Direct Files 
  20906.  A.8.1                         The Generic Package Sequential_IO 
  20907.  A.8.2                         File Management 
  20908.  A.8.3                         Sequential Input-Output Operations 
  20909.  A.8.4                         The Generic Package Direct_IO 
  20910.  A.8.5                         Direct Input-Output Operations 
  20911.  A.9                           The Generic Package Storage_IO 
  20912.  A.10                          Text Input-Output 
  20913.  A.10.1                        The Package Text_IO 
  20914.  A.10.2                        Text File Management 
  20915.  A.10.3                        Default Input, Output, and Error Files 
  20916.  A.10.4                        Specification of Line and Page Lengths 
  20917.  A.10.5                        Operations on Columns, Lines, and Pages 
  20918.  A.10.6                        Get and Put Procedures 
  20919.  A.10.7                        Input-Output of Characters and Strings 
  20920.  A.10.8                        Input-Output for Integer Types 
  20921.  A.10.9                        Input-Output for Real Types 
  20922.  A.10.10                       Input-Output for Enumeration Types 
  20923.  A.11                          Wide Text Input-Output 
  20924.  A.12                          Stream Input-Output 
  20925.  A.12.1                        The Package Streams.Stream_IO 
  20926.  A.12.2                        The Package Text_IO.Text_Streams 
  20927.  A.12.3                        The Package Wide_Text_IO.Text_Streams 
  20928.  A.13                          Exceptions in Input-Output 
  20929.  A.14                          File Sharing 
  20930.  A.15                          The Package Command_Line 
  20931.  
  20932.  
  20933. ΓòÉΓòÉΓòÉ 17.1. The Package Standard ΓòÉΓòÉΓòÉ
  20934.  
  20935.    1. This clause outlines the specification of the package Standard containing 
  20936.       all predefined identifiers in the language. The corresponding package 
  20937.       body is not specified by the language. 
  20938.  
  20939.    2. The operators that are predefined for the types declared in the package 
  20940.       Standard are given in comments since they are implicitly declared. 
  20941.       Italics are used for pseudo-names of anonymous types (such as root_real) 
  20942.       and for undefined information (such as implementation-defined). 
  20943.  
  20944.             Static Semantics
  20945.  
  20946.    3. The library package Standard has the following declaration: 
  20947.  
  20948.          4.
  20949.  
  20950.                       package Standard is
  20951.                         pragma Pure(Standard);
  20952.  
  20953.          5.
  20954.  
  20955.                         type Boolean is (False, True);
  20956.  
  20957.          6.
  20958.  
  20959.                         --  The predefined relational operators
  20960.                         --  for this type are as follows:
  20961.  
  20962.          7.
  20963.  
  20964.                         -- function "="  (Left, Right : Boolean) return Boolean;
  20965.                         -- function "/="  (Left, Right : Boolean) return Boolean;
  20966.                         -- function "<"  (Left, Right : Boolean) return Boolean;
  20967.                         -- function "<="  (Left, Right : Boolean) return Boolean;
  20968.                         -- function ">"  (Left, Right : Boolean) return Boolean;
  20969.                         -- function ">="  (Left, Right : Boolean) return Boolean;
  20970.  
  20971.          8.
  20972.  
  20973.                         --  The predefined logical operators and the predefined
  20974.                         --  logical negation operator are as follows:
  20975.  
  20976.          9.
  20977.  
  20978.                         --  function "and" (Left, Right : Boolean) return Boolean;
  20979.                         --  function "or"  (Left, Right : Boolean) return Boolean;
  20980.                         --  function "xor" (Left, Right : Boolean) return Boolean;
  20981.  
  20982.         10.
  20983.  
  20984.                         --  function "not" (Right : Boolean) return Boolean;
  20985.  
  20986.         11.
  20987.  
  20988.                         --  The integer type root_integer is predefined.
  20989.                         --  The corresponding universal type is universal_integer.
  20990.  
  20991.         12.
  20992.  
  20993.                         type Integer is range implementation-defined;
  20994.  
  20995.         13.
  20996.  
  20997.                         subtype Natural  is Integer range 0 ┬╖┬╖ Integer'Last;
  20998.                         subtype Positive is Integer range 1 ┬╖┬╖ Integer'Last;
  20999.  
  21000.         14.
  21001.  
  21002.                         --  The predefined operators for type Integer are as follows:
  21003.  
  21004.         15.
  21005.  
  21006.                         --  function "="  (Left, Right : Integer'Base) return Boolean;
  21007.                         --  function "/=" (Left, Right : Integer'Base) return Boolean;
  21008.                         --  function "<"  (Left, Right : Integer'Base) return Boolean;
  21009.                         --  function "<=" (Left, Right : Integer'Base) return Boolean;
  21010.                         --  function ">"  (Left, Right : Integer'Base) return Boolean;
  21011.                         --  function ">=" (Left, Right : Integer'Base) return Boolean;
  21012.  
  21013.         16.
  21014.  
  21015.                         --  function "+"  (Right : Integer'Base) return Integer'Base;
  21016.                         --  function "-"  (Right : Integer'Base) return Integer'Base;
  21017.                         --  function "abs" (Right : Integer'Base) return Integer'Base;
  21018.  
  21019.         17.
  21020.  
  21021.                         --  function "+"  (Left, Right : Integer'Base)
  21022.                         --   return Integer'Base;
  21023.                         --  function "-"  (Left, Right : Integer'Base)
  21024.                         --   return Integer'Base;
  21025.                         --  function "*"  (Left, Right : Integer'Base)
  21026.                         --   return Integer'Base;
  21027.                         --  function "/"  (Left, Right : Integer'Base)
  21028.                         --   return Integer'Base;
  21029.                         --  function "rem" (Left, Right : Integer'Base)
  21030.                         --   return Integer'Base;
  21031.                         --  function "mod" (Left, Right : Integer'Base)
  21032.                         --   return Integer'Base;
  21033.  
  21034.         18.
  21035.  
  21036.                         --  function "**"
  21037.                          (Left  : Integer'Base;
  21038.                          Right : Natural) return Integer'Base;
  21039.  
  21040.         19.
  21041.  
  21042.                         --  The specification of each operator for the type
  21043.                         --  root_integer, or for any additional predefined integer
  21044.                         --  type, is obtained by replacing Integer by the name of the type
  21045.                         --  in the specification of the corresponding operator of the type
  21046.                         --  Integer. The right operand of the exponentiation operator
  21047.                         --  remains as subtype Natural.
  21048.  
  21049.         20.
  21050.  
  21051.                         --  The floating point type root_real is predefined.
  21052.                         --  The corresponding universal type is universal_real.
  21053.  
  21054.         21.
  21055.  
  21056.                         type Float is digits implementation-defined;
  21057.  
  21058.         22.
  21059.  
  21060.                         --  The predefined operators for this type are as follows:
  21061.  
  21062.         23.
  21063.  
  21064.                         --  function "="  (Left, Right : Float) return Boolean;
  21065.                         --  function "/="  (Left, Right : Float) return Boolean;
  21066.                         --  function "<"  (Left, Right : Float) return Boolean;
  21067.                         --  function "<="  (Left, Right : Float) return Boolean;
  21068.                         --  function ">"  (Left, Right : Float) return Boolean;
  21069.                         --  function ">="  (Left, Right : Float) return Boolean;
  21070.  
  21071.         24.
  21072.  
  21073.                         --  function "+"  (Right : Float) return Float;
  21074.                         --  function "-"  (Right : Float) return Float;
  21075.                         --  function "abs" (Right : Float) return Float;
  21076.  
  21077.         25.
  21078.  
  21079.                         --  function "+"  (Left, Right : Float) return Float;
  21080.                         --  function "-"  (Left, Right : Float) return Float;
  21081.                         --  function "*"  (Left, Right : Float) return Float;
  21082.                         --  function "/"  (Left, Right : Float) return Float;
  21083.  
  21084.         26.
  21085.  
  21086.                         --  function "**"
  21087.                          (Left  : Float;
  21088.                          Right : Integer'Base) return Float;
  21089.  
  21090.         27.
  21091.  
  21092.                         --  The specification of each operator for the type root_real,
  21093.                         --  or  for any additional predefined floating point type, is
  21094.                         --  obtained by replacing Float by the name of the type in the
  21095.                         --  specification of the corresponding operator of the type Float.
  21096.  
  21097.         28.
  21098.  
  21099.                         --  In addition, the following operators are predefined for
  21100.                         --  the root numeric types:
  21101.  
  21102.         29.
  21103.  
  21104.                         function "*" (Left : root_integer; Right : root_real)
  21105.                          return root_real;
  21106.  
  21107.         30.
  21108.  
  21109.                         function "*" (Left : root_real; Right : root_integer)
  21110.                          return root_real;
  21111.  
  21112.         31.
  21113.  
  21114.                         function "/" (Left : root_real; Right : root_integer)
  21115.                          return root_real;
  21116.  
  21117.         32.
  21118.  
  21119.                         --  The type universal_fixed is predefined.
  21120.                         --  The only multiplying operators defined between
  21121.                         --  fixed point types are
  21122.  
  21123.         33.
  21124.  
  21125.                         function "*" (Left : universal_fixed; Right : universal_fixed)
  21126.                          return universal_fixed;
  21127.  
  21128.         34.
  21129.  
  21130.                         function "/" (Left : universal_fixed; Right : universal_fixed)
  21131.                          return universal_fixed;
  21132.                         --  The declaration of type Character is based on the standard
  21133.                         --  ISO 8859-1 character set.
  21134.  
  21135.         35.
  21136.  
  21137.                         --  There are no character literals corresponding to the
  21138.                         --  positions for control characters. They are indicated in
  21139.                         --  italics in this definition (see 3.5.2).
  21140.                         type Character is
  21141.                          (nul,  soh,  stx,  etx, eot,  enq,  ack,  bel,
  21142.                          bs,  ht,  lf,  vt,  ff,  cr,  so,  si,
  21143.                          dle,  dc1,  dc2,  dc3, dc4,  nak,  syn,  etb,
  21144.                          can,  em,  sub,  esc, fs,  gs,  rs,  us,
  21145.                          ' ',  '!',  '"',  '#', '$',  '%',  '&',  ''',
  21146.                          '(',  ')',  '*',  '+', ',',  '-',  '.',  '/',
  21147.                          '0',  '1',  '2',  '3', '4',  '5',  '6',  '7',
  21148.                          '8',  '9',  ':',  ';', '<',  '=',  '>',  '?',
  21149.                          '@',  'A',  'B',  'C', 'D',  'E',  'F',  'G',
  21150.                          'H',  'I',  'J',  'K', 'L',  'M',  'N',  'O',
  21151.                          'P',  'Q',  'R',  'S', 'T',  'U',  'V',  'W',
  21152.                          'X',  'Y',  'Z',  '[', '\',  ']',  '^',  '_',
  21153.                          ' `',  'a',  'b',  'c', 'd',  'e',  'f',  'g',
  21154.                          'h',  'i',  'j',  'k', 'l',  'm',  'n',  'o',
  21155.                          'p',  'q',  'r',  's', 't',  'u',  'v',  'w',
  21156.                          'x',  'y',  'z',  '{', '|',  '}',  '~',  del,
  21157.                          reserved_128, reserved_129,  bph,  nbh,
  21158.                          reserved_132, nel,   ssa,  esa,
  21159.                          hts, htj, vts, pld, plu, ri, ss2, ss3,
  21160.                          dcs, pu1, pu2, sts, cch, mw, spa, epa,
  21161.                          sos, reserved_153, sci, csi,
  21162.                          st,  osc,      pm,  apc,
  21163.                         ┬╖┬╖┬╖ );
  21164.  
  21165.         36.
  21166.  
  21167.                         --  The predefined operators for the type Character are the
  21168.                         --  same as for any enumeration type.
  21169.                         --  The declaration of type Wide_Character is based on the
  21170.                         --  standard ISO 10646 BMP character set. The first 256 positions
  21171.                         --  have the same contents as type Character (see 3.5.2).
  21172.                         type Wide_Character is (nul, soh ┬╖┬╖┬╖ FFFE, FFFF);
  21173.                         package ASCII is ┬╖┬╖┬╖ end ASCII;  --Obsolescent;  (see J.5).
  21174.                         -- Predefined string types:
  21175.  
  21176.         37.
  21177.  
  21178.                         type String is array(Positive range <>) of Character;
  21179.                         pragma Pack(String);
  21180.  
  21181.         38.
  21182.  
  21183.                         -- The predefined operators for this type are as follows:
  21184.  
  21185.         39.
  21186.  
  21187.                         --  function "="  (Left, Right: String) return Boolean;
  21188.                         --  function "/=" (Left, Right: String) return Boolean;
  21189.                         --  function "<"  (Left, Right: String) return Boolean;
  21190.                         --  function "<=" (Left, Right: String) return Boolean;
  21191.                         --  function ">"  (Left, Right: String) return Boolean;
  21192.                         --  function ">=" (Left, Right: String) return Boolean;
  21193.  
  21194.         40.
  21195.  
  21196.                         --  function "&" (Left: String;   Right: String)
  21197.                         --   return String;
  21198.                         --  function "&" (Left: Character; Right: String)
  21199.                         --   return String;
  21200.                         --  function "&" (Left: String;   Right: Character)
  21201.                         --   return String;
  21202.                         --  function "&" (Left: Character; Right: Character)
  21203.                         --   return String;
  21204.  
  21205.         41.
  21206.  
  21207.                         type Wide_String is array(Positive range <>) of Wide_Character;
  21208.                         pragma Pack(Wide_String);
  21209.  
  21210.         42.
  21211.  
  21212.                         --  The predefined operators for this type correspond to those
  21213.                         --  for String
  21214.  
  21215.         43.
  21216.  
  21217.                         type Duration is delta
  21218.                          implementation-defined range implementation-defined;
  21219.  
  21220.         44.
  21221.  
  21222.                         --  The predefined operators for the type Duration are the
  21223.                         --  same as for any fixed point type.
  21224.  
  21225.         45.
  21226.  
  21227.                         -- The predefined exceptions:
  21228.  
  21229.         46.
  21230.  
  21231.                         Constraint_Error: exception;
  21232.                         Program_Error  : exception;
  21233.                         Storage_Error  : exception;
  21234.                         Tasking_Error  : exception;
  21235.  
  21236.         47.
  21237.  
  21238.                       end Standard;
  21239.  
  21240.   48. Standard has no private part. 
  21241.  
  21242.   49. In each of the types Character and Wide_Character, the character literals 
  21243.       for the space character (position 32) and the non-breaking space 
  21244.       character (position 160) correspond to different values. Unless indicated 
  21245.       otherwise, each occurrence of the character literal ' ' in this 
  21246.       International Standard refers to the space character. Similarly, the 
  21247.       character literals for hyphen (position 45) and soft hyphen (position 
  21248.       173) correspond to different values. Unless indicated otherwise, each 
  21249.       occurrence of the character literal '-' in this International Standard 
  21250.       refers to the hyphen character. 
  21251.  
  21252.             Dynamic Semantics
  21253.  
  21254.   50. Elaboration of the body of Standard has no effect. 
  21255.  
  21256.             Implementation Permissions
  21257.  
  21258.   51. An implementation may provide additional predefined integer types and 
  21259.       additional predefined floating point types. Not all of these types need 
  21260.       have names. 
  21261.  
  21262.             Implementation Advice
  21263.  
  21264.   52. If an implementation provides additional named predefined integer types, 
  21265.       then the names should end with ``Integer'' as in ``Long_Integer''. If an 
  21266.       implementation provides additional named predefined floating point types, 
  21267.       then the names should end with ``Float'' as in ``Long_Float''. 
  21268.  
  21269.       NOTES 
  21270.  
  21271.   53. (1) Certain aspects of the predefined entities cannot be completely 
  21272.       described in the language itself. For example, although the enumeration 
  21273.       type Boolean can be written showing the two enumeration literals False 
  21274.       and True, the short-circuit control forms cannot be expressed in the 
  21275.       language. 
  21276.  
  21277.   54. (2) As explained in 8.1: ``Declarative Region'', and 10.1.4: ``The 
  21278.       Compilation Process'', the declarative region of the package Standard 
  21279.       encloses every library unit and consequently the main subprogram; the 
  21280.       declaration of every library unit is assumed to occur within this 
  21281.       declarative region. Library_items are assumed to be ordered in such a way 
  21282.       that there are no forward semantic dependences. However, as explained in 
  21283.       8.3: ``Visibility'', the only library units that are visible within a 
  21284.       given compilation unit are the library units named by all with_clauses 
  21285.       that apply to the given unit, and moreover, within the declarative region 
  21286.       of a given library unit, that library unit itself. 
  21287.  
  21288.   55. (3) If all block_statements of a program are named, then the name of each 
  21289.       program unit can always be written as an expanded name starting with 
  21290.       Standard (unless Standard is itself hidden). The name of a library unit 
  21291.       cannot be a homograph of a name (such as Integer) that is already 
  21292.       declared in Standard. 
  21293.  
  21294.   56. (4) The exception Standard.Numeric_Error is defined in J.6. 
  21295.  
  21296.  
  21297. ΓòÉΓòÉΓòÉ 17.2. The Package Ada ΓòÉΓòÉΓòÉ
  21298.  
  21299.  
  21300.   Static Semantics
  21301.  
  21302.    1. The following language-defined library package exists: 
  21303.  
  21304.          2.
  21305.  
  21306.                       package Ada is
  21307.                         pragma Pure(Ada);
  21308.                       end Ada;
  21309.  
  21310.    3. Ada serves as the parent of most of the other language-defined library 
  21311.       units; its declaration is empty (except for the pragma Pure). 
  21312.  
  21313.             Legality Rules
  21314.  
  21315.    4. In the standard mode, it is illegal to compile a child of package Ada. 
  21316.  
  21317.  
  21318. ΓòÉΓòÉΓòÉ 17.3. Character Handling ΓòÉΓòÉΓòÉ
  21319.  
  21320.    1. This clause presents the packages related to character processing: an 
  21321.       empty pure package Characters and child packages Characters.Handling and 
  21322.       Characters.Latin_1. The package Characters.Handling provides 
  21323.       classification and conversion functions for Character data, and some 
  21324.       simple functions for dealing with Wide_Character data. The child package 
  21325.       Characters.Latin_1 declares a set of constants initialized to values of 
  21326.       type Character. 
  21327.  
  21328.  A.3.1                         The Package Characters 
  21329.  A.3.2                         The Package Characters.Handling 
  21330.  A.3.3                         The Package Characters.Latin_1 
  21331.  
  21332.  
  21333. ΓòÉΓòÉΓòÉ 17.3.1. The Package Characters ΓòÉΓòÉΓòÉ
  21334.  
  21335.  
  21336.   Static Semantics
  21337.  
  21338.    1. The library package Characters has the following declaration: 
  21339.  
  21340.          2.
  21341.  
  21342.                       package Ada.Characters is
  21343.                        pragma Pure(Characters);
  21344.                       end Ada.Characters;
  21345.  
  21346.  
  21347. ΓòÉΓòÉΓòÉ 17.3.2. The Package Characters.Handling ΓòÉΓòÉΓòÉ
  21348.  
  21349.  
  21350.   Static Semantics
  21351.  
  21352.    1. The library package Characters.Handling has the following declaration: 
  21353.  
  21354.          2.
  21355.  
  21356.                       package Ada.Characters.Handling is
  21357.                        pragma Preelaborate(Handling);
  21358.  
  21359.          3.
  21360.  
  21361.                         --  Character classification functions
  21362.  
  21363.          4.
  21364.  
  21365.                         function Is_Control      (Item : in Character) return Boolean;
  21366.                        function Is_Graphic      (Item : in Character) return Boolean;
  21367.                        function Is_Letter       (Item : in Character) return Boolean;
  21368.                        function Is_Lower       (Item : in Character) return Boolean;
  21369.                        function Is_Upper       (Item : in Character) return Boolean;
  21370.                        function Is_Basic       (Item : in Character) return Boolean;
  21371.                        function Is_Digit       (Item : in Character) return Boolean;
  21372.                        function Is_Decimal_Digit   (Item : in Character) return Boolean
  21373.                         renames Is_Digit;
  21374.                        function Is_Hexadecimal_Digit (Item : in Character) return Boolean;
  21375.                        function Is_Alphanumeric    (Item : in Character) return Boolean;
  21376.                        function Is_Special      (Item : in Character) return Boolean;
  21377.  
  21378.          5.
  21379.  
  21380.                         --  Conversion functions for Character and String
  21381.  
  21382.          6.
  21383.  
  21384.                         function To_Lower (Item : in Character) return Character;
  21385.                        function To_Upper (Item : in Character) return Character;
  21386.                        function To_Basic (Item : in Character) return Character;
  21387.  
  21388.          7.
  21389.  
  21390.                         function To_Lower (Item : in String) return String;
  21391.                        function To_Upper (Item : in String) return String;
  21392.                        function To_Basic (Item : in String) return String;
  21393.  
  21394.          8.
  21395.  
  21396.                         --  Classifications of and conversions
  21397.                        --  between Character and ISO 646
  21398.  
  21399.          9.
  21400.  
  21401.                         subtype ISO_646 is
  21402.                         Character range Character'Val(0) ┬╖┬╖ Character'Val(127);
  21403.  
  21404.         10.
  21405.  
  21406.                         function Is_ISO_646 (Item : in Character) return Boolean;
  21407.                        function Is_ISO_646 (Item : in String)   return Boolean;
  21408.  
  21409.         11.
  21410.  
  21411.                         function To_ISO_646 (Item    : in Character;
  21412.                                   Substitute : in ISO_646 := ' ')
  21413.                         return ISO_646;
  21414.  
  21415.         12.
  21416.  
  21417.                         function To_ISO_646 (Item    : in String;
  21418.                                   Substitute : in ISO_646 := ' ')
  21419.                         return String;
  21420.  
  21421.         13.
  21422.  
  21423.                         --  Classifications of and conversions
  21424.                        --  between Wide_Character and Character.
  21425.  
  21426.         14.
  21427.  
  21428.                        function Is_Character (Item : in Wide_Character) return Boolean;
  21429.                        function Is_String   (Item : in Wide_String)   return Boolean;
  21430.  
  21431.         15.
  21432.  
  21433.                         function To_Character (Item    : in Wide_Character;
  21434.                                    Substitute : in Character := ' ')
  21435.                         return Character;
  21436.  
  21437.         16.
  21438.  
  21439.                         function To_String (Item    : in Wide_String;
  21440.                                  Substitute : in Character := ' ')
  21441.                         return String;
  21442.  
  21443.         17.
  21444.  
  21445.                         function To_Wide_Character (Item : in Character)
  21446.                         return Wide_Character;
  21447.  
  21448.         18.
  21449.  
  21450.                         function To_Wide_String (Item : in String) return Wide_String;
  21451.  
  21452.         19.
  21453.  
  21454.                       end Ada.Characters.Handling;
  21455.  
  21456.   20. In the description below for each function that returns a Boolean result, 
  21457.       the effect is described in terms of the conditions under which the value 
  21458.       True is returned. If these conditions are not met, then the function 
  21459.       returns False. 
  21460.  
  21461.   21. Each of the following classification functions has a formal Character 
  21462.       parameter, Item, and returns a Boolean result. 
  21463.  
  21464.   22. Is_Control 
  21465.  
  21466.                       True if Item is a control character. A control character is
  21467.                       a character whose position is in one of the ranges 0┬╖┬╖31 or
  21468.                       127┬╖┬╖159.
  21469.  
  21470.   23. Is_Graphic 
  21471.  
  21472.                       True if Item is a graphic character. A graphic character is
  21473.                       a character whose position is in one of the ranges 32┬╖┬╖126 or
  21474.                       160┬╖┬╖255.
  21475.  
  21476.   24. Is_Letter 
  21477.  
  21478.                       True if Item is a letter. A letter is a character that is in
  21479.                       one of the ranges 'A'┬╖┬╖'Z' or 'a'┬╖┬╖'z', or whose position is
  21480.                       in one of the ranges 192┬╖┬╖214, 216┬╖┬╖246, or 248┬╖┬╖255.
  21481.  
  21482.   25. Is_Lower 
  21483.  
  21484.                       True if Item is a lower-case letter. A lower-case letter is
  21485.                       a character that is in the range 'a'┬╖┬╖'z', or whose position
  21486.                       is in one of the ranges 223┬╖┬╖246 or 248┬╖┬╖255.
  21487.  
  21488.   26. Is_Upper 
  21489.  
  21490.                       True if Item is an upper-case letter. An upper-case letter
  21491.                       is a character that is in the range 'A'┬╖┬╖'Z' or whose
  21492.                       position is in one of the ranges 192┬╖┬╖214 or 216┬╖┬╖ 222.
  21493.  
  21494.   27. Is_Basic 
  21495.  
  21496.                       True if Item is a basic letter. A basic letter is a
  21497.                       character that is in one of the ranges 'A'┬╖┬╖'Z' and 'a'┬╖┬╖'z',
  21498.                       or that is one of the following: an upper- or lower-case AE
  21499.                       diphthong, an upper- or lower-case Icelandic eth, an upper-
  21500.                       or lower-case Icelandic thorn, or a sharp-s.
  21501.  
  21502.   28. Is_Digit 
  21503.  
  21504.                       True if Item is a decimal digit. A decimal digit is a
  21505.                       character in the range '0'┬╖┬╖'9'.
  21506.  
  21507.   29. Is_Decimal_Digit 
  21508.  
  21509.                       A renaming of Is_Digit.
  21510.  
  21511.   30. Is_Hexadecimal_Digit 
  21512.  
  21513.                       True if Item is a hexadecimal digit. A hexadecimal digit is
  21514.                       a character that is either a decimal digit or that is in one
  21515.                       of the ranges 'A' ┬╖┬╖ 'F' or 'a' ┬╖┬╖ 'f'.
  21516.  
  21517.   31. Is_Alphanumeric 
  21518.  
  21519.                       True if Item is an alphanumeric character. An alphanumeric
  21520.                       character is a character that is either a letter or a decimal
  21521.                       digit.
  21522.  
  21523.   32. Is_Special 
  21524.  
  21525.                       True if Item is a special graphic character. A special
  21526.                       graphic character is a graphic character that is not
  21527.                       alphanumeric.
  21528.  
  21529.   33. Each of the names To_Lower, To_Upper, and To_Basic refers to two 
  21530.       functions: one that converts from Character to Character, and the other 
  21531.       that converts from String to String. The result of each 
  21532.       Character-to-Character function is described below, in terms of the 
  21533.       conversion applied to Item, its formal Character parameter. The result of 
  21534.       each String-to-String conversion is obtained by applying to each element 
  21535.       of the function's String parameter the corresponding 
  21536.       Character-to-Character conversion; the result is the null String if the 
  21537.       value of the formal parameter is the null String. The lower bound of the 
  21538.       result String is 1. 
  21539.  
  21540.   34. To_Lower 
  21541.  
  21542.                       Returns the corresponding lower-case value for Item if
  21543.                       Is_Upper(Item), and returns Item otherwise.
  21544.  
  21545.   35. To_Upper 
  21546.  
  21547.                       Returns the corresponding upper-case value for Item if
  21548.                       Is_Lower(Item) and Item has an upper-case form, and returns Item
  21549.                       otherwise. The lower case letters sharp-s and y-diaeresis do
  21550.                       not have upper case forms.
  21551.  
  21552.   36. To_Basic 
  21553.  
  21554.                       Returns the letter corresponding to Item but with no
  21555.                       diacritical mark, if Item is a letter but not a basic letter;
  21556.                       returns Item otherwise.
  21557.  
  21558.   37. The following set of functions test for membership in the ISO 646 
  21559.       character range, or convert between ISO 646 and Character. 
  21560.  
  21561.   38. Is_ISO_646 
  21562.  
  21563.                       The function whose formal parameter, Item, is of type
  21564.                       Character returns True if Item is in the subtype ISO_646.
  21565.  
  21566.   39. Is_ISO_646 
  21567.  
  21568.                       The function whose formal parameter, Item, is of type String
  21569.                       returns True if Is_ISO_646(Item(I)) is True for each I in
  21570.                       Item'Range.
  21571.  
  21572.   40. To_ISO_646 
  21573.  
  21574.                       The function whose first formal parameter, Item, is of type
  21575.                       Character returns Item if Is_ISO_646(Item), and returns the
  21576.                       Substitute ISO_646 character otherwise.
  21577.  
  21578.   41. To_ISO_646 
  21579.  
  21580.                       The function whose first formal parameter, Item, is of type
  21581.                       String returns the String whose Range is 1┬╖┬╖Item'Length and
  21582.                       each of whose elements is given by To_ISO_646 of the
  21583.                       corresponding element in Item.
  21584.  
  21585.   42. The following set of functions test Wide_Character values for membership 
  21586.       in Character, or convert between corresponding characters of 
  21587.       Wide_Character and Character. 
  21588.  
  21589.   43. Is_Character 
  21590.  
  21591.                       Returns True if Wide_Character'Pos(Item) <=
  21592.                       Character'Pos(Character'Last).
  21593.  
  21594.   44. Is_String 
  21595.  
  21596.                       Returns True if Is_Character(Item(I)) is True for each I in
  21597.                       Item'Range.
  21598.  
  21599.   45. To_Character 
  21600.  
  21601.                       Returns the Character corresponding to Item if
  21602.                       Is_Character(Item), and returns the Substitute Character
  21603.                       otherwise.
  21604.  
  21605.   46. To_String 
  21606.  
  21607.                       Returns the String whose range is 1┬╖┬╖Item'Length and each of
  21608.                       whose elements is given by To_Character of the corresponding
  21609.                       element in Item.
  21610.  
  21611.   47. To_Wide_Character 
  21612.  
  21613.                       Returns the Wide_Character X such that Character'Pos(Item) =
  21614.                       Wide_Character'Pos(X).
  21615.  
  21616.   48. To_Wide_String 
  21617.  
  21618.                       Returns the Wide_String whose range is 1┬╖┬╖Item'Length and
  21619.                       each of whose elements is given by To_Wide_Character of the
  21620.                       corresponding element in Item.
  21621.  
  21622.   Implementation Advice
  21623.  
  21624.   49. If an implementation provides a localized definition of Character or 
  21625.       Wide_Character, then the effects of the subprograms in 
  21626.       Characters.Handling should reflect the localizations. See also 3.5.2. 
  21627.  
  21628.       NOTES 
  21629.  
  21630.   50. (5) A basic letter is a letter without a diacritical mark. 
  21631.  
  21632.   51. (6) Except for the hexadecimal digits, basic letters, and ISO_646 
  21633.       characters, the categories identified in the classification functions 
  21634.       form a strict hierarchy: 
  21635.  
  21636.         a. Control characters 
  21637.  
  21638.         b. Graphic characters 
  21639.  
  21640.              1. Alphanumeric characters 
  21641.  
  21642.                   a. Letters 
  21643.  
  21644.                        1. Upper-case letters 
  21645.  
  21646.                        2. Lower-case letters 
  21647.  
  21648.                   a. Decimal digits 
  21649.  
  21650.              1. Special graphic characters 
  21651.  
  21652.  
  21653. ΓòÉΓòÉΓòÉ 17.3.3. The Package Characters.Latin_1 ΓòÉΓòÉΓòÉ
  21654.  
  21655.    1. The package Characters.Latin_1 declares constants for characters in ISO 
  21656.       8859-1. 
  21657.  
  21658.             Static Semantics
  21659.  
  21660.    2. The library package Characters.Latin_1 has the following declaration: 
  21661.  
  21662.          3.
  21663.  
  21664.                       package Ada.Characters.Latin_1 is
  21665.                         pragma Pure(Latin_1);
  21666.  
  21667.          4.
  21668.  
  21669.                         -- Control characters:
  21670.  
  21671.          5.
  21672.  
  21673.                         NUL          : constant Character := Character'Val(0);
  21674.                        SOH          : constant Character := Character'Val(1);
  21675.                        STX          : constant Character := Character'Val(2);
  21676.                        ETX          : constant Character := Character'Val(3);
  21677.                        EOT          : constant Character := Character'Val(4);
  21678.                        ENQ          : constant Character := Character'Val(5);
  21679.                        ACK          : constant Character := Character'Val(6);
  21680.                        BEL          : constant Character := Character'Val(7);
  21681.                        BS          : constant Character := Character'Val(8);
  21682.                        HT          : constant Character := Character'Val(9);
  21683.                        LF          : constant Character := Character'Val(10);
  21684.                        VT          : constant Character := Character'Val(11);
  21685.                        FF          : constant Character := Character'Val(12);
  21686.                        CR          : constant Character := Character'Val(13);
  21687.                        SO          : constant Character := Character'Val(14);
  21688.                        SI          : constant Character := Character'Val(15);
  21689.  
  21690.          6.
  21691.  
  21692.                         DLE          : constant Character := Character'Val(16);
  21693.                        DC1          : constant Character := Character'Val(17);
  21694.                        DC2          : constant Character := Character'Val(18);
  21695.                        DC3          : constant Character := Character'Val(19);
  21696.                        DC4          : constant Character := Character'Val(20);
  21697.                        NAK          : constant Character := Character'Val(21);
  21698.                        SYN          : constant Character := Character'Val(22);
  21699.                        ETB          : constant Character := Character'Val(23);
  21700.                        CAN          : constant Character := Character'Val(24);
  21701.                        EM          : constant Character := Character'Val(25);
  21702.                        SUB          : constant Character := Character'Val(26);
  21703.                        ESC          : constant Character := Character'Val(27);
  21704.                        FS          : constant Character := Character'Val(28);
  21705.                        GS          : constant Character := Character'Val(29);
  21706.                        RS          : constant Character := Character'Val(30);
  21707.                        US          : constant Character := Character'Val(31);
  21708.  
  21709.          7.
  21710.  
  21711.                         -- ISO 646 graphic characters:
  21712.  
  21713.          8.
  21714.  
  21715.                         Space         : constant Character := ' ';
  21716.                                    -- Character'Val(32)
  21717.                        Exclamation      : constant Character := '!';
  21718.                                    -- Character'Val(33)
  21719.                        Quotation       : constant Character := '"';
  21720.                                    -- Character'Val(34)
  21721.                        Number_Sign      : constant Character := '#';
  21722.                                    -- Character'Val(35)
  21723.                        Dollar_Sign      : constant Character := '$';
  21724.                                    -- Character'Val(36)
  21725.                        Percent_Sign     : constant Character := '%';
  21726.                                    -- Character'Val(37)
  21727.                        Ampersand       : constant Character := '&';
  21728.                                    -- Character'Val(38)
  21729.                        Apostrophe      : constant Character := ''';
  21730.                                    -- Character'Val(39)
  21731.                        Left_Parenthesis   : constant Character := '(';
  21732.                                    -- Character'Val(40)
  21733.                        Right_Parenthesis   : constant Character := ')';
  21734.                                    -- Character'Val(41)
  21735.                        Asterisk       : constant Character := '*';
  21736.                                    -- Character'Val(42)
  21737.                        Plus_Sign       : constant Character := '+';
  21738.                                    -- Character'Val(43)
  21739.                        Comma         : constant Character := ',';
  21740.                                    -- Character'Val(44)
  21741.                        Hyphen        : constant Character := '-';
  21742.                                    -- Character'Val(45)
  21743.                        Minus_Sign      : Character renames Hyphen;
  21744.                        Full_Stop       : constant Character := '.';
  21745.                                    -- Character'Val(46)
  21746.                        Solidus        : constant Character := '/';
  21747.                                    -- Character'Val(47)
  21748.  
  21749.          9.
  21750.  
  21751.                         -- Decimal digits '0' though '9' are at positions 48 through 57
  21752.  
  21753.         10.
  21754.  
  21755.                         Colon         : constant Character := ':';
  21756.                                    -- Character'Val(58)
  21757.                        Semicolon       : constant Character := ';';
  21758.                                    -- Character'Val(59)
  21759.                        Less_Than_Sign    : constant Character := '<';
  21760.                                    -- Character'Val(60)
  21761.                        Equals_Sign      : constant Character := '=';
  21762.                                    -- Character'Val(61)
  21763.                        Greater_Than_Sign   : constant Character := '>';
  21764.                                    -- Character'Val(62)
  21765.                        Question       : constant Character := '?';
  21766.                                    -- Character'Val(63)
  21767.                        Commercial_At     : constant Character := '@';
  21768.                                    -- Character'Val(64)
  21769.  
  21770.         11.
  21771.  
  21772.                         -- Letters 'A' through 'Z' are at positions 65 through 90
  21773.  
  21774.         12.
  21775.  
  21776.                         Left_Square_Bracket  : constant Character := '[';
  21777.                                    -- Character'Val(91)
  21778.                        Reverse_Solidus    : constant Character := '\';
  21779.                                    -- Character'Val(92)
  21780.                        Right_Square_Bracket : constant Character := ']';
  21781.                                    -- Character'Val(93)
  21782.                        Circumflex      : constant Character := '^';
  21783.                                    -- Character'Val(94)
  21784.                        Low_Line       : constant Character := '_';
  21785.                                    -- Character'Val(95)
  21786.  
  21787.         13.
  21788.  
  21789.                         Grave         : constant Character := '`';
  21790.                                    -- Character'Val(96)
  21791.                        LC_A         : constant Character := 'a';
  21792.                                    -- Character'Val(97)
  21793.                        LC_B         : constant Character := 'b';
  21794.                                    -- Character'Val(98)
  21795.                        LC_C         : constant Character := 'c';
  21796.                                    -- Character'Val(99)
  21797.                        LC_D         : constant Character := 'd';
  21798.                                    -- Character'Val(100)
  21799.                        LC_E         : constant Character := 'e';
  21800.                                    -- Character'Val(101)
  21801.                        LC_F         : constant Character := 'f';
  21802.                                    -- Character'Val(102)
  21803.                        LC_G         : constant Character := 'g';
  21804.                                    -- Character'Val(103)
  21805.                        LC_H         : constant Character := 'h';
  21806.                                    -- Character'Val(104)
  21807.                        LC_I         : constant Character := 'i';
  21808.                                    -- Character'Val(105)
  21809.                        LC_J         : constant Character := 'j';
  21810.                                    -- Character'Val(106)
  21811.                        LC_K         : constant Character := 'k';
  21812.                                    -- Character'Val(107)
  21813.                        LC_L         : constant Character := 'l';
  21814.                                    -- Character'Val(108)
  21815.                        LC_M         : constant Character := 'm';
  21816.                                    -- Character'Val(109)
  21817.                        LC_N         : constant Character := 'n';
  21818.                                    -- Character'Val(110)
  21819.                        LC_O         : constant Character := 'o';
  21820.                                    -- Character'Val(111)
  21821.  
  21822.         14.
  21823.  
  21824.                         LC_P         : constant Character := 'p';
  21825.                                    -- Character'Val(112)
  21826.                        LC_Q         : constant Character := 'q';
  21827.                                    -- Character'Val(113)
  21828.                        LC_R         : constant Character := 'r';
  21829.                                    -- Character'Val(114)
  21830.                        LC_S         : constant Character := 's';
  21831.                                    -- Character'Val(115)
  21832.                        LC_T         : constant Character := 't';
  21833.                                    -- Character'Val(116)
  21834.                        LC_U         : constant Character := 'u';
  21835.                                    -- Character'Val(117)
  21836.                        LC_V         : constant Character := 'v';
  21837.                                    -- Character'Val(118)
  21838.                        LC_W         : constant Character := 'w';
  21839.                                    -- Character'Val(119)
  21840.                        LC_X         : constant Character := 'x';
  21841.                                    -- Character'Val(120)
  21842.                        LC_Y         : constant Character := 'y';
  21843.                                    -- Character'Val(121)
  21844.                        LC_Z         : constant Character := 'z';
  21845.                                    -- Character'Val(122)
  21846.                        Left_Curly_Bracket  : constant Character := '{';
  21847.                                    -- Character'Val(123)
  21848.                        Vertical_Line     : constant Character := '|';
  21849.                                    -- Character'Val(124)
  21850.                        Right_Curly_Bracket  : constant Character := '}';
  21851.                                    -- Character'Val(125)
  21852.                        Tilde         : constant Character := '~';
  21853.                                    -- Character'Val(126)
  21854.                        DEL          : constant Character := Character'Val(127);
  21855.  
  21856.         15.
  21857.  
  21858.                         -- ISO 6429 control characters:
  21859.  
  21860.         16.
  21861.  
  21862.                         IS4          : Character renames FS;
  21863.                        IS3          : Character renames GS;
  21864.                        IS2          : Character renames RS;
  21865.                        IS1          : Character renames US;
  21866.  
  21867.         17.
  21868.  
  21869.                         Reserved_128     : constant Character := Character'Val(128);
  21870.                        Reserved_129     : constant Character := Character'Val(129);
  21871.                        BPH          : constant Character := Character'Val(130);
  21872.                        NBH          : constant Character := Character'Val(131);
  21873.                        Reserved_132     : constant Character := Character'Val(132);
  21874.                        NEL          : constant Character := Character'Val(133);
  21875.                        SSA          : constant Character := Character'Val(134);
  21876.                        ESA          : constant Character := Character'Val(135);
  21877.                        HTS          : constant Character := Character'Val(136);
  21878.                        HTJ          : constant Character := Character'Val(137);
  21879.                        VTS          : constant Character := Character'Val(138);
  21880.                        PLD          : constant Character := Character'Val(139);
  21881.                        PLU          : constant Character := Character'Val(140);
  21882.                        RI          : constant Character := Character'Val(141);
  21883.                        SS2          : constant Character := Character'Val(142);
  21884.                        SS3          : constant Character := Character'Val(143);
  21885.  
  21886.         18.
  21887.  
  21888.                         DCS          : constant Character := Character'Val(144);
  21889.                        PU1          : constant Character := Character'Val(145);
  21890.                        PU2          : constant Character := Character'Val(146);
  21891.                        STS          : constant Character := Character'Val(147);
  21892.                        CCH          : constant Character := Character'Val(148);
  21893.                        MW          : constant Character := Character'Val(149);
  21894.                        SPA          : constant Character := Character'Val(150);
  21895.                        EPA          : constant Character := Character'Val(151);
  21896.  
  21897.         19.
  21898.  
  21899.                         SOS          : constant Character := Character'Val(152);
  21900.                        Reserved_153     : constant Character := Character'Val(153);
  21901.                        SCI          : constant Character := Character'Val(154);
  21902.                        CSI          : constant Character := Character'Val(155);
  21903.                        ST          : constant Character := Character'Val(156);
  21904.                        OSC          : constant Character := Character'Val(157);
  21905.                        PM          : constant Character := Character'Val(158);
  21906.                        APC          : constant Character := Character'Val(159);
  21907.  
  21908.         20.
  21909.  
  21910.                         -- Other graphic characters:
  21911.  
  21912.         21.
  21913.  
  21914.                         -- Character positions 160 (16#A0#) ┬╖┬╖ 175 (16#AF#):
  21915.                        No_Break_Space        : constant Character := ' ';
  21916.                                       -- Character'Val(160)
  21917.                        NBSP             : Character renames No_Break_Space;
  21918.                        Inverted_Exclamation     : constant Character :=
  21919.                         Character'Val(161);
  21920.                        Cent_Sign          : constant Character :=
  21921.                         Character'Val(162);
  21922.                        Pound_Sign          : constant Character :=
  21923.                         Character'Val(163);
  21924.                        Currency_Sign        : constant Character :=
  21925.                         Character'Val(164);
  21926.                        Yen_Sign           : constant Character :=
  21927.                         Character'Val(165);
  21928.                        Broken_Bar          : constant Character :=
  21929.                         Character'Val(166);
  21930.                        Section_Sign         : constant Character :=
  21931.                         Character'Val(167);
  21932.                        Diaeresis          : constant Character :=
  21933.                         Character'Val(168);
  21934.                        Copyright_Sign        : constant Character :=
  21935.                         Character'Val(169);
  21936.                        Feminine_Ordinal_Indicator  : constant Character :=
  21937.                         Character'Val(170);
  21938.                        Left_Angle_Quotation     : constant Character :=
  21939.                         Character'Val(171);
  21940.                        Not_Sign           : constant Character :=
  21941.                         Character'Val(172);
  21942.                        Soft_Hyphen         : constant Character :=
  21943.                         Character'Val(173);
  21944.                        Registered_Trade_Mark_Sign  : constant Character :=
  21945.                         Character'Val(174);
  21946.                        Macron            : constant Character :=
  21947.                         Character'Val(175);
  21948.  
  21949.         22.
  21950.  
  21951.                         -- Character positions 176 (16#B0#) ┬╖┬╖ 191 (16#BF#):
  21952.                        Degree_Sign         : constant Character :=
  21953.                         Character'Val(176);
  21954.                        Ring_Above          : Character renames Degree_Sign;
  21955.                        Plus_Minus_Sign       : constant Character :=
  21956.                         Character'Val(177);
  21957.                        Superscript_Two       : constant Character :=
  21958.                         Character'Val(178);
  21959.                        Superscript_Three      : constant Character :=
  21960.                         Character'Val(179);
  21961.                        Acute            : constant Character :=
  21962.                         Character'Val(180);
  21963.                        Micro_Sign          : constant Character :=
  21964.                         Character'Val(181);
  21965.                        Pilcrow_Sign         : constant Character :=
  21966.                         Character'Val(182);
  21967.                        Paragraph_Sign        : Character renames Pilcrow_Sign;
  21968.                        Middle_Dot          : constant Character :=
  21969.                         Character'Val(183);
  21970.                        Cedilla           : constant Character :=
  21971.                         Character'Val(184);
  21972.                        Superscript_One       : constant Character :=
  21973.                         Character'Val(185);
  21974.                        Masculine_Ordinal_Indicator : constant Character :=
  21975.                         Character'Val(186);
  21976.                        Right_Angle_Quotation    : constant Character :=
  21977.                         Character'Val(187);
  21978.                        Fraction_One_Quarter     : constant Character :=
  21979.                         Character'Val(188);
  21980.                        Fraction_One_Half      : constant Character :=
  21981.                         Character'Val(189);
  21982.                        Fraction_Three_Quarters   : constant Character :=
  21983.                         Character'Val(190);
  21984.                        Inverted_Question      : constant Character :=
  21985.                         Character'Val(191);
  21986.  
  21987.         23.
  21988.  
  21989.                         -- Character positions 192 (16#C0#) ┬╖┬╖ 207 (16#CF#):
  21990.                        UC_A_Grave          : constant Character :=
  21991.                         Character'Val(192);
  21992.                        UC_A_Acute          : constant Character :=
  21993.                         Character'Val(193);
  21994.                        UC_A_Circumflex       : constant Character :=
  21995.                         Character'Val(194);
  21996.                        UC_A_Tilde          : constant Character :=
  21997.                         Character'Val(195);
  21998.                        UC_A_Diaeresis        : constant Character :=
  21999.                         Character'Val(196);
  22000.                        UC_A_Ring          : constant Character :=
  22001.                         Character'Val(197);
  22002.                        UC_AE_Diphthong       : constant Character :=
  22003.                         Character'Val(198);
  22004.                        UC_C_Cedilla         : constant Character :=
  22005.                         Character'Val(199);
  22006.                        UC_E_Grave          : constant Character :=
  22007.                         Character'Val(200);
  22008.                        UC_E_Acute          : constant Character :=
  22009.                         Character'Val(201);
  22010.                        UC_E_Circumflex       : constant Character :=
  22011.                         Character'Val(202);
  22012.                        UC_E_Diaeresis        : constant Character :=
  22013.                         Character'Val(203);
  22014.                        UC_I_Grave          : constant Character :=
  22015.                         Character'Val(204);
  22016.                        UC_I_Acute          : constant Character :=
  22017.                         Character'Val(205);
  22018.                        UC_I_Circumflex       : constant Character :=
  22019.                         Character'Val(206);
  22020.                        UC_I_Diaeresis        : constant Character :=
  22021.                         Character'Val(207);
  22022.  
  22023.         24.
  22024.  
  22025.                         -- Character positions 208 (16#D0#) ┬╖┬╖ 223 (16#DF#):
  22026.                        UC_Icelandic_Eth       : constant Character :=
  22027.                         Character'Val(208);
  22028.                        UC_N_Tilde          : constant Character :=
  22029.                         Character'Val(209);
  22030.                        UC_O_Grave          : constant Character :=
  22031.                         Character'Val(210);
  22032.                        UC_O_Acute          : constant Character :=
  22033.                         Character'Val(211);
  22034.                        UC_O_Circumflex       : constant Character :=
  22035.                         Character'Val(212);
  22036.                        UC_O_Tilde          : constant Character :=
  22037.                         Character'Val(213);
  22038.                        UC_O_Diaeresis        : constant Character :=
  22039.                         Character'Val(214);
  22040.                        Multiplication_Sign     : constant Character :=
  22041.                         Character'Val(215);
  22042.                        UC_O_Oblique_Stroke     : constant Character :=
  22043.                         Character'Val(216);
  22044.                        UC_U_Grave          : constant Character :=
  22045.                         Character'Val(217);
  22046.                        UC_U_Acute          : constant Character :=
  22047.                         Character'Val(218);
  22048.                        UC_U_Circumflex       : constant Character :=
  22049.                         Character'Val(219);
  22050.                        UC_U_Diaeresis        : constant Character :=
  22051.                         Character'Val(220);
  22052.                        UC_Y_Acute          : constant Character :=
  22053.                         Character'Val(221);
  22054.                        UC_Icelandic_Thorn      : constant Character :=
  22055.                         Character'Val(222);
  22056.                        LC_German_Sharp_S      : constant Character :=
  22057.                         Character'Val(223);
  22058.  
  22059.         25.
  22060.  
  22061.                         -- Character positions 224 (16#E0#) ┬╖┬╖ 239 (16#EF#):
  22062.                        LC_A_Grave          : constant Character :=
  22063.                         Character'Val(224);
  22064.                        LC_A_Acute          : constant Character :=
  22065.                         Character'Val(225);
  22066.                        LC_A_Circumflex       : constant Character :=
  22067.                         Character'Val(226);
  22068.                        LC_A_Tilde          : constant Character :=
  22069.                         Character'Val(227);
  22070.                        LC_A_Diaeresis        : constant Character :=
  22071.                         Character'Val(228);
  22072.                        LC_A_Ring          : constant Character :=
  22073.                         Character'Val(229);
  22074.                        LC_AE_Diphthong       : constant Character :=
  22075.                         Character'Val(230);
  22076.                        LC_C_Cedilla         : constant Character :=
  22077.                         Character'Val(231);
  22078.                        LC_E_Grave          : constant Character :=
  22079.                         Character'Val(232);
  22080.                        LC_E_Acute          : constant Character :=
  22081.                         Character'Val(233);
  22082.                        LC_E_Circumflex       : constant Character :=
  22083.                         Character'Val(234);
  22084.                        LC_E_Diaeresis        : constant Character :=
  22085.                         Character'Val(235);
  22086.                        LC_I_Grave          : constant Character :=
  22087.                         Character'Val(236);
  22088.                        LC_I_Acute          : constant Character :=
  22089.                         Character'Val(237);
  22090.                        LC_I_Circumflex       : constant Character :=
  22091.                         Character'Val(238);
  22092.                        LC_I_Diaeresis        : constant Character :=
  22093.                         Character'Val(239);
  22094.  
  22095.         26.
  22096.  
  22097.                         -- Character positions 240 (16#F0#) ┬╖┬╖ 255 (16#FF#):
  22098.                        LC_Icelandic_Eth       : constant Character :=
  22099.                         Character'Val(240);
  22100.                        LC_N_Tilde          : constant Character :=
  22101.                         Character'Val(241);
  22102.                        LC_O_Grave          : constant Character :=
  22103.                         Character'Val(242);
  22104.                        LC_O_Acute          : constant Character :=
  22105.                         Character'Val(243);
  22106.                        LC_O_Circumflex       : constant Character :=
  22107.                         Character'Val(244);
  22108.                        LC_O_Tilde          : constant Character :=
  22109.                         Character'Val(245);
  22110.                        LC_O_Diaeresis        : constant Character :=
  22111.                         Character'Val(246);
  22112.                        Division_Sign        : constant Character :=
  22113.                         Character'Val(247);
  22114.                        LC_O_Oblique_Stroke     : constant Character :=
  22115.                         Character'Val(248);
  22116.                        LC_U_Grave          : constant Character :=
  22117.                         Character'Val(249);
  22118.                        LC_U_Acute          : constant Character :=
  22119.                         Character'Val(250);
  22120.                        LC_U_Circumflex       : constant Character :=
  22121.                         Character'Val(251);
  22122.                        LC_U_Diaeresis        : constant Character :=
  22123.                         Character'Val(252);
  22124.                        LC_Y_Acute          : constant Character :=
  22125.                         Character'Val(253);
  22126.                        LC_Icelandic_Thorn      : constant Character :=
  22127.                         Character'Val(254);
  22128.                        LC_Y_Diaeresis        : constant Character :=
  22129.                         Character'Val(255);
  22130.                       end Ada.Characters.Latin_1;
  22131.  
  22132.   Implementation Permissions
  22133.  
  22134.   27. An implementation may provide additional packages as children of 
  22135.       Ada.Characters, to declare names for the symbols of the local character 
  22136.       set or other character sets. 
  22137.  
  22138.  
  22139. ΓòÉΓòÉΓòÉ 17.4. String Handling ΓòÉΓòÉΓòÉ
  22140.  
  22141.    1. This clause presents the specifications of the package Strings and 
  22142.       several child packages, which provide facilities for dealing with string 
  22143.       data. Fixed-length, bounded-length, and unbounded-length strings are 
  22144.       supported, for both String and Wide_String. The string-handling 
  22145.       subprograms include searches for pattern strings and for characters in 
  22146.       program-specified sets, translation (via a character-to-character 
  22147.       mapping), and transformation (replacing, inserting, overwriting, and 
  22148.       deleting of substrings). 
  22149.  
  22150.  A.4.1                         The Package Strings 
  22151.  A.4.2                         The Package Strings.Maps 
  22152.  A.4.3                         Fixed-Length String Handling 
  22153.  A.4.4                         Bounded-Length String Handling 
  22154.  A.4.5                         Unbounded-Length String Handling 
  22155.  A.4.6                         String-Handling Sets and Mappings 
  22156.  A.4.7                         Wide_String Handling 
  22157.  
  22158.  
  22159. ΓòÉΓòÉΓòÉ 17.4.1. The Package Strings ΓòÉΓòÉΓòÉ
  22160.  
  22161.    1. The package Strings provides declarations common to the string handling 
  22162.       packages. 
  22163.  
  22164.             Static Semantics
  22165.  
  22166.    2. The library package Strings has the following declaration: 
  22167.  
  22168.          3.
  22169.  
  22170.                       package Ada.Strings is
  22171.                         pragma Pure(Strings);
  22172.  
  22173.          4.
  22174.  
  22175.                         Space    : constant Character    := ' ';
  22176.                         Wide_Space : constant Wide_Character := ' ';
  22177.  
  22178.          5.
  22179.  
  22180.                         Length_Error, Pattern_Error, Index_Error, Translation_Error
  22181.                          : exception;
  22182.  
  22183.          6.
  22184.  
  22185.                         type Alignment  is (Left, Right, Center);
  22186.                         type Truncation is (Left, Right, Error);
  22187.                         type Membership is (Inside, Outside);
  22188.                         type Direction  is (Forward, Backward);
  22189.                         type Trim_End  is (Left, Right, Both);
  22190.                       end Ada.Strings;
  22191.  
  22192.  
  22193. ΓòÉΓòÉΓòÉ 17.4.2. The Package Strings.Maps ΓòÉΓòÉΓòÉ
  22194.  
  22195.    1. The package Strings.Maps defines the types, operations, and other 
  22196.       entities needed for character sets and character-to-character mappings. 
  22197.  
  22198.             Static Semantics
  22199.  
  22200.    2. The library package Strings.Maps has the following declaration: 
  22201.  
  22202.          3.
  22203.  
  22204.                       package Ada.Strings.Maps is
  22205.                         pragma Preelaborate(Maps);
  22206.  
  22207.          4.
  22208.  
  22209.                         -- Representation for a set of character values:
  22210.                         type Character_Set is private;
  22211.  
  22212.          5.
  22213.  
  22214.                         Null_Set : constant Character_Set;
  22215.  
  22216.          6.
  22217.  
  22218.                         type Character_Range is
  22219.                          record
  22220.                           Low  : Character;
  22221.                           High : Character;
  22222.                          end record;
  22223.                         -- Represents Character range Low┬╖┬╖High
  22224.  
  22225.          7.
  22226.  
  22227.                         type Character_Ranges is
  22228.                          array (Positive range <>) of Character_Range;
  22229.  
  22230.          8.
  22231.  
  22232.                         function To_Set (Ranges : in Character_Ranges)
  22233.                          return Character_Set;
  22234.  
  22235.          9.
  22236.  
  22237.                         function To_Set (Span : in Character_Range)
  22238.                          return Character_Set;
  22239.  
  22240.         10.
  22241.  
  22242.                         function To_Ranges (Set : in Character_Set)
  22243.                          return Character_Ranges;
  22244.  
  22245.         11.
  22246.  
  22247.                         function "=" (Left, Right : in Character_Set) return Boolean;
  22248.  
  22249.         12.
  22250.  
  22251.                         function "not" (Right : in Character_Set)
  22252.                          return Character_Set;
  22253.                         function "and" (Left, Right : in Character_Set)
  22254.                          return Character_Set;
  22255.                         function "or"  (Left, Right : in Character_Set)
  22256.                          return Character_Set;
  22257.                         function "xor" (Left, Right : in Character_Set)
  22258.                          return Character_Set;
  22259.                         function "-"  (Left, Right : in Character_Set)
  22260.                          return Character_Set;
  22261.  
  22262.         13.
  22263.  
  22264.                         function Is_In (Element : in Character;
  22265.                                 Set   : in Character_Set)
  22266.                          return Boolean;
  22267.  
  22268.         14.
  22269.  
  22270.                         function Is_Subset (Elements : in Character_Set;
  22271.                                   Set    : in Character_Set)
  22272.                          return Boolean;
  22273.  
  22274.         15.
  22275.  
  22276.                         function "<=" (Left  : in Character_Set;
  22277.                                Right : in Character_Set)
  22278.                          return Boolean renames Is_Subset;
  22279.  
  22280.         16.
  22281.  
  22282.                         -- Alternative representation for a set of character values:
  22283.                         subtype Character_Sequence is String;
  22284.  
  22285.         17.
  22286.  
  22287.                         function To_Set (Sequence : in Character_Sequence)
  22288.                          return Character_Set;
  22289.  
  22290.         18.
  22291.  
  22292.                         function To_Set (Singleton : in Character) return Character_Set;
  22293.  
  22294.         19.
  22295.  
  22296.                         function To_Sequence (Set : in Character_Set)
  22297.                          return Character_Sequence;
  22298.  
  22299.         20.
  22300.  
  22301.                         -- Representation for a character to character mapping:
  22302.                         type Character_Mapping is private;
  22303.  
  22304.         21.
  22305.  
  22306.                         function Value (Map   : in Character_Mapping;
  22307.                                 Element : in Character)
  22308.                          return Character;
  22309.  
  22310.         22.
  22311.  
  22312.                         Identity : constant Character_Mapping;
  22313.  
  22314.         23.
  22315.  
  22316.                         function To_Mapping (From, To : in Character_Sequence)
  22317.                          return Character_Mapping;
  22318.  
  22319.         24.
  22320.  
  22321.                         function To_Domain (Map : in Character_Mapping)
  22322.                          return Character_Sequence;
  22323.                         function To_Range  (Map : in Character_Mapping)
  22324.                          return Character_Sequence;
  22325.  
  22326.         25.
  22327.  
  22328.                         type Character_Mapping_Function is
  22329.                          access function (From : in Character) return Character;
  22330.  
  22331.         26.
  22332.  
  22333.                       private
  22334.                         ┬╖┬╖┬╖ -- not specified by the language
  22335.                       end Ada.Strings.Maps;
  22336.  
  22337.   27. An object of type Character_Set represents a set of characters. 
  22338.  
  22339.   28. Null_Set represents the set containing no characters. 
  22340.  
  22341.   29. An object Obj of type Character_Range represents the set of characters in 
  22342.       the range Obj.Low ┬╖┬╖ Obj.High. 
  22343.  
  22344.   30. An object Obj of type Character_Ranges represents the union of the sets 
  22345.       corresponding to Obj(I) for I in Obj'Range. 
  22346.  
  22347.         31.
  22348.  
  22349.             function To_Set (Ranges : in Character_Ranges) return Character_Set;
  22350.  
  22351.         a. If Ranges'Length=0 then Null_Set is returned; otherwise the returned 
  22352.            value represents the set corresponding to Ranges. 
  22353.  
  22354.          1.
  22355.  
  22356.             function To_Set (Span : in Character_Range) return Character_Set;
  22357.  
  22358.         a. The returned value represents the set containing each character in 
  22359.            Span. 
  22360.  
  22361.          1.
  22362.  
  22363.             function To_Ranges (Set : in Character_Set) return Character_Ranges;
  22364.  
  22365.         a. If Set = Null_Set then an empty Character_Ranges array is returned; 
  22366.            otherwise the shortest array of contiguous ranges of Character 
  22367.            values in Set, in increasing order of Low, is returned. 
  22368.  
  22369.          1.
  22370.  
  22371.             function "=" (Left, Right : in Character_Set) return Boolean;
  22372.  
  22373.         a. The function "=" returns True if Left and Right represent identical 
  22374.            sets, and False otherwise. 
  22375.  
  22376.    1. Each of the logical operators "not", "and", "or", and "xor" returns a 
  22377.       Character_Set value that represents the set obtained by applying the 
  22378.       corresponding operation to the set(s) represented by the parameter(s) of 
  22379.       the operator. "-"(Left, Right) is equivalent to "and"(Left, 
  22380.       "not"(Right)). 
  22381.  
  22382.          2.
  22383.  
  22384.             function Is_In (Element : in Character;
  22385.                     Set   : in Character_Set);
  22386.               return Boolean;
  22387.  
  22388.         a. Is_In returns True if Element is in Set, and False otherwise. 
  22389.  
  22390.          1.
  22391.  
  22392.             function Is_Subset (Elements : in Character_Set;
  22393.                       Set    : in Character_Set)
  22394.               return Boolean;
  22395.  
  22396.         a. Is_Subset returns True if Elements is a subset of Set, and False 
  22397.            otherwise. 
  22398.  
  22399.          1.
  22400.  
  22401.             subtype Character_Sequence is String;
  22402.  
  22403.         a. The Character_Sequence subtype is used to portray a set of character 
  22404.            values and also to identify the domain and range of a character 
  22405.            mapping. 
  22406.  
  22407.          1.
  22408.  
  22409.             function To_Set (Sequence  : in Character_Sequence)
  22410.              return Character_Set;
  22411.  
  22412.             function To_Set (Singleton : in Character)
  22413.              return Character_Set;
  22414.  
  22415.         a. Sequence portrays the set of character values that it explicitly 
  22416.            contains (ignoring duplicates). Singleton portrays the set 
  22417.            comprising a single Character. Each of the To_Set functions returns 
  22418.            a Character_Set value that represents the set portrayed by Sequence 
  22419.            or Singleton. 
  22420.  
  22421.          1.
  22422.  
  22423.             function To_Sequence (Set : in Character_Set)
  22424.              return Character_Sequence;
  22425.  
  22426.         a. The function To_Sequence returns a Character_Sequence value 
  22427.            containing each of the characters in the set represented by Set, in 
  22428.            ascending order with no duplicates. 
  22429.  
  22430.          1.
  22431.  
  22432.             type Character_Mapping is private;
  22433.  
  22434.         a. An object of type Character_Mapping represents a 
  22435.            Character-to-Character mapping. 
  22436.  
  22437.          1.
  22438.  
  22439.             function Value (Map   : in Character_Mapping;
  22440.                     Element : in Character)
  22441.               return Character;
  22442.  
  22443.         a. The function Value returns the Character value to which Element maps 
  22444.            with respect to the mapping represented by Map. 
  22445.  
  22446.    1. A character C matches a pattern character P with respect to a given 
  22447.       Character_Mapping value Map if Value(Map, C) = P. A string S matches a 
  22448.       pattern string P with respect to a given Character_Mapping if their 
  22449.       lengths are the same and if each character in S matches its corresponding 
  22450.       character in the pattern string P. 
  22451.  
  22452.    2. String handling subprograms that deal with character mappings have 
  22453.       parameters whose type is Character_Mapping. 
  22454.  
  22455.          3.
  22456.  
  22457.             Identity : constant Character_Mapping;
  22458.  
  22459.         a. Identity maps each Character to itself. 
  22460.  
  22461.          1.
  22462.  
  22463.             function To_Mapping (From, To : in Character_Sequence)
  22464.              return Character_Mapping;
  22465.  
  22466.         a. To_Mapping produces a Character_Mapping such that each element of 
  22467.            From maps to the corresponding element of To, and each other 
  22468.            character maps to itself. If From'Length /= To'Length, or if some 
  22469.            character is repeated in From, then Translation_Error is propagated. 
  22470.  
  22471.          1.
  22472.  
  22473.             function To_Domain (Map : in Character_Mapping)
  22474.              return Character_Sequence;
  22475.  
  22476.         a. To_Domain returns the shortest Character_Sequence value D such that 
  22477.            each character not in D maps to itself, and such that the characters 
  22478.            in D are in ascending order. The lower bound of D is 1. 
  22479.  
  22480.          1.
  22481.  
  22482.             function To_Range (Map : in Character_Mapping)
  22483.              return Character_Sequence;
  22484.  
  22485.         a. To_Range returns the Character_Sequence value R, with lower bound 1 
  22486.            and upper bound Map'Length, such that if D = To_Domain(Map) then 
  22487.            D(I) maps to R(I) for each I in D'Range. 
  22488.  
  22489.    1. An object F of type Character_Mapping_Function maps a Character value C 
  22490.       to the Character value F.all(C), which is said to match C with respect to 
  22491.       mapping function F. 
  22492.  
  22493.       NOTES 
  22494.  
  22495.    2. (7) Character_Mapping and Character_Mapping_Function are used both for 
  22496.       character equivalence mappings in the search subprograms (such as for 
  22497.       case insensitivity) and as transformational mappings in the Translate 
  22498.       subprograms. 
  22499.  
  22500.    3. (8) To_Domain(Identity) and To_Range(Identity) each returns the null 
  22501.       string. 
  22502.  
  22503.             Examples
  22504.  
  22505.    4. To_Mapping("ABCD", "ZZAB") returns a Character_Mapping that maps 'A' and 
  22506.       'B' to 'Z', 'C' to 'A', 'D' to 'B', and each other Character to itself. 
  22507.  
  22508.  
  22509. ΓòÉΓòÉΓòÉ 17.4.3. Fixed-Length String Handling ΓòÉΓòÉΓòÉ
  22510.  
  22511.    1. The language-defined package Strings.Fixed provides string-handling 
  22512.       subprograms for fixed-length strings; that is, for values of type 
  22513.       Standard.String. Several of these subprograms are procedures that modify 
  22514.       the contents of a String that is passed as an out or an in out parameter; 
  22515.       each has additional parameters to control the effect when the logical 
  22516.       length of the result differs from the parameter's length. 
  22517.  
  22518.    2. For each function that returns a String, the lower bound of the returned 
  22519.       value is 1. 
  22520.  
  22521.    3. The basic model embodied in the package is that a fixed-length string 
  22522.       comprises significant characters and possibly padding (with space 
  22523.       characters) on either or both ends. When a shorter string is copied to a 
  22524.       longer string, padding is inserted, and when a longer string is copied to 
  22525.       a shorter one, padding is stripped. The Move procedure in Strings.Fixed, 
  22526.       which takes a String as an out parameter, allows the programmer to 
  22527.       control these effects. Similar control is provided by the string 
  22528.       transformation procedures. 
  22529.  
  22530.             Static Semantics
  22531.  
  22532.    4. The library package Strings.Fixed has the following declaration: 
  22533.  
  22534.          5.
  22535.  
  22536.                       with Ada.Strings.Maps;
  22537.                       package Ada.Strings.Fixed is
  22538.                         pragma Preelaborate(Fixed);
  22539.  
  22540.          6.
  22541.  
  22542.                         -- "Copy" procedure for strings of possibly different lengths
  22543.  
  22544.          7.
  22545.  
  22546.                         procedure Move (Source  : in  String;
  22547.                                 Target  : out String;
  22548.                                 Drop   : in  Truncation := Error;
  22549.                                 Justify : in  Alignment  := Left;
  22550.                                 Pad   : in  Character  := Space);
  22551.  
  22552.          8.
  22553.  
  22554.                         -- Search subprograms
  22555.  
  22556.          9.
  22557.  
  22558.                         function Index (Source  : in String;
  22559.                                 Pattern  : in String;
  22560.                                 Going   : in Direction := Forward;
  22561.                                 Mapping  : in Maps.Character_Mapping
  22562.                                       := Maps.Identity)
  22563.                          return Natural;
  22564.  
  22565.         10.
  22566.  
  22567.                         function Index (Source  : in String;
  22568.                                 Pattern  : in String;
  22569.                                 Going   : in Direction := Forward;
  22570.                                 Mapping  : in Maps.Character_Mapping_Function)
  22571.                          return Natural;
  22572.  
  22573.         11.
  22574.  
  22575.                         function Index (Source : in String;
  22576.                                 Set   : in Maps.Character_Set;
  22577.                                 Test  : in Membership := Inside;
  22578.                                 Going  : in Direction  := Forward)
  22579.                          return Natural;
  22580.  
  22581.         12.
  22582.  
  22583.                         function Index_Non_Blank (Source : in String;
  22584.                                      Going  : in Direction := Forward)
  22585.                          return Natural;
  22586.  
  22587.         13.
  22588.  
  22589.                         function Count (Source  : in String;
  22590.                                 Pattern  : in String;
  22591.                                 Mapping  : in Maps.Character_Mapping
  22592.                                        := Maps.Identity)
  22593.                          return Natural;
  22594.  
  22595.         14.
  22596.  
  22597.                         function Count (Source  : in String;
  22598.                                 Pattern  : in String;
  22599.                                 Mapping  : in Maps.Character_Mapping_Function)
  22600.                          return Natural;
  22601.  
  22602.         15.
  22603.  
  22604.                         function Count (Source  : in String;
  22605.                                 Set    : in Maps.Character_Set)
  22606.                          return Natural;
  22607.  
  22608.         16.
  22609.  
  22610.                         procedure Find_Token (Source : in String;
  22611.                                    Set   : in Maps.Character_Set;
  22612.                                    Test  : in Membership;
  22613.                                    First  : out Positive;
  22614.                                    Last  : out Natural);
  22615.  
  22616.         17.
  22617.  
  22618.                         -- String translation subprograms
  22619.  
  22620.         18.
  22621.  
  22622.                         function Translate (Source  : in String;
  22623.                                   Mapping : in Maps.Character_Mapping)
  22624.                          return String;
  22625.  
  22626.         19.
  22627.  
  22628.                         procedure Translate (Source  : in out String;
  22629.                                     Mapping : in Maps.Character_Mapping);
  22630.  
  22631.         20.
  22632.  
  22633.                         function Translate (Source  : in String;
  22634.                                   Mapping : in Maps.Character_Mapping_Function)
  22635.                          return String;
  22636.  
  22637.         21.
  22638.  
  22639.                         procedure Translate
  22640.                          (Source  : in out String;
  22641.                          Mapping : in Maps.Character_Mapping_Function);
  22642.  
  22643.         22.
  22644.  
  22645.                         -- String transformation subprograms
  22646.  
  22647.         23.
  22648.  
  22649.                         function Replace_Slice (Source  : in String;
  22650.                                     Low    : in Positive;
  22651.                                     High   : in Natural;
  22652.                                     By    : in String)
  22653.                          return String;
  22654.  
  22655.         24.
  22656.  
  22657.                         procedure Replace_Slice (Source  : in out String;
  22658.                                     Low    : in Positive;
  22659.                                     High   : in Natural;
  22660.                                     By    : in String;
  22661.                                     Drop   : in Truncation := Error;
  22662.                                     Justify  : in Alignment  := Left;
  22663.                                     Pad    : in Character  := Space);
  22664.  
  22665.         25.
  22666.  
  22667.                         function Insert (Source  : in String;
  22668.                                 Before  : in Positive;
  22669.                                 New_Item : in String)
  22670.                          return String;
  22671.  
  22672.         26.
  22673.  
  22674.                         procedure Insert (Source  : in out String;
  22675.                                  Before  : in Positive;
  22676.                                  New_Item : in String;
  22677.                                  Drop   : in Truncation := Error);
  22678.  
  22679.         27.
  22680.  
  22681.                         function Overwrite (Source  : in String;
  22682.                                   Position : in Positive;
  22683.                                   New_Item : in String)
  22684.                          return String;
  22685.  
  22686.         28.
  22687.  
  22688.                         procedure Overwrite (Source  : in out String;
  22689.                                   Position : in Positive;
  22690.                                   New_Item : in String;
  22691.                                   Drop   : in Truncation := Right);
  22692.  
  22693.         29.
  22694.  
  22695.                         function Delete (Source  : in String;
  22696.                                 From   : in Positive;
  22697.                                 Through : in Natural)
  22698.                          return String;
  22699.  
  22700.         30.
  22701.  
  22702.                         procedure Delete (Source  : in out String;
  22703.                                  From   : in Positive;
  22704.                                  Through : in Natural;
  22705.                                  Justify : in Alignment := Left;
  22706.                                  Pad   : in Character := Space);
  22707.  
  22708.         31.
  22709.  
  22710.                         -- String selector subprograms
  22711.                         function Trim (Source : in String;
  22712.                                Side  : in Trim_End)
  22713.                          return String;
  22714.  
  22715.         32.
  22716.  
  22717.                         procedure Trim (Source  : in out String;
  22718.                                 Side   : in Trim_End;
  22719.                                 Justify : in Alignment := Left;
  22720.                                 Pad   : in Character := Space);
  22721.  
  22722.         33.
  22723.  
  22724.                         function Trim (Source : in String;
  22725.                                Left  : in Maps.Character_Set;
  22726.                                Right  : in Maps.Character_Set)
  22727.                          return String;
  22728.  
  22729.         34.
  22730.  
  22731.                         procedure Trim (Source  : in out String;
  22732.                                 Left   : in Maps.Character_Set;
  22733.                                 Right  : in Maps.Character_Set;
  22734.                                 Justify : in Alignment := Strings.Left;
  22735.                                 Pad   : in Character := Space);
  22736.  
  22737.         35.
  22738.  
  22739.                         function Head (Source : in String;
  22740.                                Count  : in Natural;
  22741.                                Pad   : in Character := Space)
  22742.                          return String;
  22743.  
  22744.         36.
  22745.  
  22746.                         procedure Head (Source  : in out String;
  22747.                                 Count  : in Natural;
  22748.                                 Justify : in Alignment := Left;
  22749.                                 Pad   : in Character := Space);
  22750.  
  22751.         37.
  22752.  
  22753.                         function Tail (Source : in String;
  22754.                                Count  : in Natural;
  22755.                                Pad   : in Character := Space)
  22756.                          return String;
  22757.  
  22758.         38.
  22759.  
  22760.                         procedure Tail (Source  : in out String;
  22761.                                 Count  : in Natural;
  22762.                                 Justify : in Alignment := Left;
  22763.                                 Pad   : in Character := Space);
  22764.  
  22765.         39.
  22766.  
  22767.                         --String constructor functions
  22768.  
  22769.         40.
  22770.  
  22771.                         function "*" (Left  : in Natural;
  22772.                                Right : in Character) return String;
  22773.  
  22774.         41.
  22775.  
  22776.                         function "*" (Left  : in Natural;
  22777.                                Right : in String) return String;
  22778.  
  22779.         42.
  22780.  
  22781.                       end Ada.Strings.Fixed;
  22782.  
  22783.   43. The effects of the above subprograms are as follows. 
  22784.  
  22785.         44.
  22786.  
  22787.             procedure Move (Source  : in  String;
  22788.                     Target  : out String;
  22789.                     Drop   : in  Truncation := Error;
  22790.                     Justify : in  Alignment  := Left;
  22791.                     Pad   : in  Character  := Space);
  22792.  
  22793.         a. The Move procedure copies characters from Source to Target. If 
  22794.            Source has the same length as Target, then the effect is to assign 
  22795.            Source to Target. If Source is shorter than Target then: 
  22796.  
  22797.              1. If Justify=Left, then Source is copied into the first 
  22798.                 Source'Length characters of Target. 
  22799.  
  22800.              2. If Justify=Right, then Source is copied into the last 
  22801.                 Source'Length characters of Target. 
  22802.  
  22803.              3. If Justify=Center, then Source is copied into the middle 
  22804.                 Source'Length characters of Target. In this case, if the 
  22805.                 difference in length between Target and Source is odd, then the 
  22806.                 extra Pad character is on the right. 
  22807.  
  22808.              4. Pad is copied to each Target character not otherwise assigned. 
  22809.  
  22810.         a. If Source is longer than Target, then the effect is based on Drop. 
  22811.  
  22812.              1. If Drop=Left, then the rightmost Target'Length characters of 
  22813.                 Source are copied into Target. 
  22814.  
  22815.              2. If Drop=Right, then the leftmost Target'Length characters of 
  22816.                 Source are copied into Target. 
  22817.  
  22818.              3. If Drop=Error, then the effect depends on the value of the 
  22819.                 Justify parameter and also on whether any characters in Source 
  22820.                 other than Pad would fail to be copied: 
  22821.  
  22822.                   a. If Justify=Left, and if each of the rightmost 
  22823.                      Source'Length-Target'Length characters in Source is Pad, 
  22824.                      then the leftmost Target'Length characters of Source are 
  22825.                      copied to Target. 
  22826.  
  22827.                   b. If Justify=Right, and if each of the leftmost 
  22828.                      Source'Length-Target'Length characters in Source is Pad, 
  22829.                      then the rightmost Target'Length characters of Source are 
  22830.                      copied to Target. 
  22831.  
  22832.                   c. Otherwise, Length_Error is propagated. 
  22833.  
  22834.          1.
  22835.  
  22836.             function Index (Source  : in String;
  22837.                     Pattern  : in String;
  22838.                     Going   : in Direction := Forward;
  22839.                     Mapping  : in Maps.Character_Mapping
  22840.                            := Maps.Identity)
  22841.               return Natural;
  22842.  
  22843.             function Index (Source  : in String;
  22844.                     Pattern  : in String;
  22845.                     Going   : in Direction := Forward;
  22846.                     Mapping  : in Maps.Character_Mapping_Function)
  22847.               return Natural;
  22848.  
  22849.         a. Each Index function searches for a slice of Source, with length 
  22850.            Pattern'Length, that matches Pattern with respect to Mapping; the 
  22851.            parameter Going indicates the direction of the lookup. If Going = 
  22852.            Forward, then Index returns the smallest index I such that the slice 
  22853.            of Source starting at I matches Pattern. If Going = Backward, then 
  22854.            Index returns the largest index I such that the slice of Source 
  22855.            starting at I matches Pattern. If there is no such slice, then 0 is 
  22856.            returned. If Pattern is the null string then Pattern_Error is 
  22857.  
  22858.          1.
  22859.  
  22860.             function Index (Source : in String;
  22861.                     Set   : in Maps.Character_Set;
  22862.                     Test  : in Membership := Inside;
  22863.                     Going  : in Direction  := Forward)
  22864.               return Natural;
  22865.  
  22866.         a. Index searches for the first or last occurrence of any of a set of 
  22867.            characters (when Test=Inside), or any of the complement of a set of 
  22868.            characters (when Test=Outside). It returns the smallest index I (if 
  22869.            Going=Forward) or the largest index I (if Going=Backward) such that 
  22870.            Source(I) satisfies the Test condition with respect to Set; it 
  22871.            returns 0 if there is no such Character in Source. 
  22872.  
  22873.          1.
  22874.  
  22875.             function Index_Non_Blank (Source : in String;
  22876.                          Going  : in Direction := Forward)
  22877.               return Natural;
  22878.  
  22879.         a. Returns Index(Source, Maps.To_Set(Space), Outside, Going) 
  22880.  
  22881.          1.
  22882.  
  22883.             function Count (Source  : in String;
  22884.                     Pattern  : in String;
  22885.                     Mapping  : in Maps.Character_Mapping
  22886.                            := Maps.Identity)
  22887.               return Natural;
  22888.  
  22889.             function Count (Source  : in String;
  22890.                     Pattern  : in String;
  22891.                     Mapping  : in Maps.Character_Mapping_Function)
  22892.               return Natural;
  22893.  
  22894.         a. Returns the maximum number of nonoverlapping slices of Source that 
  22895.            match Pattern with respect to Mapping. If Pattern is the null string 
  22896.            then Pattern_Error is propagated. 
  22897.  
  22898.          1.
  22899.  
  22900.             function Count (Source  : in String;
  22901.                     Set    : in Maps.Character_Set)
  22902.               return Natural;
  22903.  
  22904.         a. Returns the number of occurrences in Source of characters that are 
  22905.            in Set. 
  22906.  
  22907.          1.
  22908.  
  22909.             procedure Find_Token (Source : in String;
  22910.                        Set   : in Maps.Character_Set;
  22911.                        Test  : in Membership;
  22912.                        First  : out Positive;
  22913.                        Last  : out Natural);
  22914.  
  22915.         a. Find_Token returns in First and Last the indices of the beginning 
  22916.            and end of the first slice of Source all of whose elements satisfy 
  22917.            the Test condition, and such that the elements (if any) immediately 
  22918.            before and after the slice do not satisfy the Test condition. If no 
  22919.            such slice exists, then the value returned for Last is zero, and the 
  22920.            value returned for First is Source'First. 
  22921.  
  22922.          1.
  22923.  
  22924.             function Translate (Source  : in String;
  22925.                       Mapping : in Maps.Character_Mapping)
  22926.               return String;
  22927.  
  22928.             function Translate (Source  : in String;
  22929.                       Mapping : in Maps.Character_Mapping_Function)
  22930.               return String;
  22931.  
  22932.         a. Returns the string S whose length is Source'Length and such that 
  22933.            S(I) is the character to which Mapping maps the corresponding 
  22934.            element of Source, for I in 1┬╖┬╖Source'Length. 
  22935.  
  22936.          1.
  22937.  
  22938.             procedure Translate (Source  : in out String;
  22939.                        Mapping : in Maps.Character_Mapping);
  22940.  
  22941.             procedure Translate (Source  : in out String;
  22942.                        Mapping : in Maps.Character_Mapping_Function);
  22943.  
  22944.         a. Equivalent to Source := Translate(Source, Mapping). 
  22945.  
  22946.          1.
  22947.  
  22948.             function Replace_Slice (Source  : in String;
  22949.                         Low    : in Positive;
  22950.                         High   : in Natural;
  22951.                         By    : in String)
  22952.               return String;
  22953.  
  22954.         a. If Low > Source'Last+1, or High < Source'First-1, then Index_Error 
  22955.            is propagated. Otherwise, if High >= Low then the returned string 
  22956.            comprises Source(Source'First┬╖┬╖Low-1) & By & 
  22957.            Source(High+1┬╖┬╖Source'Last), and if High < Low then the returned 
  22958.            string is Insert(Source, Before=>Low, New_Item=>By). 
  22959.  
  22960.          1.
  22961.  
  22962.             procedure Replace_Slice (Source  : in out String;
  22963.                          Low    : in Positive;
  22964.                          High   : in Natural;
  22965.                          By    : in String;
  22966.                          Drop   : in Truncation := Error;
  22967.                          Justify  : in Alignment  := Left;
  22968.                          Pad    : in Character  := Space);
  22969.  
  22970.         a. Equivalent to Move(Replace_Slice(Source, Low, High, By), Source, 
  22971.            Drop, Justify, Pad). 
  22972.  
  22973.          1.
  22974.  
  22975.             function Insert (Source  : in String;
  22976.                      Before  : in Positive;
  22977.                      New_Item : in String)
  22978.               return String;
  22979.        Propagates Index_Error if Before is not in Source'First ┬╖┬╖ 
  22980.       Source'Last+1; otherwise returns Source(Source'First┬╖┬╖Before-1) & 
  22981.       New_Item & Source(Before┬╖┬╖Source'Last), but with lower bound 1. 
  22982.  
  22983.          1.
  22984.  
  22985.             procedure Insert (Source  : in out String;
  22986.                      Before  : in Positive;
  22987.                      New_Item : in String;
  22988.                      Drop   : in Truncation := Error);
  22989.  
  22990.         a. Equivalent to Move(Insert(Source, Before, New_Item), Source, Drop). 
  22991.  
  22992.          1.
  22993.  
  22994.             function Overwrite (Source  : in String;
  22995.                       Position : in Positive;
  22996.                       New_Item : in String)
  22997.               return String;
  22998.  
  22999.         a. Propagates Index_Error if Position is not in Source'First ┬╖┬╖ 
  23000.            Source'Last+1; otherwise returns the string obtained from Source by 
  23001.            consecutively replacing characters starting at Position with 
  23002.            corresponding characters from New_Item. If the end of Source is 
  23003.            reached before the characters in New_Item are exhausted, the 
  23004.            remaining characters from New_Item are appended to the string. 
  23005.  
  23006.          1.
  23007.  
  23008.             procedure Overwrite (Source  : in out String;
  23009.                        Position : in Positive;
  23010.                        New_Item : in String;
  23011.                        Drop   : in Truncation := Right);
  23012.  
  23013.         a. Equivalent to Move(Overwrite(Source, Position, New_Item), Source, 
  23014.            Drop). 
  23015.  
  23016.          1.
  23017.  
  23018.             function Delete (Source  : in String;
  23019.                      From   : in Positive;
  23020.                      Through : in Natural)
  23021.               return String;
  23022.  
  23023.         a. If From <= Through, the returned string is Replace_Slice(Source, 
  23024.            From, Through, ""), otherwise it is Source. 
  23025.  
  23026.          1.
  23027.  
  23028.             procedure Delete (Source  : in out String;
  23029.                      From   : in Positive;
  23030.                      Through : in Natural;
  23031.                      Justify : in Alignment := Left;
  23032.                      Pad   : in Character := Space);
  23033.  
  23034.         a. Equivalent to Move(Delete(Source, From, Through), Source, Justify => 
  23035.            Justify, Pad => Pad). 
  23036.  
  23037.          1.
  23038.  
  23039.             function Trim (Source : in String;
  23040.                     Side  : in Trim_End)
  23041.              return String;
  23042.  
  23043.         a. Returns the string obtained by removing from Source all leading 
  23044.            Space characters (if Side = Left), all trailing Space characters (if 
  23045.            Side = Right), or all leading and trailing Space characters (if Side 
  23046.            = Both). 
  23047.  
  23048.          1.
  23049.  
  23050.             procedure Trim (Source  : in out String;
  23051.                     Side   : in Trim_End;
  23052.                     Justify : in Alignment := Left;
  23053.                     Pad   : in Character := Space);
  23054.  
  23055.         a. Equivalent to Move(Trim(Source, Side), Source, Justify=>Justify, 
  23056.            Pad=>Pad). 
  23057.  
  23058.          1.
  23059.  
  23060.             function Trim (Source : in String;
  23061.                     Left  : in Maps.Character_Set;
  23062.                     Right  : in Maps.Character_Set)
  23063.               return String;
  23064.  
  23065.         a. Returns the string obtained by removing from Source all leading 
  23066.            characters in Left and all trailing characters in Right. 
  23067.  
  23068.          1.
  23069.  
  23070.             procedure Trim (Source  : in out String;
  23071.                     Left   : in Maps.Character_Set;
  23072.                     Right  : in Maps.Character_Set;
  23073.                     Justify : in Alignment := Strings.Left;
  23074.                     Pad   : in Character := Space);
  23075.  
  23076.         a. Equivalent to Move(Trim(Source, Left, Right), Source, Justify => 
  23077.            Justify, Pad=>Pad). 
  23078.  
  23079.          1.
  23080.  
  23081.             function Head (Source : in String;
  23082.                     Count  : in Natural;
  23083.                     Pad   : in Character := Space)
  23084.               return String;
  23085.  
  23086.         a. Returns a string of length Count. If Count <= Source'Length, the 
  23087.            string comprises the first Count characters of Source. Otherwise its 
  23088.            contents are Source concatenated with Count-Source'Length Pad 
  23089.            characters. 
  23090.  
  23091.          1.
  23092.  
  23093.             procedure Head (Source  : in out String;
  23094.                     Count  : in Natural;
  23095.                     Justify : in Alignment := Left;
  23096.                     Pad   : in Character := Space);
  23097.  
  23098.         a. Equivalent to Move(Head(Source, Count, Pad), Source, Drop=>Error, 
  23099.            Justify=>Justify, Pad=>Pad). 
  23100.  
  23101.          1.
  23102.  
  23103.             function Tail (Source : in String;
  23104.                     Count  : in Natural;
  23105.                     Pad   : in Character := Space)
  23106.               return String;
  23107.  
  23108.         a. Returns a string of length Count. If Count <= Source'Length, the 
  23109.            string comprises the last Count characters of Source. Otherwise its 
  23110.            contents are Count-Source'Length Pad characters concatenated with 
  23111.            Source. 
  23112.  
  23113.          1.
  23114.  
  23115.             procedure Tail (Source  : in out String;
  23116.                     Count  : in Natural;
  23117.                     Justify : in Alignment := Left;
  23118.                     Pad   : in Character := Space);
  23119.  
  23120.         a. Equivalent to Move(Tail(Source, Count, Pad), Source, Drop=>Error, 
  23121.            Justify=>Justify, Pad=>Pad). 
  23122.  
  23123.          1.
  23124.  
  23125.             function "*" (Left  : in Natural;
  23126.                    Right : in Character) return String;
  23127.  
  23128.             function "*" (Left  : in Natural;
  23129.                    Right : in String) return String;
  23130.  
  23131.         a. These functions replicate a character or string a specified number 
  23132.            of times. The first function returns a string whose length is Left 
  23133.            and each of whose elements is Right. The second function returns a 
  23134.            string whose length is Left*Right'Length and whose value is the null 
  23135.            string if Left = 0 and is (Left-1)*Right & Right otherwise. 
  23136.   NOTES 
  23137.  
  23138.    1. (9) In the Index and Count functions taking Pattern and Mapping 
  23139.       parameters, the actual String parameter passed to Pattern should comprise 
  23140.       characters occurring as target characters of the mapping. Otherwise the 
  23141.       pattern will not match. 
  23142.  
  23143.    2. (10) In the Insert subprograms, inserting at the end of a string is 
  23144.       obtained by passing Source'Last+1 as the Before parameter. 
  23145.  
  23146.    3. (11) If a null Character_Mapping_Function is passed to any of the string 
  23147.       handling subprograms, Constraint_Error is propagated. 
  23148.  
  23149.  
  23150. ΓòÉΓòÉΓòÉ 17.4.4. Bounded-Length String Handling ΓòÉΓòÉΓòÉ
  23151.  
  23152.    1. The language-defined package Strings.Bounded provides a generic package 
  23153.       each of whose instances yields a private type Bounded_String and a set of 
  23154.       operations. An object of a particular Bounded_String type represents a 
  23155.       String whose low bound is 1 and whose length can vary conceptually 
  23156.       between 0 and a maximum size established at the generic instantiation. 
  23157.       The subprograms for fixed-length string handling are either overloaded 
  23158.       directly for Bounded_String, or are modified as needed to reflect the 
  23159.       variability in length. Additionally, since the Bounded_String type is 
  23160.       private, appropriate constructor and selector operations are provided. 
  23161.  
  23162.             Static Semantics
  23163.  
  23164.    2. The library package Strings.Bounded has the following declaration: 
  23165.  
  23166.          3.
  23167.  
  23168.                       with Ada.Strings.Maps;
  23169.                       package Ada.Strings.Bounded is
  23170.                         pragma Preelaborate(Bounded);
  23171.  
  23172.          4.
  23173.  
  23174.                         generic
  23175.                          Max  : Positive;   -- Maximum length of a Bounded_String
  23176.                         package Generic_Bounded_Length is
  23177.  
  23178.          5.
  23179.  
  23180.                           Max_Length : constant Positive := Max;
  23181.  
  23182.          6.
  23183.  
  23184.                           type Bounded_String is private;
  23185.  
  23186.          7.
  23187.  
  23188.                           Null_Bounded_String : constant Bounded_String;
  23189.  
  23190.          8.
  23191.  
  23192.                           subtype Length_Range is Natural range 0 ┬╖┬╖ Max_Length;
  23193.  
  23194.          9.
  23195.  
  23196.                           function Length (Source : in Bounded_String)
  23197.                           return Length_Range;
  23198.  
  23199.         10.
  23200.  
  23201.                           -- Conversion, Concatenation, and Selection functions
  23202.  
  23203.         11.
  23204.  
  23205.                           function To_Bounded_String (Source : in String;
  23206.                                        Drop  : in Truncation := Error)
  23207.                            return Bounded_String;
  23208.  
  23209.         12.
  23210.  
  23211.                           function To_String (Source : in Bounded_String) return String;
  23212.  
  23213.         13.
  23214.  
  23215.                           function Append (Left, Right : in Bounded_String;
  23216.                                   Drop     : in Truncation  := Error)
  23217.                            return Bounded_String;
  23218.  
  23219.         14.
  23220.  
  23221.                           function Append (Left  : in Bounded_String;
  23222.                                   Right : in String;
  23223.                                   Drop  : in Truncation := Error)
  23224.                            return Bounded_String;
  23225.  
  23226.         15.
  23227.  
  23228.                           function Append (Left  : in String;
  23229.                                   Right : in Bounded_String;
  23230.                                   Drop  : in Truncation := Error)
  23231.                            return Bounded_String;
  23232.  
  23233.         16.
  23234.  
  23235.                           function Append (Left  : in Bounded_String;
  23236.                                   Right : in Character;
  23237.                                   Drop  : in Truncation := Error)
  23238.                            return Bounded_String;
  23239.  
  23240.         17.
  23241.  
  23242.                           function Append (Left  : in Character;
  23243.                                   Right : in Bounded_String;
  23244.                                   Drop  : in Truncation := Error)
  23245.                            return Bounded_String;
  23246.  
  23247.         18.
  23248.  
  23249.                           procedure Append (Source  : in out Bounded_String;
  23250.                                   New_Item : in Bounded_String;
  23251.                                   Drop   : in Truncation  := Error);
  23252.  
  23253.         19.
  23254.  
  23255.                           procedure Append (Source  : in out Bounded_String;
  23256.                                   New_Item : in String;
  23257.                                   Drop   : in Truncation  := Error);
  23258.  
  23259.         20.
  23260.  
  23261.                           procedure Append (Source  : in out Bounded_String;
  23262.                                   New_Item : in Character;
  23263.                                   Drop   : in Truncation  := Error);
  23264.  
  23265.         21.
  23266.  
  23267.                           function "&" (Left, Right : in Bounded_String)
  23268.                            return Bounded_String;
  23269.  
  23270.         22.
  23271.  
  23272.                           function "&" (Left : in Bounded_String; Right : in String)
  23273.                            return Bounded_String;
  23274.  
  23275.         23.
  23276.  
  23277.                           function "&" (Left : in String; Right : in Bounded_String)
  23278.                            return Bounded_String;
  23279.  
  23280.         24.
  23281.  
  23282.                           function "&" (Left : in Bounded_String; Right : in Character)
  23283.                            return Bounded_String;
  23284.  
  23285.         25.
  23286.  
  23287.                           function "&" (Left : in Character; Right : in Bounded_String)
  23288.                            return Bounded_String;
  23289.  
  23290.         26.
  23291.  
  23292.                           function Element (Source : in Bounded_String;
  23293.                                   Index  : in Positive)
  23294.                            return Character;
  23295.  
  23296.         27.
  23297.  
  23298.                           procedure Replace_Element (Source : in out Bounded_String;
  23299.                                        Index  : in Positive;
  23300.                                        By   : in Character);
  23301.  
  23302.         28.
  23303.  
  23304.                           function Slice (Source : in Bounded_String;
  23305.                                  Low   : in Positive;
  23306.                                  High  : in Natural)
  23307.                            return String;
  23308.  
  23309.         29.
  23310.  
  23311.                           function "="  (Left, Right : in Bounded_String) return Boolean;
  23312.                          function "="  (Left : in Bounded_String; Right : in String)
  23313.                           return Boolean;
  23314.  
  23315.         30.
  23316.  
  23317.                           function "="  (Left : in String; Right : in Bounded_String)
  23318.                           return Boolean;
  23319.  
  23320.         31.
  23321.  
  23322.                           function "<"  (Left, Right : in Bounded_String) return Boolean;
  23323.  
  23324.         32.
  23325.  
  23326.                           function "<"  (Left : in Bounded_String; Right : in String)
  23327.                           return Boolean;
  23328.  
  23329.         33.
  23330.  
  23331.                           function "<"  (Left : in String; Right : in Bounded_String)
  23332.                           return Boolean;
  23333.  
  23334.         34.
  23335.  
  23336.                           function "<=" (Left, Right : in Bounded_String) return Boolean;
  23337.  
  23338.         35.
  23339.  
  23340.                           function "<="  (Left : in Bounded_String; Right : in String)
  23341.                           return Boolean;
  23342.  
  23343.         36.
  23344.  
  23345.                           function "<="  (Left : in String; Right : in Bounded_String)
  23346.                           return Boolean;
  23347.  
  23348.         37.
  23349.  
  23350.                           function ">"  (Left, Right : in Bounded_String) return Boolean;
  23351.  
  23352.         38.
  23353.  
  23354.                           function ">"  (Left : in Bounded_String; Right : in String)
  23355.                           return Boolean;
  23356.  
  23357.         39.
  23358.  
  23359.                           function ">"  (Left : in String; Right : in Bounded_String)
  23360.                           return Boolean;
  23361.  
  23362.         40.
  23363.  
  23364.                           function ">=" (Left, Right : in Bounded_String) return Boolean;
  23365.  
  23366.         41.
  23367.  
  23368.                           function ">="  (Left : in Bounded_String; Right : in String)
  23369.                           return Boolean;
  23370.  
  23371.         42.
  23372.  
  23373.                           function ">="  (Left : in String; Right : in Bounded_String)
  23374.                           return Boolean;
  23375.  
  23376.         43.
  23377.  
  23378.                           -- Search functions
  23379.  
  23380.         44.
  23381.  
  23382.                           function Index (Source  : in Bounded_String;
  23383.                                  Pattern  : in String;
  23384.                                  Going   : in Direction := Forward;
  23385.                                  Mapping  : in Maps.Character_Mapping
  23386.                                        := Maps.Identity)
  23387.                            return Natural;
  23388.  
  23389.         45.
  23390.  
  23391.                           function Index (Source  : in Bounded_String;
  23392.                                  Pattern  : in String;
  23393.                                  Going   : in Direction := Forward;
  23394.                                  Mapping  : in Maps.Character_Mapping_Function)
  23395.                            return Natural;
  23396.  
  23397.         46.
  23398.  
  23399.                           function Index (Source : in Bounded_String;
  23400.                                  Set   : in Maps.Character_Set;
  23401.                                  Test  : in Membership := Inside;
  23402.                                  Going  : in Direction  := Forward)
  23403.                            return Natural;
  23404.  
  23405.         47.
  23406.  
  23407.                           function Index_Non_Blank (Source : in Bounded_String;
  23408.                                       Going  : in Direction := Forward)
  23409.                            return Natural;
  23410.  
  23411.         48.
  23412.  
  23413.                           function Count (Source  : in Bounded_String;
  23414.                                  Pattern  : in String;
  23415.                                  Mapping  : in Maps.Character_Mapping
  23416.                                         := Maps.Identity)
  23417.                            return Natural;
  23418.  
  23419.         49.
  23420.  
  23421.                           function Count (Source  : in Bounded_String;
  23422.                                  Pattern  : in String;
  23423.                                  Mapping  : in Maps.Character_Mapping_Function)
  23424.                            return Natural;
  23425.  
  23426.         50.
  23427.  
  23428.                           function Count (Source  : in Bounded_String;
  23429.                                  Set    : in Maps.Character_Set)
  23430.                            return Natural;
  23431.  
  23432.         51.
  23433.  
  23434.                           procedure Find_Token (Source : in Bounded_String;
  23435.                                     Set   : in Maps.Character_Set;
  23436.                                     Test  : in Membership;
  23437.                                     First  : out Positive;
  23438.                                     Last  : out Natural);
  23439.  
  23440.         52.
  23441.  
  23442.                           -- String translation subprograms
  23443.  
  23444.         53.
  23445.  
  23446.                           function Translate (Source  : in Bounded_String;
  23447.                                    Mapping : in Maps.Character_Mapping)
  23448.                            return Bounded_String;
  23449.  
  23450.         54.
  23451.  
  23452.                           procedure Translate (Source  : in out Bounded_String;
  23453.                                     Mapping : in Maps.Character_Mapping);
  23454.  
  23455.         55.
  23456.  
  23457.                           function Translate
  23458.                           (Source  : in Bounded_String;
  23459.                            Mapping : in Maps.Character_Mapping_Function)
  23460.                            return Bounded_String;
  23461.  
  23462.         56.
  23463.  
  23464.                           procedure Translate
  23465.                           (Source  : in out Bounded_String;
  23466.                            Mapping : in Maps.Character_Mapping_Function);
  23467.  
  23468.         57.
  23469.  
  23470.                           -- String transformation subprograms
  23471.  
  23472.         58.
  23473.  
  23474.                           function Replace_Slice (Source  : in Bounded_String;
  23475.                                      Low    : in Positive;
  23476.                                      High   : in Natural;
  23477.                                      By    : in String;
  23478.                                      Drop   : in Truncation := Error)
  23479.                            return Bounded_String;
  23480.  
  23481.         59.
  23482.  
  23483.                           procedure Replace_Slice (Source  : in out Bounded_String;
  23484.                                       Low    : in Positive;
  23485.                                       High   : in Natural;
  23486.                                       By    : in String;
  23487.                                       Drop   : in Truncation := Error);
  23488.  
  23489.         60.
  23490.  
  23491.                           function Insert (Source  : in Bounded_String;
  23492.                                   Before  : in Positive;
  23493.                                   New_Item : in String;
  23494.                                   Drop   : in Truncation := Error)
  23495.                            return Bounded_String;
  23496.  
  23497.         61.
  23498.  
  23499.                           procedure Insert (Source  : in out Bounded_String;
  23500.                                   Before  : in Positive;
  23501.                                   New_Item : in String;
  23502.                                   Drop   : in Truncation := Error);
  23503.  
  23504.         62.
  23505.  
  23506.                           function Overwrite (Source   : in Bounded_String;
  23507.                                    Position  : in Positive;
  23508.                                    New_Item  : in String;
  23509.                                    Drop    : in Truncation := Error)
  23510.                            return Bounded_String;
  23511.  
  23512.         63.
  23513.  
  23514.                           procedure Overwrite (Source   : in out Bounded_String;
  23515.                                     Position  : in Positive;
  23516.                                     New_Item  : in String;
  23517.                                     Drop    : in Truncation := Error);
  23518.  
  23519.         64.
  23520.  
  23521.                           function Delete (Source  : in Bounded_String;
  23522.                                   From   : in Positive;
  23523.                                   Through : in Natural)
  23524.                            return Bounded_String;
  23525.  
  23526.         65.
  23527.  
  23528.                           procedure Delete (Source  : in out Bounded_String;
  23529.                                   From   : in Positive;
  23530.                                   Through : in Natural);
  23531.  
  23532.         66.
  23533.  
  23534.                           -- String selector subprograms
  23535.  
  23536.         67.
  23537.  
  23538.                           function Trim (Source : in Bounded_String;
  23539.                                  Side  : in Trim_End)
  23540.                            return Bounded_String;
  23541.                          procedure Trim (Source : in out Bounded_String;
  23542.                                  Side  : in Trim_End);
  23543.  
  23544.         68.
  23545.  
  23546.                           function Trim (Source : in Bounded_String;
  23547.                                  Left  : in Maps.Character_Set;
  23548.                                  Right  : in Maps.Character_Set)
  23549.                            return Bounded_String;
  23550.  
  23551.         69.
  23552.  
  23553.                           procedure Trim (Source : in out Bounded_String;
  23554.                                  Left  : in Maps.Character_Set;
  23555.                                  Right  : in Maps.Character_Set);
  23556.  
  23557.         70.
  23558.  
  23559.                           function Head (Source : in Bounded_String;
  23560.                                  Count  : in Natural;
  23561.                                  Pad   : in Character  := Space;
  23562.                                  Drop  : in Truncation := Error)
  23563.                            return Bounded_String;
  23564.  
  23565.         71.
  23566.  
  23567.                           procedure Head (Source : in out Bounded_String;
  23568.                                  Count  : in Natural;
  23569.                                  Pad   : in Character  := Space;
  23570.                                  Drop  : in Truncation := Error);
  23571.  
  23572.         72.
  23573.  
  23574.                           function Tail (Source : in Bounded_String;
  23575.                                  Count  : in Natural;
  23576.                                  Pad   : in Character  := Space;
  23577.                                  Drop  : in Truncation := Error)
  23578.                            return Bounded_String;
  23579.  
  23580.         73.
  23581.  
  23582.                           procedure Tail (Source : in out Bounded_String;
  23583.                                  Count  : in Natural;
  23584.                                  Pad   : in Character  := Space;
  23585.                                  Drop  : in Truncation := Error);
  23586.  
  23587.         74.
  23588.  
  23589.                           -- String constructor subprograms
  23590.  
  23591.         75.
  23592.  
  23593.                           function "*" (Left  : in Natural;
  23594.                                 Right : in Character)
  23595.                            return Bounded_String;
  23596.  
  23597.         76.
  23598.  
  23599.                           function "*" (Left  : in Natural;
  23600.                                 Right : in String)
  23601.                            return Bounded_String;
  23602.  
  23603.         77.
  23604.  
  23605.                           function "*" (Left  : in Natural;
  23606.                                 Right : in Bounded_String)
  23607.                            return Bounded_String;
  23608.  
  23609.         78.
  23610.  
  23611.                           function Replicate (Count : in Natural;
  23612.                                    Item  : in Character;
  23613.                                    Drop  : in Truncation := Error)
  23614.                            return Bounded_String;
  23615.  
  23616.         79.
  23617.  
  23618.                           function Replicate (Count : in Natural;
  23619.                                    Item  : in String;
  23620.                                    Drop  : in Truncation := Error)
  23621.                            return Bounded_String;
  23622.  
  23623.         80.
  23624.  
  23625.                           function Replicate (Count : in Natural;
  23626.                                    Item  : in Bounded_String;
  23627.                                    Drop  : in Truncation := Error)
  23628.                            return Bounded_String;
  23629.  
  23630.         81.
  23631.  
  23632.                         private
  23633.                           ┬╖┬╖┬╖ -- not specified by the language
  23634.                         end Generic_Bounded_Length;
  23635.  
  23636.         82.
  23637.  
  23638.                       end Ada.Strings.Bounded;
  23639.  
  23640.   83. Null_Bounded_String represents the null string. If an object of type 
  23641.       Bounded_String is not otherwise initialized, it will be initialized to 
  23642.       the same value as Null_Bounded_String. 
  23643.  
  23644.         84.
  23645.  
  23646.             function Length (Source : in Bounded_String) return Length_Range;
  23647.  
  23648.         a. The Length function returns the length of the string represented by 
  23649.            Source. 
  23650.  
  23651.          1.
  23652.  
  23653.             function To_Bounded_String (Source : in String;
  23654.                           Drop  : in Truncation := Error)
  23655.               return Bounded_String;
  23656.  
  23657.         a. If Source'Length <= Max_Length then this function returns a 
  23658.            Bounded_String that represents Source. Otherwise the effect depends 
  23659.            on the value of Drop: 
  23660.  
  23661.              1. If Drop=Left, then the result is a Bounded_String that 
  23662.                 represents the string comprising the rightmost Max_Length 
  23663.                 characters of Source. 
  23664.  
  23665.              2. If Drop=Right, then the result is a Bounded_String that 
  23666.                 represents the string comprising the leftmost Max_Length 
  23667.                 characters of Source. 
  23668.  
  23669.              3. If Drop=Error, then Strings.Length_Error is propagated. 
  23670.  
  23671.          1.
  23672.  
  23673.             function To_String (Source : in Bounded_String) return String;
  23674.  
  23675.         a. To_String returns the String value with lower bound 1 represented by 
  23676.            Source. If B is a Bounded_String, then B = 
  23677.            To_Bounded_String(To_String(B)). 
  23678.  
  23679.    1. Each of the Append functions returns a Bounded_String obtained by 
  23680.       concatenating the string or character given or represented by one of the 
  23681.       parameters, with the string or character given or represented by the 
  23682.       other parameter, and applying To_Bounded_String to the concatenation 
  23683.       result string, with Drop as provided to the Append function. 
  23684.  
  23685.    2. Each of the procedures Append(Source, New_Item, Drop) has the same effect 
  23686.       as the corresponding assignment Source := Append(Source, New_Item, Drop). 
  23687.  
  23688.    3. Each of the "&" functions has the same effect as the corresponding Append 
  23689.       function, with Error as the Drop parameter. 
  23690.  
  23691.          4.
  23692.  
  23693.             function Element (Source : in Bounded_String;
  23694.                      Index  : in Positive)
  23695.               return Character;
  23696.  
  23697.         a. Returns the character at position Index in the string represented by 
  23698.            Source; propagates Index_Error if Index > Length(Source). 
  23699.  
  23700.          1.
  23701.  
  23702.             procedure Replace_Element (Source : in out Bounded_String;
  23703.                           Index  : in Positive;
  23704.                           By   : in Character);
  23705.  
  23706.         a. Updates Source such that the character at position Index in the 
  23707.            string represented by Source is By; propagates Index_Error if Index 
  23708.            > Length(Source). 
  23709.  
  23710.          1.
  23711.  
  23712.             function Slice (Source : in Bounded_String;
  23713.                     Low   : in Positive;
  23714.                     High  : in Natural)
  23715.               return String;
  23716.  
  23717.         a. Returns the slice at positions Low through High in the string 
  23718.            represented by Source; propagates Index_Error if Low > 
  23719.            Length(Source)+1. 
  23720.  
  23721.    1. Each of the functions "=", "<", ">","<=", and ">=" returns the same 
  23722.       result as the corresponding String operation applied to the String values 
  23723.       given or represented by the two parameters. 
  23724.  
  23725.    2. Each of the search subprograms (Index, Index_Non_Blank, Count, 
  23726.       Find_Token) has the same effect as the corresponding subprogram in 
  23727.       Strings.Fixed applied to the string represented by the Bounded_String 
  23728.       parameter. 
  23729.  
  23730.    3. Each of the Translate subprograms, when applied to a Bounded_String, has 
  23731.       an analogous effect to the corresponding subprogram in Strings.Fixed. For 
  23732.       the Translate function, the translation is applied to the string 
  23733.       represented by the Bounded_String parameter, and the result is converted 
  23734.       (via To_Bounded_String) to a Bounded_String. For the Translate procedure, 
  23735.       the string represented by the Bounded_String parameter after the 
  23736.       translation is given by the Translate function for fixed-length strings 
  23737.       applied to the string represented by the original value of the parameter. 
  23738.  
  23739.    4. Each of the transformation subprograms (Replace_Slice, Insert, Overwrite, 
  23740.       Delete), selector subprograms (Trim, Head, Tail), and constructor 
  23741.       functions ("*") has an effect based on its corresponding subprogram in 
  23742.       Strings.Fixed, and Replicate is based on Fixed."*". For each of these 
  23743.       subprograms, the corresponding fixed-length string subprogram is applied 
  23744.       to the string represented by the Bounded_String parameter. 
  23745.       To_Bounded_String is applied the result string, with Drop (or Error in 
  23746.       the case of Generic_Bounded_Length."*") determining the effect when the 
  23747.       string length exceeds Max_Length. 
  23748.  
  23749.             Implementation Advice
  23750.  
  23751.    5. Bounded string objects should not be implemented by implicit pointers and 
  23752.       dynamic allocation. 
  23753.  
  23754.  
  23755. ΓòÉΓòÉΓòÉ 17.4.5. Unbounded-Length String Handling ΓòÉΓòÉΓòÉ
  23756.  
  23757.    1. The language-defined package Strings.Unbounded provides a private type 
  23758.       Unbounded_String and a set of operations. An object of type 
  23759.       Unbounded_String represents a String whose low bound is 1 and whose 
  23760.       length can vary conceptually between 0 and Natural'Last. The subprograms 
  23761.       for fixed-length string handling are either overloaded directly for 
  23762.       Unbounded_String, or are modified as needed to reflect the flexibility in 
  23763.       length. Since the Unbounded_String type is private, relevant constructor 
  23764.       and selector operations are provided. 
  23765.  
  23766.             Static Semantics
  23767.  
  23768.    2. The library package Strings.Unbounded has the following declaration: 
  23769.  
  23770.          3.
  23771.  
  23772.                       with Ada.Strings.Maps;
  23773.                       package Ada.Strings.Unbounded is
  23774.                         pragma Preelaborate(Unbounded);
  23775.  
  23776.          4.
  23777.  
  23778.                         type Unbounded_String is private;
  23779.  
  23780.          5.
  23781.  
  23782.                         Null_Unbounded_String : constant Unbounded_String;
  23783.  
  23784.          6.
  23785.  
  23786.                         function Length (Source : in Unbounded_String) return Natural;
  23787.  
  23788.          7.
  23789.  
  23790.                         type String_Access is access all String;
  23791.                         procedure Free (X : in out String_Access);
  23792.  
  23793.          8.
  23794.  
  23795.                         -- Conversion, Concatenation, and Selection functions
  23796.  
  23797.          9.
  23798.  
  23799.                         function To_Unbounded_String (Source : in String)
  23800.                          return Unbounded_String;
  23801.  
  23802.         10.
  23803.  
  23804.                         function To_Unbounded_String (Length : in Natural)
  23805.                          return Unbounded_String;
  23806.  
  23807.         11.
  23808.  
  23809.                         function To_String (Source : in Unbounded_String) return String;
  23810.  
  23811.         12.
  23812.  
  23813.                         procedure Append (Source  : in out Unbounded_String;
  23814.                                  New_Item : in Unbounded_String);
  23815.  
  23816.         13.
  23817.  
  23818.                         procedure Append (Source  : in out Unbounded_String;
  23819.                                  New_Item : in String);
  23820.  
  23821.         14.
  23822.  
  23823.                         procedure Append (Source  : in out Unbounded_String;
  23824.                                  New_Item : in Character);
  23825.  
  23826.         15.
  23827.  
  23828.                         function "&" (Left, Right : in Unbounded_String)
  23829.                          return Unbounded_String;
  23830.  
  23831.         16.
  23832.  
  23833.                         function "&" (Left : in Unbounded_String; Right : in String)
  23834.                          return Unbounded_String;
  23835.  
  23836.         17.
  23837.  
  23838.                         function "&" (Left : in String; Right : in Unbounded_String)
  23839.                          return Unbounded_String;
  23840.  
  23841.         18.
  23842.  
  23843.                         function "&" (Left : in Unbounded_String; Right : in Character)
  23844.                          return Unbounded_String;
  23845.  
  23846.         19.
  23847.  
  23848.                         function "&" (Left : in Character; Right : in Unbounded_String)
  23849.                          return Unbounded_String;
  23850.  
  23851.         20.
  23852.  
  23853.                         function Element (Source : in Unbounded_String;
  23854.                                  Index  : in Positive)
  23855.                          return Character;
  23856.  
  23857.         21.
  23858.  
  23859.                         procedure Replace_Element (Source : in out Unbounded_String;
  23860.                                      Index  : in Positive;
  23861.                                      By   : in Character);
  23862.  
  23863.         22.
  23864.  
  23865.                         function Slice (Source : in Unbounded_String;
  23866.                                 Low   : in Positive;
  23867.                                 High  : in Natural)
  23868.                          return String;
  23869.  
  23870.         23.
  23871.  
  23872.                         function "="  (Left, Right : in Unbounded_String) return Boolean;
  23873.  
  23874.         24.
  23875.  
  23876.                         function "="  (Left : in Unbounded_String; Right : in String)
  23877.                          return Boolean;
  23878.  
  23879.         25.
  23880.  
  23881.                         function "="  (Left : in String; Right : in Unbounded_String)
  23882.                          return Boolean;
  23883.  
  23884.         26.
  23885.  
  23886.                         function "<"  (Left, Right : in Unbounded_String) return Boolean;
  23887.  
  23888.         27.
  23889.  
  23890.                         function "<"  (Left : in Unbounded_String; Right : in String)
  23891.                          return Boolean;
  23892.  
  23893.         28.
  23894.  
  23895.                         function "<"  (Left : in String; Right : in Unbounded_String)
  23896.                          return Boolean;
  23897.  
  23898.         29.
  23899.  
  23900.                         function "<=" (Left, Right : in Unbounded_String) return Boolean;
  23901.  
  23902.         30.
  23903.  
  23904.                         function "<="  (Left : in Unbounded_String; Right : in String)
  23905.                          return Boolean;
  23906.  
  23907.         31.
  23908.  
  23909.                         function "<="  (Left : in String; Right : in Unbounded_String)
  23910.                          return Boolean;
  23911.  
  23912.         32.
  23913.  
  23914.                         function ">"  (Left, Right : in Unbounded_String) return Boolean;
  23915.  
  23916.         33.
  23917.  
  23918.                         function ">"  (Left : in Unbounded_String; Right : in String)
  23919.                          return Boolean;
  23920.  
  23921.         34.
  23922.  
  23923.                         function ">"  (Left : in String; Right : in Unbounded_String)
  23924.                          return Boolean;
  23925.  
  23926.         35.
  23927.  
  23928.                         function ">=" (Left, Right : in Unbounded_String) return Boolean;
  23929.  
  23930.         36.
  23931.  
  23932.                         function ">="  (Left : in Unbounded_String; Right : in String)
  23933.                          return Boolean;
  23934.  
  23935.         37.
  23936.  
  23937.                         function ">="  (Left : in String; Right : in Unbounded_String)
  23938.                          return Boolean;
  23939.  
  23940.         38.
  23941.  
  23942.                         -- Search subprograms
  23943.  
  23944.         39.
  23945.  
  23946.                         function Index (Source  : in Unbounded_String;
  23947.                                 Pattern  : in String;
  23948.                                 Going   : in Direction := Forward;
  23949.                                 Mapping  : in Maps.Character_Mapping
  23950.                                       := Maps.Identity)
  23951.                          return Natural;
  23952.  
  23953.         40.
  23954.  
  23955.                         function Index (Source  : in Unbounded_String;
  23956.                                 Pattern  : in String;
  23957.                                 Going   : in Direction := Forward;
  23958.                                 Mapping  : in Maps.Character_Mapping_Function)
  23959.                          return Natural;
  23960.  
  23961.         41.
  23962.  
  23963.                         function Index (Source : in Unbounded_String;
  23964.                                 Set   : in Maps.Character_Set;
  23965.                                 Test  : in Membership := Inside;
  23966.                                 Going  : in Direction  := Forward) return Natural;
  23967.  
  23968.         42.
  23969.  
  23970.                         function Index_Non_Blank (Source : in Unbounded_String;
  23971.                                      Going  : in Direction := Forward)
  23972.                          return Natural;
  23973.  
  23974.         43.
  23975.  
  23976.                         function Count (Source  : in Unbounded_String;
  23977.                                 Pattern  : in String;
  23978.                                 Mapping  : in Maps.Character_Mapping
  23979.                                       := Maps.Identity)
  23980.                          return Natural;
  23981.  
  23982.         44.
  23983.  
  23984.                         function Count (Source  : in Unbounded_String;
  23985.                                 Pattern  : in String;
  23986.                                 Mapping  : in Maps.Character_Mapping_Function)
  23987.                          return Natural;
  23988.  
  23989.         45.
  23990.  
  23991.                         function Count (Source  : in Unbounded_String;
  23992.                                 Set    : in Maps.Character_Set)
  23993.                          return Natural;
  23994.  
  23995.         46.
  23996.  
  23997.                         procedure Find_Token (Source : in Unbounded_String;
  23998.                                    Set   : in Maps.Character_Set;
  23999.                                    Test  : in Membership;
  24000.                                    First  : out Positive;
  24001.                                    Last  : out Natural);
  24002.  
  24003.         47.
  24004.  
  24005.                         -- String translation subprograms
  24006.  
  24007.         48.
  24008.  
  24009.                         function Translate (Source  : in Unbounded_String;
  24010.                                   Mapping : in Maps.Character_Mapping)
  24011.                          return Unbounded_String;
  24012.  
  24013.         49.
  24014.  
  24015.                         procedure Translate (Source  : in out Unbounded_String;
  24016.                                   Mapping : in Maps.Character_Mapping);
  24017.  
  24018.         50.
  24019.  
  24020.                         function Translate
  24021.                          (Source  : in Unbounded_String;
  24022.                          Mapping : in Maps.Character_Mapping_Function)
  24023.                          return Unbounded_String;
  24024.  
  24025.         51.
  24026.  
  24027.                         procedure Translate
  24028.                          (Source  : in out Unbounded_String;
  24029.                          Mapping : in Maps.Character_Mapping_Function);
  24030.  
  24031.         52.
  24032.  
  24033.                         -- String transformation subprograms
  24034.  
  24035.         53.
  24036.  
  24037.                         function Replace_Slice (Source  : in Unbounded_String;
  24038.                                     Low    : in Positive;
  24039.                                     High   : in Natural;
  24040.                                     By    : in String)
  24041.                          return Unbounded_String;
  24042.  
  24043.         54.
  24044.  
  24045.                         procedure Replace_Slice (Source  : in out Unbounded_String;
  24046.                                     Low    : in Positive;
  24047.                                     High   : in Natural;
  24048.                                     By    : in String);
  24049.  
  24050.         55.
  24051.  
  24052.                         function Insert (Source  : in Unbounded_String;
  24053.                                 Before  : in Positive;
  24054.                                 New_Item : in String)
  24055.                          return Unbounded_String;
  24056.  
  24057.         56.
  24058.  
  24059.                         procedure Insert (Source  : in out Unbounded_String;
  24060.                                  Before  : in Positive;
  24061.                                  New_Item : in String);
  24062.  
  24063.         57.
  24064.  
  24065.                         function Overwrite (Source   : in Unbounded_String;
  24066.                                   Position  : in Positive;
  24067.                                   New_Item  : in String)
  24068.                          return Unbounded_String;
  24069.  
  24070.         58.
  24071.  
  24072.                         procedure Overwrite (Source   : in out Unbounded_String;
  24073.                                   Position  : in Positive;
  24074.                                   New_Item  : in String);
  24075.  
  24076.         59.
  24077.  
  24078.                         function Delete (Source  : in Unbounded_String;
  24079.                                 From   : in Positive;
  24080.                                 Through : in Natural)
  24081.                          return Unbounded_String;
  24082.  
  24083.         60.
  24084.  
  24085.                         procedure Delete (Source  : in out Unbounded_String;
  24086.                                  From   : in Positive;
  24087.                                  Through : in Natural);
  24088.  
  24089.         61.
  24090.  
  24091.                         function Trim (Source : in Unbounded_String;
  24092.                                Side  : in Trim_End)
  24093.                          return Unbounded_String;
  24094.  
  24095.         62.
  24096.  
  24097.                         procedure Trim (Source : in out Unbounded_String;
  24098.                                 Side  : in Trim_End);
  24099.  
  24100.         63.
  24101.  
  24102.                         function Trim (Source : in Unbounded_String;
  24103.                                Left  : in Maps.Character_Set;
  24104.                                Right  : in Maps.Character_Set)
  24105.                          return Unbounded_String;
  24106.  
  24107.         64.
  24108.  
  24109.                         procedure Trim (Source : in out Unbounded_String;
  24110.                                 Left  : in Maps.Character_Set;
  24111.                                 Right  : in Maps.Character_Set);
  24112.  
  24113.         65.
  24114.  
  24115.                         function Head (Source : in Unbounded_String;
  24116.                                Count  : in Natural;
  24117.                                Pad   : in Character := Space)
  24118.                          return Unbounded_String;
  24119.  
  24120.         66.
  24121.  
  24122.                         procedure Head (Source : in out Unbounded_String;
  24123.                                 Count  : in Natural;
  24124.                                 Pad   : in Character := Space);
  24125.  
  24126.         67.
  24127.  
  24128.                         function Tail (Source : in Unbounded_String;
  24129.                                Count  : in Natural;
  24130.                                Pad   : in Character := Space)
  24131.                          return Unbounded_String;
  24132.  
  24133.         68.
  24134.  
  24135.                         procedure Tail (Source : in out Unbounded_String;
  24136.                                 Count  : in Natural;
  24137.                                 Pad   : in Character := Space);
  24138.  
  24139.         69.
  24140.  
  24141.                         function "*" (Left  : in Natural;
  24142.                                Right : in Character)
  24143.                          return Unbounded_String;
  24144.  
  24145.         70.
  24146.  
  24147.                         function "*" (Left  : in Natural;
  24148.                                Right : in String)
  24149.                          return Unbounded_String;
  24150.  
  24151.         71.
  24152.  
  24153.                         function "*" (Left  : in Natural;
  24154.                                Right : in Unbounded_String)
  24155.                          return Unbounded_String;
  24156.  
  24157.         72.
  24158.  
  24159.                       private
  24160.                         ┬╖┬╖┬╖ -- not specified by the language
  24161.                       end Ada.Strings.Unbounded;
  24162.  
  24163.   73. Null_Unbounded_String represents the null String. If an object of type 
  24164.       Unbounded_String is not otherwise initialized, it will be initialized to 
  24165.       the same value as Null_Unbounded_String. 
  24166.  
  24167.   74. The function Length returns the length of the String represented by 
  24168.       Source. 
  24169.  
  24170.   75. The type String_Access provides a (non-private) access type for explicit 
  24171.       processing of unbounded-length strings. The procedure Free performs an 
  24172.       unchecked deallocation of an object of type String_Access. 
  24173.  
  24174.   76. The function To_Unbounded_String(Source : in String) returns an 
  24175.       Unbounded_String that represents Source. The function 
  24176.       To_Unbounded_String(Length : in Natural) returns an Unbounded_String that 
  24177.       represents an uninitialized String whose length is Length. 
  24178.  
  24179.   77. The function To_String returns the String with lower bound 1 represented 
  24180.       by Source. To_String and To_Unbounded_String are related as follows: 
  24181.  
  24182.         a. If S is a String, then To_String(To_Unbounded_String(S)) = S. 
  24183.  
  24184.         b. If U is an Unbounded_String, then To_Unbounded_String(To_String(U)) 
  24185.            = U. 
  24186.  
  24187.    1. For each of the Append procedures, the resulting string represented by 
  24188.       the Source parameter is given by the concatenation of the original value 
  24189.       of Source and the value of New_Item. 
  24190.  
  24191.    2. Each of the "&" functions returns an Unbounded_String obtained by 
  24192.       concatenating the string or character given or represented by one of the 
  24193.       parameters, with the string or character given or represented by the 
  24194.       other parameter, and applying To_Unbounded_String to the concatenation 
  24195.       result string. 
  24196.  
  24197.    3. The Element, Replace_Element, and Slice subprograms have the same effect 
  24198.       as the corresponding bounded-length string subprograms. 
  24199.  
  24200.    4. Each of the functions "=", "<", ">","<=", and ">=" returns the same 
  24201.       result as the corresponding String operation applied to the String values 
  24202.       given or represented by Left and Right. 
  24203.  
  24204.    5. Each of the search subprograms (Index, Index_Non_Blank, Count, 
  24205.       Find_Token) has the same effect as the corresponding subprogram in 
  24206.       Strings.Fixed applied to the string represented by the Unbounded_String 
  24207.       parameter. 
  24208.  
  24209.    6. The Translate function has an analogous effect to the corresponding 
  24210.       subprogram in Strings.Fixed. The translation is applied to the string 
  24211.       represented by the Unbounded_String parameter, and the result is 
  24212.       converted (via To_Unbounded_String) to an Unbounded_String. 
  24213.  
  24214.    7. Each of the transformation functions (Replace_Slice, Insert, Overwrite, 
  24215.       Delete), selector functions (Trim, Head, Tail), and constructor functions 
  24216.       ("*") is likewise analogous to its corresponding subprogram in 
  24217.       Strings.Fixed. For each of the subprograms, the corresponding 
  24218.       fixed-length string subprogram is applied to the string represented by 
  24219.       the Unbounded_String parameter, and To_Unbounded_String is applied the 
  24220.       result string. 
  24221.  
  24222.    8. For each of the procedures Translate, Replace_Slice, Insert, Overwrite, 
  24223.       Delete, Trim, Head, and Tail, the resulting string represented by the 
  24224.       Source parameter is given by the corresponding function for fixed-length 
  24225.       strings applied to the string represented by Source's original value. 
  24226.  
  24227.             Implementation Requirements
  24228.  
  24229.    9. No storage associated with an Unbounded_String object shall be lost upon 
  24230.       assignment or scope exit. 
  24231.  
  24232.  
  24233. ΓòÉΓòÉΓòÉ 17.4.6. String-Handling Sets and Mappings ΓòÉΓòÉΓòÉ
  24234.  
  24235.    1. The language-defined package Strings.Maps.Constants declares 
  24236.       Character_Set and Character_Mapping constants corresponding to 
  24237.       classification and conversion functions in package Characters.Handling. 
  24238.  
  24239.             Static Semantics
  24240.  
  24241.    2. The library package Strings.Maps.Constants has the following declaration: 
  24242.  
  24243.          3.
  24244.  
  24245.                       package Ada.Strings.Maps.Constants is
  24246.                         pragma Preelaborate(Constants);
  24247.  
  24248.          4.
  24249.  
  24250.                         Control_Set      : constant Character_Set;
  24251.                         Graphic_Set      : constant Character_Set;
  24252.                         Letter_Set       : constant Character_Set;
  24253.                         Lower_Set       : constant Character_Set;
  24254.                         Upper_Set       : constant Character_Set;
  24255.                         Basic_Set       : constant Character_Set;
  24256.                         Decimal_Digit_Set   : constant Character_Set;
  24257.                         Hexadecimal_Digit_Set : constant Character_Set;
  24258.                         Alphanumeric_Set    : constant Character_Set;
  24259.                         Special_Set      : constant Character_Set;
  24260.                         ISO_646_Set      : constant Character_Set;
  24261.  
  24262.          5.
  24263.  
  24264.                         Lower_Case_Map     : constant Character_Mapping;
  24265.                          --Maps to lower case for letters, else identity
  24266.                         Upper_Case_Map     : constant Character_Mapping;
  24267.                          --Maps to upper case for letters, else identity
  24268.                         Basic_Map       : constant Character_Mapping;
  24269.                          --Maps to basic letter for letters, else identity
  24270.  
  24271.          6.
  24272.  
  24273.                       private
  24274.                         ┬╖┬╖┬╖ -- not specified by the language
  24275.                       end Ada.Strings.Maps.Constants;
  24276.  
  24277.    7. Each of these constants represents a correspondingly named set of 
  24278.       characters or character mapping in Characters.Handling, see A.3.2. 
  24279.  
  24280.  
  24281. ΓòÉΓòÉΓòÉ 17.4.7. Wide_String Handling ΓòÉΓòÉΓòÉ
  24282.  
  24283.    1. Facilities for handling strings of Wide_Character elements are found in 
  24284.       the packages Strings.Wide_Maps, Strings.Wide_Fixed, Strings.Wide_Bounded, 
  24285.       Strings.Wide_Unbounded, and Strings.Wide_Maps.Wide_Constants. They 
  24286.       provide the same string-handling operations as the corresponding packages 
  24287.       for strings of Character elements. 
  24288.  
  24289.             Static Semantics
  24290.  
  24291.    2. The package Strings.Wide_Maps has the following declaration. 
  24292.  
  24293.          3.
  24294.  
  24295.                       package Ada.Strings.Wide_Maps is
  24296.                         pragma Preelaborate(Wide_Maps);
  24297.  
  24298.          4.
  24299.  
  24300.                         -- Representation for a set of Wide_Character values:
  24301.                         type Wide_Character_Set is private;
  24302.  
  24303.          5.
  24304.  
  24305.                         Null_Set : constant Wide_Character_Set;
  24306.  
  24307.          6.
  24308.  
  24309.                         type Wide_Character_Range is
  24310.                          record
  24311.                            Low  : Wide_Character;
  24312.                            High : Wide_Character;
  24313.                          end record;
  24314.                         -- Represents Wide_Character range Low┬╖┬╖High
  24315.  
  24316.          7.
  24317.  
  24318.                         type Wide_Character_Ranges is array (Positive range <>)
  24319.                          of Wide_Character_Range;
  24320.  
  24321.          8.
  24322.  
  24323.                         function To_Set (Ranges : in Wide_Character_Ranges)
  24324.                          return Wide_Character_Set;
  24325.  
  24326.          9.
  24327.  
  24328.                         function To_Set (Span : in Wide_Character_Range)
  24329.                          return Wide_Character_Set;
  24330.  
  24331.         10.
  24332.  
  24333.                         function To_Ranges (Set : in Wide_Character_Set)
  24334.                          return Wide_Character_Ranges;
  24335.  
  24336.         11.
  24337.  
  24338.                         function "=" (Left, Right : in Wide_Character_Set) return Boolean;
  24339.  
  24340.         12.
  24341.  
  24342.                         function "not" (Right : in Wide_Character_Set)
  24343.                          return Wide_Character_Set;
  24344.                         function "and" (Left, Right : in Wide_Character_Set)
  24345.                          return Wide_Character_Set;
  24346.                         function "or"  (Left, Right : in Wide_Character_Set)
  24347.                          return Wide_Character_Set;
  24348.                         function "xor" (Left, Right : in Wide_Character_Set)
  24349.                          return Wide_Character_Set;
  24350.                         function "-"  (Left, Right : in Wide_Character_Set)
  24351.                          return Wide_Character_Set;
  24352.  
  24353.         13.
  24354.  
  24355.                         function Is_In (Element : in Wide_Character;
  24356.                                 Set   : in Wide_Character_Set)
  24357.                          return Boolean;
  24358.  
  24359.         14.
  24360.  
  24361.                         function Is_Subset (Elements : in Wide_Character_Set;
  24362.                                   Set    : in Wide_Character_Set)
  24363.                          return Boolean;
  24364.  
  24365.         15.
  24366.  
  24367.                         function "<=" (Left  : in Wide_Character_Set;
  24368.                                Right : in Wide_Character_Set)
  24369.                          return Boolean renames Is_Subset;
  24370.  
  24371.         16.
  24372.  
  24373.                         -- Alternative representation for a set of Wide_Character values:
  24374.                         subtype Wide_Character_Sequence is Wide_String;
  24375.  
  24376.         17.
  24377.  
  24378.                         function To_Set (Sequence : in Wide_Character_Sequence)
  24379.                          return Wide_Character_Set;
  24380.  
  24381.         18.
  24382.  
  24383.                         function To_Set (Singleton : in Wide_Character)
  24384.                          return Wide_Character_Set;
  24385.  
  24386.         19.
  24387.  
  24388.                         function To_Sequence (Set : in Wide_Character_Set)
  24389.                          return Wide_Character_Sequence;
  24390.  
  24391.         20.
  24392.  
  24393.                         -- Representation for a Wide_Character to Wide_Character mapping:
  24394.                         type Wide_Character_Mapping is private;
  24395.  
  24396.         21.
  24397.  
  24398.                         function Value (Map   : in Wide_Character_Mapping;
  24399.                                 Element : in Wide_Character)
  24400.                          return Wide_Character;
  24401.  
  24402.         22.
  24403.  
  24404.                         Identity : constant Wide_Character_Mapping;
  24405.  
  24406.         23.
  24407.  
  24408.                         function To_Mapping (From, To : in Wide_Character_Sequence)
  24409.                          return Wide_Character_Mapping;
  24410.  
  24411.         24.
  24412.  
  24413.                         function To_Domain (Map : in Wide_Character_Mapping)
  24414.                          return Wide_Character_Sequence;
  24415.  
  24416.         25.
  24417.  
  24418.                         function To_Range  (Map : in Wide_Character_Mapping)
  24419.                          return Wide_Character_Sequence;
  24420.  
  24421.         26.
  24422.  
  24423.                         type Wide_Character_Mapping_Function is access
  24424.                          function (From : in Wide_Character) return Wide_Character;
  24425.  
  24426.         27.
  24427.  
  24428.                       private
  24429.                         ┬╖┬╖┬╖ -- not specified by the language
  24430.                       end Ada.Strings.Wide_Maps;
  24431.  
  24432.   28. The context clause for each of the packages Strings.Wide_Fixed, 
  24433.       Strings.Wide_Bounded, and Strings.Wide_Unbounded identifies 
  24434.       Strings.Wide_Maps instead of Strings.Maps. 
  24435.  
  24436.   29. For each of the packages Strings.Fixed, Strings.Bounded, 
  24437.       Strings.Unbounded, and Strings.Maps.Constants the corresponding wide 
  24438.       string package has the same contents except that 
  24439.  
  24440.         a. Wide_Space replaces Space 
  24441.  
  24442.         b. Wide_Character replaces Character 
  24443.  
  24444.         c. Wide_String replaces String 
  24445.  
  24446.         d. Wide_Character_Set replaces Character_Set 
  24447.  
  24448.         e. Wide_Character_Mapping replaces Character_Mapping 
  24449.  
  24450.         f. Wide_Character_Mapping_Function replaces Character_Mapping_Function 
  24451.  
  24452.         g. Wide_Maps replaces Maps 
  24453.  
  24454.         h. Bounded_Wide_String replaces Bounded_String 
  24455.  
  24456.         i. Null_Bounded_Wide_String replaces Null_Bounded_String 
  24457.  
  24458.         j. To_Bounded_Wide_String replaces To_Bounded_String 
  24459.  
  24460.         k. To_Wide_String replaces To_String 
  24461.  
  24462.         l. Unbounded_Wide_String replaces Unbounded_String 
  24463.  
  24464.         m. Null_Unbounded_Wide_String replaces Null_Unbounded_String 
  24465.  
  24466.         n. Wide_String_Access replaces String_Access 
  24467.  
  24468.         o. To_Unbounded_Wide_String replaces To_Unbounded_String 
  24469.  
  24470.    1. The following additional declaration is present in 
  24471.       Strings.Wide_Maps.Wide_Constants: 
  24472.  
  24473.          2.
  24474.  
  24475.                       Character_Set : constant Wide_Maps.Wide_Character_Set;
  24476.                       --  Contains each Wide_Character value WC such that
  24477.                       --  Characters.Is_Character(WC) is True
  24478.  
  24479.  NOTES 
  24480.  
  24481.    3. (12) If a null Wide_Character_Mapping_Function is passed to any of the 
  24482.       Wide_String handling subprograms, Constraint_Error is propagated. 
  24483.  
  24484.    4. (13) Each Wide_Character_Set constant in the package 
  24485.       Strings.Wide_Maps.Wide_Constants contains no values outside the Character 
  24486.       portion of Wide_Character. Similarly, each Wide_Character_Mapping 
  24487.       constant in this package is the identity mapping when applied to any 
  24488.       element outside the Character portion of Wide_Character. 
  24489.  
  24490.  
  24491. ΓòÉΓòÉΓòÉ 17.5. The Numerics Packages ΓòÉΓòÉΓòÉ
  24492.  
  24493.    1. The library package Numerics is the parent of several child units that 
  24494.       provide facilities for mathematical computation. One child, the generic 
  24495.       package Generic_Elementary_Functions, is defined in A.5.1, together with 
  24496.       nongeneric equivalents; two others, the package Float_Random and the 
  24497.       generic package Discrete_Random, are defined in A.5.2. Additional 
  24498.       (optional) children are defined in G: ``Numerics''. 
  24499.  
  24500.             Static Semantics
  24501.  
  24502.          1.
  24503.  
  24504.                       package Ada.Numerics is
  24505.                         pragma Pure(Numerics);
  24506.                         Argument_Error : exception;
  24507.                         Pi : constant :=
  24508.                          3.14159_26535_89793_23846_26433_83279_50288_41971_69399_37511;
  24509.                         e  : constant :=
  24510.                          2.71828_18284_59045_23536_02874_71352_66249_77572_47093_69996;
  24511.                       end Ada.Numerics;
  24512.  
  24513.    2. The Argument_Error exception is raised by a subprogram in a child unit of 
  24514.       Numerics to signal that one or more of the actual subprogram parameters 
  24515.       are outside the domain of the corresponding mathematical function. 
  24516.  
  24517.             Implementation Permissions
  24518.  
  24519.    3. The implementation may specify the values of Pi and e to a larger number 
  24520.       of significant digits. 
  24521.  
  24522.  A.5.1                         Elementary Functions 
  24523.  A.5.2                         Random Number Generation 
  24524.  A.5.3                         Attributes of Floating Point Types 
  24525.  A.5.4                         Attributes of Fixed Point Types 
  24526.  
  24527.  
  24528. ΓòÉΓòÉΓòÉ 17.5.1. Elementary Functions ΓòÉΓòÉΓòÉ
  24529.  
  24530.    1. Implementation-defined approximations to the mathematical functions known 
  24531.       as the ``elementary functions'' are provided by the subprograms in 
  24532.       Numerics.Generic_Elementary_Functions. Nongeneric equivalents of this 
  24533.       generic package for each of the predefined floating point types are also 
  24534.       provided as children of Numerics. 
  24535.  
  24536.             Static Semantics
  24537.  
  24538.    2. The generic library package Numerics.Generic_Elementary_Functions has the 
  24539.       following declaration: 
  24540.  
  24541.          3.
  24542.  
  24543.                       generic
  24544.                         type Float_Type is digits <>;
  24545.                       package Ada.Numerics.Generic_Elementary_Functions is
  24546.                         pragma Pure(Generic_Elementary_Functions);
  24547.  
  24548.          4.
  24549.  
  24550.                         function Sqrt (X    : Float_Type'Base) return Float_Type'Base;
  24551.                         function Log  (X    : Float_Type'Base) return Float_Type'Base;
  24552.                         function Log  (X, Base : Float_Type'Base) return Float_Type'Base;
  24553.                         function Exp  (X    : Float_Type'Base) return Float_Type'Base;
  24554.                         function "**" (Left, Right : Float_Type'Base)
  24555.                          return Float_Type'Base;
  24556.  
  24557.          5.
  24558.  
  24559.                         function Sin (X     : Float_Type'Base) return Float_Type'Base;
  24560.                         function Sin (X, Cycle : Float_Type'Base) return Float_Type'Base;
  24561.                         function Cos (X     : Float_Type'Base) return Float_Type'Base;
  24562.                         function Cos (X, Cycle : Float_Type'Base) return Float_Type'Base;
  24563.                         function Tan (X     : Float_Type'Base) return Float_Type'Base;
  24564.                         function Tan (X, Cycle : Float_Type'Base) return Float_Type'Base;
  24565.                         function Cot (X     : Float_Type'Base) return Float_Type'Base;
  24566.                         function Cot (X, Cycle : Float_Type'Base) return Float_Type'Base;
  24567.  
  24568.          6.
  24569.  
  24570.                         function Arcsin (X     : Float_Type'Base)
  24571.                          return Float_Type'Base;
  24572.                         function Arcsin (X, Cycle : Float_Type'Base)
  24573.                          return Float_Type'Base;
  24574.                         function Arccos (X     : Float_Type'Base)
  24575.                          return Float_Type'Base;
  24576.                         function Arccos (X, Cycle : Float_Type'Base)
  24577.                          return Float_Type'Base;
  24578.                         function Arctan (Y     : Float_Type'Base;
  24579.                                 X     : Float_Type'Base := 1.0)
  24580.                          return Float_Type'Base;
  24581.                         function Arctan (Y     : Float_Type'Base;
  24582.                                 X     : Float_Type'Base := 1.0;
  24583.                                 Cycle   : Float_Type'Base)
  24584.                          return Float_Type'Base;
  24585.                         function Arccot (X     : Float_Type'Base;
  24586.                                 Y     : Float_Type'Base := 1.0)
  24587.                          return Float_Type'Base;
  24588.                         function Arccot (X     : Float_Type'Base;
  24589.                                 Y     : Float_Type'Base := 1.0;
  24590.                                 Cycle   : Float_Type'Base)
  24591.                          return Float_Type'Base;
  24592.  
  24593.          7.
  24594.  
  24595.                         function Sinh   (X : Float_Type'Base) return Float_Type'Base;
  24596.                         function Cosh   (X : Float_Type'Base) return Float_Type'Base;
  24597.                         function Tanh   (X : Float_Type'Base) return Float_Type'Base;
  24598.                         function Coth   (X : Float_Type'Base) return Float_Type'Base;
  24599.                         function Arcsinh (X : Float_Type'Base) return Float_Type'Base;
  24600.                         function Arccosh (X : Float_Type'Base) return Float_Type'Base;
  24601.                         function Arctanh (X : Float_Type'Base) return Float_Type'Base;
  24602.                         function Arccoth (X : Float_Type'Base) return Float_Type'Base;
  24603.  
  24604.          8.
  24605.  
  24606.                       end Ada.Numerics.Generic_Elementary_Functions;
  24607.  
  24608.    9. The library package Numerics.Elementary_Functions defines the same 
  24609.       subprograms as Numerics.Generic_Elementary_Functions, except that the 
  24610.       predefined type Float is systematically substituted for Float_Type'Base 
  24611.       throughout. Nongeneric equivalents of 
  24612.       Numerics.Generic_Elementary_Functions for each of the other predefined 
  24613.       floating point types are defined similarly, with the names 
  24614.       Numerics.Short_Elementary_Functions, Numerics.Long_Elementary_Functions, 
  24615.       etc. 
  24616.  
  24617.   10. The functions have their usual mathematical meanings. When the Base 
  24618.       parameter is specified, the Log function computes the logarithm to the 
  24619.       given base; otherwise, it computes the natural logarithm. When the Cycle 
  24620.       parameter is specified, the parameter X of the forward trigonometric 
  24621.       functions (Sin, Cos, Tan, and Cot) and the results of the inverse 
  24622.       trigonometric functions (Arcsin, Arccos, Arctan, and Arccot) are measured 
  24623.       in units such that a full cycle of revolution has the given value; 
  24624.       otherwise, they are measured in radians. 
  24625.  
  24626.   11. The computed results of the mathematically multivalued functions are 
  24627.       rendered single-valued by the following conventions, which are meant to 
  24628.       imply the principal branch: 
  24629.  
  24630.         a. The results of the Sqrt and Arccosh functions and that of the 
  24631.            exponentiation operator are nonnegative. 
  24632.  
  24633.         b. The result of the Arcsin function is in the quadrant containing the 
  24634.            point (1.0, x), where x is the value of the parameter X. This 
  24635.            quadrant is I or IV; thus, the range of the Arcsin function is 
  24636.            approximately -Pi/2.0 to Pi/2.0 (-Cycle/4.0 to Cycle/4.0, if the 
  24637.            parameter Cycle is specified). 
  24638.  
  24639.         c. The result of the Arccos function is in the quadrant containing the 
  24640.            point (x, 1.0), where x is the value of the parameter X. This 
  24641.            quadrant is I or II; thus, the Arccos function ranges from 0.0 to 
  24642.            approximately Pi (Cycle/2.0, if the parameter Cycle is specified). 
  24643.  
  24644.         d. The results of the Arctan and Arccot functions are in the quadrant 
  24645.            containing the point (x, y), where x and y are the values of the 
  24646.            parameters X and Y, respectively. This may be any quadrant (I 
  24647.            through IV) when the parameter X (resp., Y) of Arctan (resp., 
  24648.            Arccot) is specified, but it is restricted to quadrants I and IV 
  24649.            (resp., I and II) when that parameter is omitted. Thus, the range 
  24650.            when that parameter is specified is approximately -Pi to Pi 
  24651.            (-Cycle/2.0 to Cycle/2.0, if the parameter Cycle is specified); when 
  24652.            omitted, the range of Arctan (resp., Arccot) is that of Arcsin 
  24653.            (resp., Arccos), as given above. When the point (x, y) lies on the 
  24654.            negative x-axis, the result approximates 
  24655.  
  24656.              1. Pi (resp., -Pi) when the sign of the parameter Y is positive 
  24657.                 (resp., negative), if Float_Type'Signed_Zeros is True; 
  24658.  
  24659.              2. Pi, if Float_Type'Signed_Zeros is False. 
  24660.  
  24661.    1. (In the case of the inverse trigonometric functions, in which a result 
  24662.       lying on or near one of the axes may not be exactly representable, the 
  24663.       approximation inherent in computing the result may place it in an 
  24664.       adjacent quadrant, close to but on the wrong side of the axis.) 
  24665.  
  24666.             Dynamic Semantics
  24667.  
  24668.    2. The exception Numerics.Argument_Error is raised, signaling a parameter 
  24669.       value outside the domain of the corresponding mathematical function, in 
  24670.       the following cases: 
  24671.  
  24672.         a. by any forward or inverse trigonometric function with specified 
  24673.            cycle, when the value of the parameter Cycle is zero or negative; 
  24674.  
  24675.         b. by the Log function with specified base, when the value of the 
  24676.            parameter Base is zero, one, or negative; 
  24677.  
  24678.         c. by the Sqrt and Log functions, when the value of the parameter X is 
  24679.            negative; 
  24680.  
  24681.         d. by the exponentiation operator, when the value of the left operand 
  24682.            is negative or when both operands have the value zero; 
  24683.  
  24684.         e. by the Arcsin, Arccos, and Arctanh functions, when the absolute 
  24685.            value of the parameter X exceeds one; 
  24686.  
  24687.         f. by the Arctan and Arccot functions, when the parameters X and Y both 
  24688.            have the value zero; 
  24689.  
  24690.         g. by the Arccosh function, when the value of the parameter X is less 
  24691.            than one; and 
  24692.  
  24693.         h. by the Arccoth function, when the absolute value of the parameter X 
  24694.            is less than one. 
  24695.  
  24696.    1. The exception Constraint_Error is raised, signaling a pole of the 
  24697.       mathematical function (analogous to dividing by zero), in the following 
  24698.       cases, provided that Float_Type'Machine_Overflows is True: 
  24699.  
  24700.         a. by the Log, Cot, and Coth functions, when the value of the parameter 
  24701.            X is zero; 
  24702.  
  24703.         b. by the exponentiation operator, when the value of the left operand 
  24704.            is zero and the value of the exponent is negative; 
  24705.  
  24706.         c. by the Tan function with specified cycle, when the value of the 
  24707.            parameter X is an odd multiple of the quarter cycle; 
  24708.  
  24709.         d. by the Cot function with specified cycle, when the value of the 
  24710.            parameter X is zero or a multiple of the half cycle; and 
  24711.  
  24712.         e. by the Arctanh and Arccoth functions, when the absolute value of the 
  24713.            parameter X is one. 
  24714.  
  24715.    1. Constraint_Error can also be raised when a finite result overflows (see 
  24716.       G.2.4) this may occur for parameter values sufficiently near poles, and, 
  24717.       in the case of some of the functions, for parameter values with 
  24718.       sufficiently large magnitudes. When Float_Type'Machine_Overflows is 
  24719.       False, the result at poles is unspecified. 
  24720.  
  24721.    2. When one parameter of a function with multiple parameters represents a 
  24722.       pole and another is outside the function's domain, the latter takes 
  24723.       precedence (i.e., Numerics.Argument_Error is raised). 
  24724.  
  24725.             Implementation Requirements
  24726.  
  24727.    3. In the implementation of Numerics.Generic_Elementary_Functions, the range 
  24728.       of intermediate values allowed during the calculation of a final result 
  24729.       shall not be affected by any range constraint of the subtype Float_Type. 
  24730.  
  24731.    4. In the following cases, evaluation of an elementary function shall yield 
  24732.       the prescribed result, provided that the preceding rules do not call for 
  24733.       an exception to be raised: 
  24734.  
  24735.         a. When the parameter X has the value zero, the Sqrt, Sin, Arcsin, Tan, 
  24736.            Sinh, Arcsinh, Tanh, and Arctanh functions yield a result of zero, 
  24737.            and the Exp, Cos, and Cosh functions yield a result of one. 
  24738.  
  24739.         b. When the parameter X has the value one, the Sqrt function yields a 
  24740.            result of one, and the Log, Arccos, and Arccosh functions yield a 
  24741.            result of zero. 
  24742.  
  24743.         c. When the parameter Y has the value zero and the parameter X has a 
  24744.            positive value, the Arctan and Arccot functions yield a result of 
  24745.            zero. 
  24746.  
  24747.         d. The results of the Sin, Cos, Tan, and Cot functions with specified 
  24748.            cycle are exact when the mathematical result is zero; those of the 
  24749.            first two are also exact when the mathematical result is +/-1.0. 
  24750.  
  24751.         e. Exponentiation by a zero exponent yields the value one. 
  24752.            Exponentiation by a unit exponent yields the value of the left 
  24753.            operand. Exponentiation of the value one yields the value one. 
  24754.            Exponentiation of the value zero yields the value zero. 
  24755.  
  24756.    1. Other accuracy requirements for the elementary functions, which apply 
  24757.       only in implementations conforming to the Numerics Annex, and then only 
  24758.       in the ``strict'' mode defined there, see G.2, are given in G.2.4. 
  24759.  
  24760.    2. When Float_Type'Signed_Zeros is True, the sign of a zero result shall be 
  24761.       as follows: 
  24762.  
  24763.         a. A prescribed zero result delivered at the origin by one of the odd 
  24764.            functions (Sin, Arcsin, Sinh, Arcsinh, Tan, Arctan or Arccot as a 
  24765.            function of Y when X is fixed and positive, Tanh, and Arctanh) has 
  24766.            the sign of the parameter X (Y, in the case of Arctan or Arccot). 
  24767.  
  24768.         b. A prescribed zero result delivered by one of the odd functions away 
  24769.            from the origin, or by some other elementary function, has an 
  24770.            implementation-defined sign. 
  24771.  
  24772.         c. A zero result that is not a prescribed result (i.e., one that 
  24773.            results from rounding or underflow) has the correct mathematical 
  24774.            sign. 
  24775.  
  24776.   Implementation Permissions
  24777.  
  24778.    1. The nongeneric equivalent packages may, but need not, be actual 
  24779.       instantiations of the generic package for the appropriate predefined 
  24780.       type. 
  24781.  
  24782.  
  24783. ΓòÉΓòÉΓòÉ 17.5.2. Random Number Generation ΓòÉΓòÉΓòÉ
  24784.  
  24785.    1. Facilities for the generation of pseudo-random floating point numbers are 
  24786.       provided in the package Numerics.Float_Random; the generic package 
  24787.       Numerics.Discrete_Random provides similar facilities for the generation 
  24788.       of pseudo-random integers and pseudo-random values of enumeration types. 
  24789.       For brevity, pseudo-random values of any of these types are called random 
  24790.       numbers. 
  24791.  
  24792.    2. Some of the facilities provided are basic to all applications of random 
  24793.       numbers. These include a limited private type each of whose objects 
  24794.       serves as the generator of a (possibly distinct) sequence of random 
  24795.       numbers; a function to obtain the ``next'' random number from a given 
  24796.       sequence of random numbers (that is, from its generator); and subprograms 
  24797.       to initialize or reinitialize a given generator to a time-dependent state 
  24798.       or a state denoted by a single integer. 
  24799.  
  24800.    3. Other facilities are provided specifically for advanced applications. 
  24801.       These include subprograms to save and restore the state of a given 
  24802.       generator; a private type whose objects can be used to hold the saved 
  24803.       state of a generator; and subprograms to obtain a string representation 
  24804.       of a given generator state, or, given such a string representation, the 
  24805.       corresponding state. 
  24806.  
  24807.             Static Semantics
  24808.  
  24809.    4. The library package Numerics.Float_Random has the following declaration: 
  24810.  
  24811.          5.
  24812.  
  24813.                       package Ada.Numerics.Float_Random is
  24814.  
  24815.          6.
  24816.  
  24817.                         -- Basic facilities
  24818.  
  24819.          7.
  24820.  
  24821.                         type Generator is limited private;
  24822.  
  24823.          8.
  24824.  
  24825.                         subtype Uniformly_Distributed is Float range 0.0 ┬╖┬╖ 1.0;
  24826.                         function Random (Gen : Generator) return Uniformly_Distributed;
  24827.  
  24828.          9.
  24829.  
  24830.                         procedure Reset (Gen    : in Generator;
  24831.                                 Initiator : in Integer);
  24832.                         procedure Reset (Gen    : in Generator);
  24833.  
  24834.         10.
  24835.  
  24836.                         -- Advanced facilities
  24837.  
  24838.         11.
  24839.  
  24840.                         type State is private;
  24841.  
  24842.         12.
  24843.  
  24844.                         procedure Save  (Gen     : in  Generator;
  24845.                                 To_State  : out State);
  24846.                         procedure Reset (Gen     : in  Generator;
  24847.                                 From_State : in  State);
  24848.  
  24849.         13.
  24850.  
  24851.                         Max_Image_Width : constant
  24852.                          := implementation-defined integer value;
  24853.  
  24854.         14.
  24855.  
  24856.                         function Image (Of_State   : State)  return String;
  24857.                         function Value (Coded_State : String) return State;
  24858.  
  24859.         15.
  24860.  
  24861.                       private
  24862.                         ┬╖┬╖┬╖ -- not specified by the language
  24863.                       end Ada.Numerics.Float_Random;
  24864.  
  24865.   16. The generic library package Numerics.Discrete_Random has the following 
  24866.       declaration: 
  24867.  
  24868.         17.
  24869.  
  24870.                       generic
  24871.                         type Result_Subtype is (<>);
  24872.                       package Ada.Numerics.Discrete_Random is
  24873.  
  24874.         18.
  24875.  
  24876.                         -- Basic facilities
  24877.  
  24878.         19.
  24879.  
  24880.                         type Generator is limited private;
  24881.  
  24882.         20.
  24883.  
  24884.                         function Random (Gen : Generator) return Result_Subtype;
  24885.  
  24886.         21.
  24887.  
  24888.                         procedure Reset (Gen    : in Generator;
  24889.                                 Initiator : in Integer);
  24890.                         procedure Reset (Gen    : in Generator);
  24891.  
  24892.         22.
  24893.  
  24894.                         -- Advanced facilities
  24895.  
  24896.         23.
  24897.  
  24898.                         type State is private;
  24899.  
  24900.         24.
  24901.  
  24902.                         procedure Save  (Gen     : in  Generator;
  24903.                                 To_State  : out State);
  24904.                         procedure Reset (Gen     : in  Generator;
  24905.                                 From_State : in  State);
  24906.  
  24907.         25.
  24908.  
  24909.                         Max_Image_Width : constant
  24910.                          := implementation-defined integer value;
  24911.  
  24912.         26.
  24913.  
  24914.                         function Image (Of_State   : State)  return String;
  24915.                         function Value (Coded_State : String) return State;
  24916.  
  24917.         27.
  24918.  
  24919.                       private
  24920.                         ┬╖┬╖┬╖ -- not specified by the language
  24921.                       end Ada.Numerics.Discrete_Random;
  24922.  
  24923.   28. An object of the limited private type Generator is associated with a 
  24924.       sequence of random numbers. Each generator has a hidden (internal) state, 
  24925.       which the operations on generators use to determine the position in the 
  24926.       associated sequence. All generators are implicitly initialized to an 
  24927.       unspecified state that does not vary from one program execution to 
  24928.       another; they may also be explicitly initialized, or reinitialized, to a 
  24929.       time-dependent state, to a previously saved state, or to a state uniquely 
  24930.       denoted by an integer value. 
  24931.  
  24932.   29. An object of the private type State can be used to hold the internal 
  24933.       state of a generator. Such objects are only needed if the application is 
  24934.       designed to save and restore generator states or to examine or 
  24935.       manufacture them. 
  24936.  
  24937.   30. The operations on generators affect the state and therefore the future 
  24938.       values of the associated sequence. The semantics of the operations on 
  24939.       generators and states are defined below. 
  24940.  
  24941.         31.
  24942.  
  24943.             function Random (Gen : Generator) return Uniformly_Distributed;
  24944.  
  24945.             function Random (Gen : Generator) return Result_Subtype;
  24946.  
  24947.         a. Obtains the ``next'' random number from the given generator, 
  24948.            relative to its current state, according to an 
  24949.            implementation-defined algorithm. The result of the function in 
  24950.            Numerics.Float_Random is delivered as a value of the subtype 
  24951.            Uniformly_Distributed, which is a subtype of the predefined type 
  24952.            Float having a range of 0.0 ┬╖┬╖ 1.0. The result of the function in an 
  24953.            instantiation of Numerics.Discrete_Random is delivered as a value of 
  24954.            the generic formal subtype Result_Subtype. 
  24955.  
  24956.          1.
  24957.  
  24958.             procedure Reset (Gen    : in Generator;
  24959.                      Initiator : in Integer);
  24960.  
  24961.             procedure Reset (Gen    : in Generator);
  24962.  
  24963.         a. Sets the state of the specified generator to one that is an 
  24964.            unspecified function of the value of the parameter Initiator (or to 
  24965.            a time-dependent state, if only a generator parameter is specified). 
  24966.            The latter form of the procedure is known as the time-dependent 
  24967.            Reset procedure. 
  24968.  
  24969.          1.
  24970.  
  24971.             procedure Save  (Gen     : in  Generator;
  24972.                      To_State  : out State);
  24973.  
  24974.             procedure Reset (Gen     : in  Generator;
  24975.                      From_State : in  State);
  24976.  
  24977.         a. Save obtains the current state of a generator. Reset gives a 
  24978.            generator the specified state. A generator that is reset to a state 
  24979.            previously obtained by invoking Save is restored to the state it had 
  24980.            when Save was invoked. 
  24981.  
  24982.          1.
  24983.  
  24984.             function Image (Of_State   : State)  return String;
  24985.  
  24986.             function Value (Coded_State : String) return State;
  24987.  
  24988.         a. Image provides a representation of a state coded (in an 
  24989.            implementation-defined way) as a string whose length is bounded by 
  24990.            the value of Max_Image_Width. Value is the inverse of Image: 
  24991.            Value(Image(S)) = S for each state S that can be obtained from a 
  24992.            generator by invoking Save. 
  24993.  
  24994.   Dynamic Semantics
  24995.  
  24996.    1. Instantiation of Numerics.Discrete_Random with a subtype having a null 
  24997.       range raises Constraint_Error. 
  24998.  
  24999.    2. Invoking Value with a string that is not the image of any generator state 
  25000.       raises Constraint_Error. 
  25001.  
  25002.             Implementation Requirements
  25003.  
  25004.    3. A sufficiently long sequence of random numbers obtained by successive 
  25005.       calls to Random is approximately uniformly distributed over the range of 
  25006.       the result subtype. 
  25007.  
  25008.    4. The Random function in an instantiation of Numerics.Discrete_Random is 
  25009.       guaranteed to yield each value in its result subtype in a finite number 
  25010.       of calls, provided that the number of such values does not exceed 2 ** 
  25011.       15. 
  25012.  
  25013.    5. Other performance requirements for the random number generator, which 
  25014.       apply only in implementations conforming to the Numerics Annex, and then 
  25015.       only in the ``strict'' mode defined there, see G.2, are given in G.2.5. 
  25016.  
  25017.             Documentation Requirements
  25018.  
  25019.    6. No one algorithm for random number generation is best for all 
  25020.       applications. To enable the user to determine the suitability of the 
  25021.       random number generators for the intended application, the implementation 
  25022.       shall describe the algorithm used and shall give its period, if known 
  25023.       exactly, or a lower bound on the period, if the exact period is unknown. 
  25024.       Periods that are so long that the periodicity is unobservable in practice 
  25025.       can be described in such terms, without giving a numerical bound. 
  25026.  
  25027.    7. The implementation also shall document the minimum time interval between 
  25028.       calls to the time-dependent Reset procedure that are guaranteed to 
  25029.       initiate different sequences, and it shall document the nature of the 
  25030.       strings that Value will accept without raising Constraint_Error. 
  25031.  
  25032.             Implementation Advice
  25033.  
  25034.    8. Any storage associated with an object of type Generator should be 
  25035.       reclaimed on exit from the scope of the object. 
  25036.  
  25037.    9. If the generator period is sufficiently long in relation to the number of 
  25038.       distinct initiator values, then each possible value of Initiator passed 
  25039.       to Reset should initiate a sequence of random numbers that does not, in a 
  25040.       practical sense, overlap the sequence initiated by any other value. If 
  25041.       this is not possible, then the mapping between initiator values and 
  25042.       generator states should be a rapidly varying function of the initiator 
  25043.       value. 
  25044.  
  25045.       NOTES 
  25046.  
  25047.   10. (14) If two or more tasks are to share the same generator, then the tasks 
  25048.       have to synchronize their access to the generator as for any shared 
  25049.       variable, see 9.10. 
  25050.  
  25051.   11. (15) Within a given implementation, a repeatable random number sequence 
  25052.       can be obtained by relying on the implicit initialization of generators 
  25053.       or by explicitly initializing a generator with a repeatable initiator 
  25054.       value. Different sequences of random numbers can be obtained from a given 
  25055.       generator in different program executions by explicitly initializing the 
  25056.       generator to a time-dependent state. 
  25057.  
  25058.   12. (16) A given implementation of the Random function in 
  25059.       Numerics.Float_Random may or may not be capable of delivering the values 
  25060.       0.0 or 1.0. Portable applications should assume that these values, or 
  25061.       values sufficiently close to them to behave indistinguishably from them, 
  25062.       can occur. If a sequence of random integers from some fixed range is 
  25063.       needed, the application should use the Random function in an appropriate 
  25064.       instantiation of Numerics.Discrete_Random, rather than transforming the 
  25065.       result of the Random function in Numerics.Float_Random. However, some 
  25066.       applications with unusual requirements, such as for a sequence of random 
  25067.       integers each drawn from a different range, will find it more convenient 
  25068.       to transform the result of the floating point Random function. For M>=1, 
  25069.       the expression 
  25070.  
  25071.         13.
  25072.  
  25073.                       Integer(Float(M) * Random(G)) mod M
  25074.  
  25075.   14. transforms the result of Random(G) to an integer uniformly distributed 
  25076.       over the range 0 ┬╖┬╖ M-1; it is valid even if Random delivers 0.0 or 1.0. 
  25077.       Each value of the result range is possible, provided that M is not too 
  25078.       large. Exponentially distributed (floating point) random numbers with 
  25079.       mean and standard deviation 1.0 can be obtained by the transformation 
  25080.  
  25081.         15.
  25082.  
  25083.                       -Log(Random(G) + Float'Model_Small))
  25084.  
  25085.   16. where Log comes from Numerics.Elementary_Functions, see A.5.1, in this 
  25086.       expression, the addition of Float'Model_Small avoids the exception that 
  25087.       would be raised were Log to be given the value zero, without affecting 
  25088.       the result (in most implementations) when Random returns a nonzero value. 
  25089.  
  25090.             Examples
  25091.  
  25092.   17. Example of a program that plays a simulated dice game: 
  25093.  
  25094.         18.
  25095.  
  25096.                       with Ada.Numerics.Discrete_Random;
  25097.                       procedure Dice_Game is
  25098.                         subtype Die is Integer range 1 ┬╖┬╖ 6;
  25099.                         subtype Dice is Integer range 2*Die'First ┬╖┬╖ 2*Die'Last;
  25100.                         package Random_Die is new Ada.Numerics.Discrete_Random (Die);
  25101.                         use Random_Die;
  25102.                         G : Generator;
  25103.                         D : Dice;
  25104.                       begin
  25105.                         Reset (G);  -- Start the generator in a unique state in each run
  25106.                         loop
  25107.                          -- Roll a pair of dice; sum and process the results
  25108.                          D := Random(G) + Random(G);
  25109.                          ┬╖┬╖┬╖
  25110.                         end loop;
  25111.                       end Dice_Game;
  25112.  
  25113.   19. Example of a program that simulates coin tosses: 
  25114.  
  25115.         20.
  25116.  
  25117.                       with Ada.Numerics.Discrete_Random;
  25118.                       procedure Flip_A_Coin is
  25119.                         type Coin is (Heads, Tails);
  25120.                         package Random_Coin is new Ada.Numerics.Discrete_Random (Coin);
  25121.                         use Random_Coin;
  25122.                         G : Generator;
  25123.                       begin
  25124.                         Reset (G);  -- Start the generator in a unique state in each run
  25125.                         loop
  25126.                          -- Toss a coin and process the result
  25127.                          case Random(G) is
  25128.                            when Heads =>
  25129.                              ┬╖┬╖┬╖
  25130.                            when Tails =>
  25131.                              ┬╖┬╖┬╖
  25132.                          end case;
  25133.                         ┬╖┬╖┬╖
  25134.                         end loop;
  25135.                       end Flip_A_Coin;
  25136.  
  25137.   21. Example of a parallel simulation of a physical system, with a separate 
  25138.       generator of event probabilities in each task: 
  25139.  
  25140.         22.
  25141.  
  25142.                       with Ada.Numerics.Float_Random;
  25143.                       procedure Parallel_Simulation is
  25144.                         use Ada.Numerics.Float_Random;
  25145.                         task type Worker is
  25146.                          entry Initialize_Generator (Initiator : in Integer);
  25147.                          ┬╖┬╖┬╖
  25148.                         end Worker;
  25149.                         W : array (1 ┬╖┬╖ 10) of Worker;
  25150.                         task body Worker is
  25151.                          G : Generator;
  25152.                          Probability_Of_Event : Uniformly_Distributed;
  25153.                         begin
  25154.                          accept Initialize_Generator (Initiator : in Integer) do
  25155.                            Reset (G, Initiator);
  25156.                          end Initialize_Generator;
  25157.                          loop
  25158.                            ┬╖┬╖┬╖
  25159.                            Probability_Of_Event := Random(G);
  25160.                            ┬╖┬╖┬╖
  25161.                          end loop;
  25162.                         end Worker;
  25163.                       begin
  25164.                         -- Initialize the generators in the Worker tasks
  25165.                         -- to different states
  25166.                         for I in W'Range loop
  25167.                          W(I).Initialize_Generator (I);
  25168.                         end loop;
  25169.                         ┬╖┬╖┬╖ -- Wait for the Worker tasks to terminate
  25170.                       end Parallel_Simulation;
  25171.  
  25172.  NOTES 
  25173.  
  25174.   23. (17) Notes on the last example:  Although each Worker task initializes 
  25175.       its generator to a different state, those states will be the same in 
  25176.       every execution of the program. The generator states can be initialized 
  25177.       uniquely in each program execution by instantiating 
  25178.       Ada.Numerics.Discrete_Random for the type Integer in the main procedure, 
  25179.       resetting the generator obtained from that instance to a time-dependent 
  25180.       state, and then using random integers obtained from that generator to 
  25181.       initialize the generators in each Worker task. 
  25182.  
  25183.  
  25184. ΓòÉΓòÉΓòÉ 17.5.3. Attributes of Floating Point Types ΓòÉΓòÉΓòÉ
  25185.  
  25186.  
  25187.   Static Semantics
  25188.  
  25189.    1. The following representation-oriented attributes are defined for every 
  25190.       subtype S of a floating point type T. 
  25191.  
  25192.    2. S'Machine_Radix 
  25193.  
  25194.                       Yields the radix of the hardware representation of the type
  25195.                       T. The value of this attribute is of the type universal_integer.
  25196.  
  25197.    3. The values of other representation-oriented attributes of a floating 
  25198.       point subtype, and of the ``primitive function'' attributes of a floating 
  25199.       point subtype described later, are defined in terms of a particular 
  25200.       representation of nonzero values called the canonical form. The canonical 
  25201.       form (for the type T) is the form 
  25202.  
  25203.                       +/-mantissa*T'Machine_Radix ** exponent
  25204.  
  25205.  where 
  25206.  
  25207.         a. mantissa is a fraction in the number base T'Machine_Radix, the first 
  25208.            digit of which is nonzero, and 
  25209.  
  25210.         b. exponent is an integer. 
  25211.  
  25212.    1. S'Machine_Mantissa 
  25213.  
  25214.                       Yields the largest value of p such that every value
  25215.                       expressible in the canonical form (for the type T), having a
  25216.                       p-digit mantissa and an exponent between T'Machine_Emin and
  25217.                       T'Machine_Emax, is a machine number, see 3.5.7, of the type
  25218.                       T. This attribute yields a value of the type
  25219.                       universal_integer.
  25220.  
  25221.    2. S'Machine_Emin 
  25222.  
  25223.                       Yields the smallest (most negative) value of exponent such
  25224.                       that every value expressible in the canonical form (for the
  25225.                       type T), having a mantissa of T'Machine_Mantissa digits, is a
  25226.                       machine number, see 3.5.7, of the type T. This attribute
  25227.                       yields a value of the type universal_integer.
  25228.  
  25229.    3. S'Machine_Emax 
  25230.  
  25231.                       Yields the largest (most positive) value of exponent such
  25232.                       that every value expressible in the canonical form (for the
  25233.                       type T), having a mantissa of T'Machine_Mantissa digits, is a
  25234.                       machine number (see 3.5.7) of the type T. This attribute
  25235.                       yields a value of the type universal_integer.
  25236.  
  25237.    4. S'Denorm 
  25238.  
  25239.                       Yields the value True if every value expressible in the form
  25240.                         +/-mantissa*T'Machine_Radix ** T'Machine_Emin
  25241.                       where mantissa is a nonzero T'Machine_Mantissa-digit fraction
  25242.                       in the number base T'Machine_Radix, the first digit of which
  25243.                       is zero, is a machine number, see 3.5.7, of the type T;
  25244.                       yields the value False otherwise. The value of this
  25245.                       attribute is of the predefined type Boolean.
  25246.  
  25247.    5. The values described by the formula in the definition of S'Denorm are 
  25248.       called denormalized numbers. A nonzero machine number that is not a 
  25249.       denormalized number is a normalized number. A normalized number x of a 
  25250.       given type T is said to be represented in canonical form when it is 
  25251.       expressed in the canonical form (for the type T) with a mantissa having 
  25252.       T'Machine_Mantissa digits; the resulting form is the canonical-form 
  25253.       representation of x. 
  25254.  
  25255.    6. S'Machine_Rounds 
  25256.  
  25257.                       Yields the value True if rounding is performed on inexact
  25258.                       results of every predefined operation that yields a result of
  25259.                       the type T; yields the value False otherwise. The value of
  25260.                       this attribute is of the predefined type Boolean.
  25261.  
  25262.    7. S'Machine_Overflows 
  25263.  
  25264.                       Yields the value True if overflow and divide-by-zero are
  25265.                       detected and reported by raising Constraint_Error for every
  25266.                       predefined operation that yields a result of the type T;
  25267.                       yields the value False otherwise. The value of this
  25268.                       attribute is of the predefined type Boolean.
  25269.  
  25270.    8. S'Signed_Zeros 
  25271.  
  25272.                       Yields the value True if the hardware representation for the
  25273.                       type T has the capability of representing both positively and
  25274.                       negatively signed zeros, these being generated and used by
  25275.                       the predefined operations of the type T as specified in IEC
  25276.                       559:1989; yields the value False otherwise. The value of
  25277.                       this attribute is of the predefined type Boolean.
  25278.  
  25279.    9. For every value x of a floating point type T, the normalized exponent of 
  25280.       x is defined as follows: 
  25281.  
  25282.         a. the normalized exponent of zero is (by convention) zero; 
  25283.  
  25284.         b. for nonzero x, the normalized exponent of x is the unique integer k 
  25285.            such that T'Machine_Radix ** (k - 1) <=|x|<T'Machine_Radix ** k. 
  25286.  
  25287.    1. The following primitive function attributes are defined for any subtype S 
  25288.       of a floating point type T. 
  25289.  
  25290.    2. S'Exponent 
  25291.  
  25292.                       S'Exponent denotes a function with the following specification:
  25293.  
  25294.                    a.
  25295.  
  25296.                       function S'Exponent (X : T)
  25297.                        return universal_integer
  25298.  
  25299.         b. The function yields the normalized exponent of X. 
  25300.  
  25301.    1. S'Fraction 
  25302.  
  25303.                       S'Fraction denotes a function with the following specification:
  25304.  
  25305.                    a.
  25306.  
  25307.                       function S'Fraction (X : T)
  25308.                        return T
  25309.  
  25310.         b. The function yields the value X*T'Machine_Radix ** -k, where k is 
  25311.            the normalized exponent of X. A zero result, which can only occur 
  25312.            when X is zero, has the sign of X. 
  25313.  
  25314.    1. S'Compose 
  25315.  
  25316.                       S'Compose denotes a function with the following specification:
  25317.  
  25318.                    a.
  25319.  
  25320.                       function S'Compose (Fraction : T;
  25321.                                 Exponent : universal_integer)
  25322.                        return T
  25323.  
  25324.         b. Let v be the value Fraction*T'Machine_Radix ** (Exponent-k), where k 
  25325.            is the normalized exponent of Fraction. If v is a machine number of 
  25326.            the type T, or if |v|>=T'Model_Small, the function yields v; 
  25327.            otherwise, it yields either one of the machine numbers of the type T 
  25328.            adjacent to v. Constraint_Error is optionally raised if v is outside 
  25329.            the base range of S. A zero result has the sign of Fraction when 
  25330.            S'Signed_Zeros is True. 
  25331.  
  25332.    1. S'Scaling 
  25333.  
  25334.                    a.
  25335.  
  25336.                       S'Scaling denotes a function with the following specification:
  25337.  
  25338.                    b.
  25339.  
  25340.                       function S'Scaling (X      : T;
  25341.                                 Adjustment : universal_integer)
  25342.                        return T
  25343.  
  25344.         c. Let v be the value X*T'Machine_Radix ** (Adjustment). If v is a 
  25345.            machine number of the type T, or if |v|>=T'Model_Small, the function 
  25346.            yields v; otherwise, it yields either one of the machine numbers of 
  25347.            the type T adjacent to v. Constraint_Error is optionally raised if v 
  25348.            is outside the base range of S. A zero result has the sign of X when 
  25349.            S'Signed_Zeros is True. 
  25350.  
  25351.    1. S'Floor 
  25352.  
  25353.                       S'Floor denotes a function with the following specification:
  25354.  
  25355.                    a.
  25356.  
  25357.                       function S'Floor (X : T)
  25358.                        return T
  25359.  
  25360.         b. The function yields the value Floor(X), i.e., the largest (most 
  25361.            positive) integral value less than or equal to X. When X is zero, 
  25362.            the result has the sign of X; a zero result otherwise has a positive 
  25363.            sign. 
  25364.  
  25365.    1. S'Ceiling 
  25366.  
  25367.                       S'Ceiling denotes a function with the following specification:
  25368.  
  25369.                    a.
  25370.  
  25371.                       function S'Ceiling (X : T)
  25372.                        return T
  25373.  
  25374.         b. The function yields the value Ceiling(X), i.e., the smallest (most 
  25375.            negative) integral value greater than or equal to X. When X is zero, 
  25376.            the result has the sign of X; a zero result otherwise has a negative 
  25377.            sign when S'Signed_Zeros is True. 
  25378.  
  25379.    1. S'Rounding 
  25380.  
  25381.                       S'Rounding denotes a function with the following specification:
  25382.  
  25383.                    a.
  25384.  
  25385.                       function S'Rounding (X : T)
  25386.                        return T
  25387.  
  25388.         b. The function yields the integral value nearest to X, rounding away 
  25389.            from zero if X lies exactly halfway between two integers. A zero 
  25390.            result has the sign of X when S'Signed_Zeros is True. 
  25391.  
  25392.    1. S'Unbiased_Rounding 
  25393.  
  25394.                       S'Unbiased_Rounding denotes a function with the following
  25395.                       specification:
  25396.  
  25397.                    a.
  25398.  
  25399.                       function S'Unbiased_Rounding (X : T)
  25400.                        return T
  25401.  
  25402.         b. The function yields the integral value nearest to X, rounding toward 
  25403.            the even integer if X lies exactly halfway between two integers. A 
  25404.            zero result has the sign of X when S'Signed_Zeros is True. 
  25405.  
  25406.    1. S'Truncation 
  25407.  
  25408.                       S'Truncation denotes a function with the following
  25409.                       specification:
  25410.  
  25411.                    a.
  25412.  
  25413.                       function S'Truncation (X : T)
  25414.                        return T
  25415.  
  25416.         b. The function yields the value Ceiling(X) when X is negative, and 
  25417.            Floor(X) otherwise. A zero result has the sign of X when 
  25418.            S'Signed_Zeros is True. 
  25419.  
  25420.    1. S'Remainder 
  25421.  
  25422.                       S'Remainder denotes a function with the following
  25423.                       specification:
  25424.  
  25425.                    a.
  25426.  
  25427.                       function S'Remainder (X, Y : T)
  25428.                        return T
  25429.  
  25430.         b. For nonzero Y, let v be the value X-n*Y, where n is the integer 
  25431.            nearest to the exact value of X/Y; if |n-X/Y|=1/2, then n is chosen 
  25432.            to be even. If v is a machine number of the type T, the function 
  25433.            yields v; otherwise, it yields zero. Constraint_Error is raised if Y 
  25434.            is zero. A zero result has the sign of X when S'Signed_Zeros is 
  25435.            True. 
  25436.  
  25437.    1. S'Adjacent 
  25438.  
  25439.                       S'Adjacent denotes a function with the following specification:
  25440.  
  25441.                    a.
  25442.  
  25443.                       function S'Adjacent (X, Towards : T)
  25444.                        return T
  25445.  
  25446.         b. If Towards=X, the function yields X; otherwise, it yields the 
  25447.            machine number of the type T adjacent to X in the direction of 
  25448.            Towards, if that machine number exists. If the result would be 
  25449.            outside the base range of S, Constraint_Error is raised. When 
  25450.            T'Signed_Zeros is True, a zero result has the sign of X. When 
  25451.            Towards is zero, its sign has no bearing on the result. 
  25452.  
  25453.    1. S'Copy_Sign 
  25454.  
  25455.                       S'Copy_Sign denotes a function with the following
  25456.                       specification:
  25457.  
  25458.                    a.
  25459.  
  25460.                       function S'Copy_Sign (Value, Sign : T)
  25461.                        return T
  25462.  
  25463.         b. If the value of Value is nonzero, the function yields a result whose 
  25464.            magnitude is that of Value and whose sign is that of Sign; 
  25465.            otherwise, it yields the value zero. Constraint_Error is optionally 
  25466.            raised if the result is outside the base range of S. A zero result 
  25467.            has the sign of Sign when S'Signed_Zeros is True. 
  25468.  
  25469.    1. S'Leading_Part 
  25470.  
  25471.                       S'Leading_Part denotes a function with the following
  25472.                       specification:
  25473.  
  25474.                    a.
  25475.  
  25476.                       function S'Leading_Part (X : T;
  25477.                                    Radix_Digits : universal_integer)
  25478.                        return T
  25479.  
  25480.         b. Let v be the value T'Machine_Radix ** (k-Radix_Digits), where k is 
  25481.            the normalized exponent of X. The function yields the value 
  25482.  
  25483.              1. Floor(X/v)*v, when X is nonnegative and Radix_Digits is 
  25484.                 positive; 
  25485.  
  25486.              2. Ceiling(X/v)*v, when X is negative and Radix_Digits is 
  25487.                 positive. 
  25488.  
  25489.         a. Constraint_Error is raised when Radix_Digits is zero or negative. A 
  25490.            zero result, which can only occur when X is zero, has the sign of X. 
  25491.  
  25492.    1. S'Machine 
  25493.  
  25494.                       S'Machine denotes a function with the following specification:
  25495.  
  25496.                    a.
  25497.  
  25498.                       function S'Machine (X : T)
  25499.                        return T
  25500.  
  25501.         b. If X is a machine number of the type T, the function yields X; 
  25502.            otherwise, it yields the value obtained by rounding or truncating X 
  25503.            to either one of the adjacent machine numbers of the type T. 
  25504.            Constraint_Error is raised if rounding or truncating X to the 
  25505.            precision of the machine numbers results in a value outside the base 
  25506.            range of S. A zero result has the sign of X when S'Signed_Zeros is 
  25507.            True. 
  25508.  
  25509.    1. The following model-oriented attributes are defined for any subtype S of 
  25510.       a floating point type T. 
  25511.  
  25512.    2. S'Model_Mantissa 
  25513.  
  25514.                       If the Numerics Annex is not supported, this attribute yields
  25515.                       an implementation defined value that is greater than or equal
  25516.                       to Ceiling(d*log (10)/log (T'Machine_Radix))+1, where d is
  25517.                       the requested decimal precision of T, and less than or equal
  25518.                       to the value of T'Machine_Mantissa. See G.2.2 for further
  25519.                       requirements that apply to implementations supporting the
  25520.                       Numerics Annex. The value of this attribute is of the type
  25521.                       universal_integer.
  25522.  
  25523.    3. S'Model_Emin 
  25524.  
  25525.                       If the Numerics Annex is not supported, this attribute yields
  25526.                       an implementation defined value that is greater than or equal
  25527.                       to the value of T'Machine_Emin. See G.2.2 for further
  25528.                       requirements that apply to implementations supporting the
  25529.                       Numerics Annex. The value of this attribute is of the type
  25530.                       universal_integer.
  25531.  
  25532.    4. S'Model_Epsilon 
  25533.  
  25534.                       Yields the value T'Machine_Radix ** 1-T'Model_Mantissa. The value
  25535.                       of this attribute is of the type universal_real.
  25536.  
  25537.    5. S'Model_Small 
  25538.  
  25539.                       Yields the value T'Machine_Radix ** T'Model_Emin-1. The value of
  25540.                       this attribute is of the type universal_real.
  25541.  
  25542.    6. S'Model 
  25543.  
  25544.                       S'Model denotes a function with the following specification:
  25545.  
  25546.                    a.
  25547.  
  25548.                       function S'Model (X : T)
  25549.                        return T
  25550.  
  25551.         b. If the Numerics Annex is not supported, the meaning of this 
  25552.            attribute is implementation defined;  See G.2.2 for the definition 
  25553.            that applies to implementations supporting the Numerics Annex. 
  25554.  
  25555.    1. S'Safe_First 
  25556.  
  25557.                       Yields the lower bound of the safe range, see 3.5.7, of the
  25558.                       type T. If the Numerics Annex is not supported, the value of
  25559.                       this attribute is implementation defined;  See G.2.2 for the
  25560.                       definition that applies to implementations supporting the
  25561.                       Numerics Annex. The value of this attribute is of the type
  25562.                       universal_real.
  25563.  
  25564.    2. S'Safe_Last 
  25565.  
  25566.                       Yields the upper bound of the safe range, see 3.5.7, of the
  25567.                       type T. If the Numerics Annex is not supported, the value of
  25568.                       this attribute is implementation defined;  See G.2.2 for the
  25569.                       definition that applies to implementations supporting the
  25570.                       Numerics Annex. The value of this attribute is of the type
  25571.                       universal_real.
  25572.  
  25573.  
  25574. ΓòÉΓòÉΓòÉ 17.5.4. Attributes of Fixed Point Types ΓòÉΓòÉΓòÉ
  25575.  
  25576.  
  25577.   Static Semantics
  25578.  
  25579.    1. The following representation-oriented attributes are defined for every 
  25580.       subtype S of a fixed point type T. 
  25581.  
  25582.    2. S'Machine_Radix 
  25583.  
  25584.                       Yields the radix of the hardware representation of the type
  25585.                       T. The value of this attribute is of the type
  25586.                       universal_integer.
  25587.  
  25588.    3. S'Machine_Rounds 
  25589.  
  25590.                       Yields the value True if rounding is performed on inexact
  25591.                       results of every predefined operation that yields a result of
  25592.                       the type T; yields the value False otherwise. The value of
  25593.                       this attribute is of the predefined type Boolean.
  25594.  
  25595.    4. S'Machine_Overflows 
  25596.  
  25597.                       Yields the value True if overflow and divide-by-zero are
  25598.                       detected and reported by raising Constraint_Error for every
  25599.                       predefined operation that yields a result of the type T;
  25600.                       yields the value False otherwise. The value of this
  25601.                       attribute is of the predefined type Boolean.
  25602.  
  25603.  
  25604. ΓòÉΓòÉΓòÉ 17.6. Input-Output ΓòÉΓòÉΓòÉ
  25605.  
  25606.    1. Input-output is provided through language-defined packages, each of which 
  25607.       is a child of the root package Ada. The generic packages Sequential_IO 
  25608.       and Direct_IO define input-output operations applicable to files 
  25609.       containing elements of a given type. The generic package Storage_IO 
  25610.       supports reading from and writing to an in-memory buffer. Additional 
  25611.       operations for text input-output are supplied in the packages Text_IO and 
  25612.       Wide_Text_IO. Heterogeneous input-output is provided through the child 
  25613.       packages Streams.Stream_IO and Text_IO.Text_Streams, see also 13.13. The 
  25614.       package IO_Exceptions defines the exceptions needed by the predefined 
  25615.       input-output packages. 
  25616.  
  25617.  
  25618. ΓòÉΓòÉΓòÉ 17.7. External Files and File Objects ΓòÉΓòÉΓòÉ
  25619.  
  25620.  
  25621.   Static Semantics
  25622.  
  25623.    1. Values input from the external environment of the program, or output to 
  25624.       the external environment, are considered to occupy external files. An 
  25625.       external file can be anything external to the program that can produce a 
  25626.       value to be read or receive a value to be written. An external file is 
  25627.       identified by a string (the name). A second string (the form) gives 
  25628.       further system-dependent characteristics that may be associated with the 
  25629.       file, such as the physical organization or access rights. The conventions 
  25630.       governing the interpretation of such strings shall be documented. 
  25631.  
  25632.    2. Input and output operations are expressed as operations on objects of 
  25633.       some file type, rather than directly in terms of the external files. In 
  25634.       the remainder of this section, the term file is always used to refer to a 
  25635.       file object; the term external file is used otherwise. 
  25636.  
  25637.    3. Input-output for sequential files of values of a single element type is 
  25638.       defined by means of the generic package Sequential_IO. In order to define 
  25639.       sequential input-output for a given element type, an instantiation of 
  25640.       this generic unit, with the given type as actual parameter, has to be 
  25641.       declared. The resulting package contains the declaration of a file type 
  25642.       (called File_Type) for files of such elements, as well as the operations 
  25643.       applicable to these files, such as the Open, Read, and Write procedures. 
  25644.  
  25645.    4. Input-output for direct access files is likewise defined by a generic 
  25646.       package called Direct_IO. Input-output in human-readable form is defined 
  25647.       by the (nongeneric) packages Text_IO for Character and String data, and 
  25648.       Wide_Text_IO for Wide_Character and Wide_String data. Input-output for 
  25649.       files containing streams of elements representing values of possibly 
  25650.       different types is defined by means of the (nongeneric) package 
  25651.       Streams.Stream_IO. 
  25652.  
  25653.    5. Before input or output operations can be performed on a file, the file 
  25654.       first has to be associated with an external file. While such an 
  25655.       association is in effect, the file is said to be open, and otherwise the 
  25656.       file is said to be closed. 
  25657.  
  25658.    6. The language does not define what happens to external files after the 
  25659.       completion of the main program and all the library tasks (in particular, 
  25660.       if corresponding files have not been closed). The effect of input-output 
  25661.       for access types is unspecified. 
  25662.  
  25663.    7. An open file has a current mode, which is a value of one of the following 
  25664.       enumeration types: 
  25665.  
  25666.          8.
  25667.  
  25668.             type File_Mode is (In_File, Inout_File, Out_File);  --  for Direct_IO
  25669.  
  25670.         a. These values correspond respectively to the cases where only 
  25671.            reading, both reading and writing, or only writing are to be 
  25672.            performed. 
  25673.  
  25674.          1.
  25675.  
  25676.             type File_Mode is (In_File, Out_File, Append_File);
  25677.             --  for Sequential_IO, Text_IO, Wide_Text_IO, and Stream_IO
  25678.  
  25679.         a. These values correspond respectively to the cases where only 
  25680.            reading, only writing, or only appending are to be performed. 
  25681.  
  25682.         b. The mode of a file can be changed. 
  25683.  
  25684.    1. Several file management operations are common to Sequential_IO, 
  25685.       Direct_IO, Text_IO, and Wide_Text_IO. These operations are described in 
  25686.       subclause A.8.2, for sequential and direct files. Any additional effects 
  25687.       concerning text input-output are described in A.10.2. 
  25688.  
  25689.    2. The exceptions that can be propagated by the execution of an input-output 
  25690.       subprogram are defined in the package IO_Exceptions; the situations in 
  25691.       which they can be propagated are described following the description of 
  25692.       the subprogram (and in A.13). The exceptions Storage_Error and 
  25693.       Program_Error may be propagated. (Program_Error can only be propagated 
  25694.       due to errors made by the caller of the subprogram.) Finally, exceptions 
  25695.       can be propagated in certain implementation-defined situations. 
  25696.  
  25697.       NOTES 
  25698.  
  25699.    3. (18) Each instantiation of the generic packages Sequential_IO and 
  25700.       Direct_IO declares a different type File_Type. In the case of Text_IO, 
  25701.       Wide_Text_IO, and Streams.Stream_IO, the corresponding type File_Type is 
  25702.       unique. 
  25703.  
  25704.    4. (19) A bidirectional device can often be modeled as two sequential files 
  25705.       associated with the device, one of mode In_File, and one of mode 
  25706.       Out_File. An implementation may restrict the number of files that may be 
  25707.       associated with a given external file. 
  25708.  
  25709.  
  25710. ΓòÉΓòÉΓòÉ 17.8. Sequential and Direct Files ΓòÉΓòÉΓòÉ
  25711.  
  25712.  
  25713.   Static Semantics
  25714.  
  25715.    1. Two kinds of access to external files are defined in this subclause: 
  25716.       sequential access and direct access. The corresponding file types and the 
  25717.       associated operations are provided by the generic packages Sequential_IO 
  25718.       and Direct_IO. A file object to be used for sequential access is called a 
  25719.       sequential file, and one to be used for direct access is called a direct 
  25720.       file. Access to stream files is described in A.12.1. 
  25721.  
  25722.    2. For sequential access, the file is viewed as a sequence of values that 
  25723.       are transferred in the order of their appearance (as produced by the 
  25724.       program or by the external environment). When the file is opened with 
  25725.       mode In_File or Out_File, transfer starts respectively from or to the 
  25726.       beginning of the file. When the file is opened with mode Append_File, 
  25727.       transfer to the file starts after the last element of the file. 
  25728.  
  25729.    3. For direct access, the file is viewed as a set of elements occupying 
  25730.       consecutive positions in linear order; a value can be transferred to or 
  25731.       from an element of the file at any selected position. The position of an 
  25732.       element is specified by its index, which is a number, greater than zero, 
  25733.       of the implementation-defined integer type Count. The first element, if 
  25734.       any, has index one; the index of the last element, if any, is called the 
  25735.       current size; the current size is zero if there are no elements. The 
  25736.       current size is a property of the external file. 
  25737.  
  25738.    4. An open direct file has a current index, which is the index that will be 
  25739.       used by the next read or write operation. When a direct file is opened, 
  25740.       the current index is set to one. The current index of a direct file is a 
  25741.       property of a file object, not of an external file. 
  25742.  
  25743.  A.8.1                         The Generic Package Sequential_IO 
  25744.  A.8.2                         File Management 
  25745.  A.8.3                         Sequential Input-Output Operations 
  25746.  A.8.4                         The Generic Package Direct_IO 
  25747.  A.8.5                         Direct Input-Output Operations 
  25748.  
  25749.  
  25750. ΓòÉΓòÉΓòÉ 17.8.1. The Generic Package Sequential_IO ΓòÉΓòÉΓòÉ
  25751.  
  25752.  
  25753.   Static Semantics
  25754.  
  25755.    1. The generic library package Sequential_IO has the following declaration: 
  25756.  
  25757.          2.
  25758.  
  25759.                       with Ada.IO_Exceptions;
  25760.                       generic
  25761.                         type Element_Type(<>) is private;
  25762.                       package Ada.Sequential_IO is
  25763.  
  25764.          3.
  25765.  
  25766.                         type File_Type is limited private;
  25767.  
  25768.          4.
  25769.  
  25770.                         type File_Mode is (In_File, Out_File, Append_File);
  25771.  
  25772.          5.
  25773.  
  25774.                         -- File management
  25775.  
  25776.          6.
  25777.  
  25778.                         procedure Create(File : in out File_Type;
  25779.                                 Mode : in File_Mode := Out_File;
  25780.                                 Name : in String := "";
  25781.                                 Form : in String := "");
  25782.  
  25783.          7.
  25784.  
  25785.                         procedure Open  (File : in out File_Type;
  25786.                                 Mode : in File_Mode;
  25787.                                 Name : in String;
  25788.                                 Form : in String := "");
  25789.  
  25790.          8.
  25791.  
  25792.                         procedure Close (File : in out File_Type);
  25793.                         procedure Delete(File : in out File_Type);
  25794.                         procedure Reset (File : in out File_Type; Mode : in File_Mode);
  25795.                         procedure Reset (File : in out File_Type);
  25796.  
  25797.          9.
  25798.  
  25799.                         function Mode  (File : in File_Type) return File_Mode;
  25800.                         function Name  (File : in File_Type) return String;
  25801.                         function Form  (File : in File_Type) return String;
  25802.  
  25803.         10.
  25804.  
  25805.                         function Is_Open(File : in File_Type) return Boolean;
  25806.  
  25807.         11.
  25808.  
  25809.                         -- Input and output operations
  25810.  
  25811.         12.
  25812.  
  25813.                         procedure Read  (File : in File_Type; Item : out Element_Type);
  25814.                         procedure Write (File : in File_Type; Item : in Element_Type);
  25815.  
  25816.         13.
  25817.  
  25818.                         function End_Of_File(File : in File_Type) return Boolean;
  25819.  
  25820.         14.
  25821.  
  25822.                         -- Exceptions
  25823.  
  25824.         15.
  25825.  
  25826.                         Status_Error : exception renames IO_Exceptions.Status_Error;
  25827.                         Mode_Error  : exception renames IO_Exceptions.Mode_Error;
  25828.                         Name_Error  : exception renames IO_Exceptions.Name_Error;
  25829.                         Use_Error   : exception renames IO_Exceptions.Use_Error;
  25830.                         Device_Error : exception renames IO_Exceptions.Device_Error;
  25831.                         End_Error   : exception renames IO_Exceptions.End_Error;
  25832.                         Data_Error  : exception renames IO_Exceptions.Data_Error;
  25833.  
  25834.         16.
  25835.  
  25836.                       private
  25837.                         ┬╖┬╖┬╖ -- not specified by the language
  25838.                       end Ada.Sequential_IO;
  25839.  
  25840.  
  25841. ΓòÉΓòÉΓòÉ 17.8.2. File Management ΓòÉΓòÉΓòÉ
  25842.  
  25843.  
  25844.   Static Semantics
  25845.  
  25846.    1. The procedures and functions described in this subclause provide for the 
  25847.       control of external files; their declarations are repeated in each of the 
  25848.       packages for sequential, direct, text, and stream input-output. For text 
  25849.       input-output, the procedures Create, Open, and Reset have additional 
  25850.       effects described in subclause (see A.10.2). 
  25851.  
  25852.          2.
  25853.  
  25854.             procedure Create(File : in out File_Type;
  25855.                      Mode : in File_Mode := default_mode;
  25856.                      Name : in String := "";
  25857.                      Form : in String := "");
  25858.  
  25859.         a. Establishes a new external file, with the given name and form, and 
  25860.            associates this external file with the given file. The given file is 
  25861.            left open. The current mode of the given file is set to the given 
  25862.            access mode. The default access mode is the mode Out_File for 
  25863.            sequential and text input-output; it is the mode Inout_File for 
  25864.            direct input-output. or direct access, the size of the created file 
  25865.            is implementation defined. 
  25866.  
  25867.         b. A null string for Name specifies an external file that is not 
  25868.            accessible after the completion of the main program (a temporary 
  25869.            file). A null string for Form specifies the use of the default 
  25870.            options of the implementation for the external file. 
  25871.  
  25872.         c. The exception Status_Error is propagated if the given file is 
  25873.            already open. The exception Name_Error is propagated if the string 
  25874.            given as Name does not allow the identification of an external file. 
  25875.            The exception Use_Error is propagated if, for the specified mode, 
  25876.            the external environment does not support creation of an external 
  25877.            file with the given name (in the absence of Name_Error) and form. 
  25878.  
  25879.          1.
  25880.  
  25881.             procedure Open(File : in out File_Type;
  25882.                     Mode : in File_Mode;
  25883.                     Name : in String;
  25884.                     Form : in String := "");
  25885.  
  25886.         a. Associates the given file with an existing external file having the 
  25887.            given name and form, and sets the current mode of the given file to 
  25888.            the given mode. The given file is left open. 
  25889.  
  25890.         b. The exception Status_Error is propagated if the given file is 
  25891.            already open. The exception Name_Error is propagated if the string 
  25892.            given as Name does not allow the identification of an external file; 
  25893.            in particular, this exception is propagated if no external file with 
  25894.            the given name exists. The exception Use_Error is propagated if, for 
  25895.            the specified mode, the external environment does not support 
  25896.            opening for an external file with the given name (in the absence of 
  25897.            Name_Error) and form. 
  25898.  
  25899.          1.
  25900.  
  25901.             procedure Close(File : in out File_Type);
  25902.  
  25903.         a. Severs the association between the given file and its associated 
  25904.            external file. The given file is left closed. In addition, for 
  25905.            sequential files, if the file being closed has mode Out_File or 
  25906.            Append_File, then the last element written since the most recent 
  25907.            open or reset is the last element that can be read from the file. If 
  25908.            no elements have been written and the file mode is Out_File, then 
  25909.            the closed file is empty. If no elements have been written and the 
  25910.            file mode is Append_File, then the closed file is unchanged. 
  25911.  
  25912.         b. The exception Status_Error is propagated if the given file is not 
  25913.            open. 
  25914.  
  25915.          1.
  25916.  
  25917.             procedure Delete(File : in out File_Type);
  25918.  
  25919.         a. Deletes the external file associated with the given file. The given 
  25920.            file is closed, and the external file ceases to exist. 
  25921.  
  25922.         b. The exception Status_Error is propagated if the given file is not 
  25923.            open. The exception Use_Error is propagated if deletion of the 
  25924.            external file is not supported by the external environment. 
  25925.  
  25926.          1.
  25927.  
  25928.             procedure Reset(File : in out File_Type; Mode : in File_Mode);
  25929.             procedure Reset(File : in out File_Type);
  25930.  
  25931.         a. Resets the given file so that reading from its elements can be 
  25932.            restarted from the beginning of the file (for modes In_File and 
  25933.            Inout_File), and so that writing to its elements can be restarted at 
  25934.            the beginning of the file (for modes Out_File and Inout_File) or 
  25935.            after the last element of the file (for mode Append_File). In 
  25936.            particular, for direct access this means that the current index is 
  25937.            set to one. If a Mode parameter is supplied, the current mode of the 
  25938.            given file is set to the given mode. In addition, for sequential 
  25939.            files, if the given file has mode Out_File or Append_File when Reset 
  25940.            is called, the last element written since the most recent open or 
  25941.            reset is the last element that can be read from the file. If no 
  25942.            elements have been written and the file mode is Out_File, the reset 
  25943.            file is empty. If no elements have been written and the file mode is 
  25944.            Append_File, then the reset file is unchanged. 
  25945.  
  25946.         b. The exception Status_Error is propagated if the file is not open. 
  25947.            The exception Use_Error is propagated if the external environment 
  25948.            does not support resetting for the external file and, also, if the 
  25949.            external environment does not support resetting to the specified 
  25950.            mode for the external file. 
  25951.  
  25952.          1.
  25953.  
  25954.             function Mode(File : in File_Type) return File_Mode;
  25955.  
  25956.         a. Returns the current mode of the given file. 
  25957.  
  25958.         b. The exception Status_Error is propagated if the file is not open. 
  25959.  
  25960.          1.
  25961.  
  25962.             function Name(File : in File_Type) return String;
  25963.  
  25964.         a. Returns a string which uniquely identifies the external file 
  25965.            currently associated with the given file (and may thus be used in an 
  25966.            Open operation). If an external environment allows alternative 
  25967.            specifications of the name (for example, abbreviations), the string 
  25968.            returned by the function should correspond to a full specification 
  25969.            of the name. 
  25970.  
  25971.         b. The exception Status_Error is propagated if the given file is not 
  25972.            open. The exception Use_Error is propagated if the associated 
  25973.            external file is a temporary file that cannot be opened by any name. 
  25974.  
  25975.          1.
  25976.  
  25977.             function Form(File : in File_Type) return String;
  25978.  
  25979.         a. Returns the form string for the external file currently associated 
  25980.            with the given file. If an external environment allows alternative 
  25981.            specifications of the form (for example, abbreviations using default 
  25982.            options), the string returned by the function should correspond to a 
  25983.            full specification (that is, it should indicate explicitly all 
  25984.            options selected, including default options). 
  25985.  
  25986.         b. The exception Status_Error is propagated if the given file is not 
  25987.            open. 
  25988.  
  25989.          1.
  25990.  
  25991.             function Is_Open(File : in File_Type) return Boolean;
  25992.  
  25993.         a. Returns True if the file is open (that is, if it is associated with 
  25994.            an external file), otherwise returns False. 
  25995.  
  25996.   Implementation Permissions
  25997.  
  25998.    1. An implementation may propagate Name_Error or Use_Error if an attempt is 
  25999.       made to use an I/O feature that cannot be supported by the implementation 
  26000.       due to limitations in the external environment. Any such restriction 
  26001.       should be documented. 
  26002.  
  26003.  
  26004. ΓòÉΓòÉΓòÉ 17.8.3. Sequential Input-Output Operations ΓòÉΓòÉΓòÉ
  26005.  
  26006.  
  26007.   Static Semantics
  26008.  
  26009.    1. The operations available for sequential input and output are described in 
  26010.       this subclause. The exception Status_Error is propagated if any of these 
  26011.       operations is attempted for a file that is not open. 
  26012.  
  26013.          2.
  26014.  
  26015.             procedure Read(File : in File_Type; Item : out Element_Type);
  26016.  
  26017.         a. Operates on a file of mode In_File. Reads an element from the given 
  26018.            file, and returns the value of this element in the Item parameter. 
  26019.  
  26020.         b. The exception Mode_Error is propagated if the mode is not In_File. 
  26021.            The exception End_Error is propagated if no more elements can be 
  26022.            read from the given file. The exception Data_Error can be propagated 
  26023.            if the element read cannot be interpreted as a value of the subtype 
  26024.            Element_Type, see A.13: ``Exceptions in Input-Output''. 
  26025.  
  26026.          1.
  26027.  
  26028.             procedure Write(File : in File_Type; Item : in Element_Type);
  26029.  
  26030.         a. Operates on a file of mode Out_File or Append_File. Writes the value 
  26031.            of Item to the given file. 
  26032.  
  26033.         b. The exception Mode_Error is propagated if the mode is not Out_File 
  26034.            or Append_File. The exception Use_Error is propagated if the 
  26035.            capacity of the external file is exceeded. 
  26036.  
  26037.          1.
  26038.  
  26039.             function End_Of_File(File : in File_Type) return Boolean;
  26040.  
  26041.         a. Operates on a file of mode In_File. Returns True if no more elements 
  26042.            can be read from the given file; otherwise returns False. 
  26043.  
  26044.         b. The exception Mode_Error is propagated if the mode is not In_File. 
  26045.  
  26046.  
  26047. ΓòÉΓòÉΓòÉ 17.8.4. The Generic Package Direct_IO ΓòÉΓòÉΓòÉ
  26048.  
  26049.  
  26050.   Static Semantics
  26051.  
  26052.    1. The generic library package Direct_IO has the following declaration: 
  26053.  
  26054.          2.
  26055.  
  26056.                       with Ada.IO_Exceptions;
  26057.                       generic
  26058.                         type Element_Type is private;
  26059.                       package Ada.Direct_IO is
  26060.  
  26061.          3.
  26062.  
  26063.                         type File_Type is limited private;
  26064.  
  26065.          4.
  26066.  
  26067.                         type File_Mode is (In_File, Inout_File, Out_File);
  26068.                         type Count   is range 0 ┬╖┬╖ implementation-defined;
  26069.                         subtype Positive_Count is Count range 1 ┬╖┬╖ Count'Last;
  26070.  
  26071.          5.
  26072.  
  26073.                         -- File management
  26074.  
  26075.          6.
  26076.  
  26077.                         procedure Create(File : in out File_Type;
  26078.                                 Mode : in File_Mode := Inout_File;
  26079.                                 Name : in String := "";
  26080.                                 Form : in String := "");
  26081.  
  26082.          7.
  26083.  
  26084.                         procedure Open  (File : in out File_Type;
  26085.                                 Mode : in File_Mode;
  26086.                                 Name : in String;
  26087.                                 Form : in String := "");
  26088.  
  26089.          8.
  26090.  
  26091.                         procedure Close (File : in out File_Type);
  26092.                         procedure Delete(File : in out File_Type);
  26093.                         procedure Reset (File : in out File_Type; Mode : in File_Mode);
  26094.                         procedure Reset (File : in out File_Type);
  26095.  
  26096.          9.
  26097.  
  26098.                         function Mode  (File : in File_Type) return File_Mode;
  26099.                         function Name  (File : in File_Type) return String;
  26100.                         function Form  (File : in File_Type) return String;
  26101.  
  26102.         10.
  26103.  
  26104.                         function Is_Open(File : in File_Type) return Boolean;
  26105.  
  26106.         11.
  26107.  
  26108.                         -- Input and output operations
  26109.  
  26110.         12.
  26111.  
  26112.                         procedure Read (File : in File_Type; Item : out Element_Type;
  26113.                                           From : in Positive_Count);
  26114.                         procedure Read (File : in File_Type; Item : out Element_Type);
  26115.  
  26116.         13.
  26117.  
  26118.                         procedure Write(File : in File_Type; Item : in  Element_Type;
  26119.                                           To  : in Positive_Count);
  26120.                         procedure Write(File : in File_Type; Item : in Element_Type);
  26121.  
  26122.         14.
  26123.  
  26124.                         procedure Set_Index(File : in File_Type; To : in Positive_Count);
  26125.  
  26126.         15.
  26127.  
  26128.                         function Index(File : in File_Type) return Positive_Count;
  26129.                         function Size (File : in File_Type) return Count;
  26130.  
  26131.         16.
  26132.  
  26133.                         function End_Of_File(File : in File_Type) return Boolean;
  26134.  
  26135.         17.
  26136.  
  26137.                         -- Exceptions
  26138.  
  26139.         18.
  26140.  
  26141.                         Status_Error : exception renames IO_Exceptions.Status_Error;
  26142.                         Mode_Error  : exception renames IO_Exceptions.Mode_Error;
  26143.                         Name_Error  : exception renames IO_Exceptions.Name_Error;
  26144.                         Use_Error   : exception renames IO_Exceptions.Use_Error;
  26145.                         Device_Error : exception renames IO_Exceptions.Device_Error;
  26146.                         End_Error   : exception renames IO_Exceptions.End_Error;
  26147.                         Data_Error  : exception renames IO_Exceptions.Data_Error;
  26148.  
  26149.         19.
  26150.  
  26151.                       private
  26152.                         ┬╖┬╖┬╖ -- not specified by the language
  26153.                       end Ada.Direct_IO;
  26154.  
  26155.  
  26156. ΓòÉΓòÉΓòÉ 17.8.5. Direct Input-Output Operations ΓòÉΓòÉΓòÉ
  26157.  
  26158.  
  26159.   Static Semantics
  26160.  
  26161.    1. The operations available for direct input and output are described in 
  26162.       this subclause. The exception Status_Error is propagated if any of these 
  26163.       operations is attempted for a file that is not open. 
  26164.  
  26165.          2.
  26166.  
  26167.             procedure Read(File : in File_Type; Item : out Element_Type;
  26168.                               From : in  Positive_Count);
  26169.  
  26170.             procedure Read(File : in File_Type; Item : out Element_Type);
  26171.  
  26172.         a. Operates on a file of mode In_File or Inout_File. In the case of the 
  26173.            first form, sets the current index of the given file to the index 
  26174.            value given by the parameter From. Then (for both forms) returns, in 
  26175.            the parameter Item, the value of the element whose position in the 
  26176.            given file is specified by the current index of the file; finally, 
  26177.            increases the current index by one. 
  26178.  
  26179.         b. The exception Mode_Error is propagated if the mode of the given file 
  26180.            is Out_File. The exception End_Error is propagated if the index to 
  26181.            be used exceeds the size of the external file. The exception 
  26182.            Data_Error can be propagated if the element read cannot be 
  26183.            interpreted as a value of the subtype Element_Type, see A.13. 
  26184.  
  26185.          1.
  26186.  
  26187.             procedure Write(File : in File_Type; Item : in Element_Type;
  26188.                                To  : in Positive_Count);
  26189.  
  26190.             procedure Write(File : in File_Type; Item : in Element_Type);
  26191.  
  26192.         a. Operates on a file of mode Inout_File or Out_File. In the case of 
  26193.            the first form, sets the index of the given file to the index value 
  26194.            given by the parameter To. Then (for both forms) gives the value of 
  26195.            the parameter Item to the element whose position in the given file 
  26196.            is specified by the current index of the file; finally, increases 
  26197.            the current index by one. 
  26198.  
  26199.         b. The exception Mode_Error is propagated if the mode of the given file 
  26200.            is In_File. The exception Use_Error is propagated if the capacity of 
  26201.            the external file is exceeded. 
  26202.  
  26203.          1.
  26204.  
  26205.             procedure Set_Index(File : in File_Type; To : in Positive_Count);
  26206.  
  26207.         a. Operates on a file of any mode. Sets the current index of the given 
  26208.            file to the given index value (which may exceed the current size of 
  26209.            the file). 
  26210.  
  26211.          1.
  26212.  
  26213.             function Index(File : in File_Type) return Positive_Count;
  26214.  
  26215.         a. Operates on a file of any mode. Returns the current index of the 
  26216.            given file. 
  26217.  
  26218.          1.
  26219.  
  26220.             function Size(File : in File_Type) return Count;
  26221.  
  26222.         a. Operates on a file of any mode. Returns the current size of the 
  26223.            external file that is associated with the given file. 
  26224.  
  26225.          1.
  26226.  
  26227.             function End_Of_File(File : in File_Type) return Boolean;
  26228.  
  26229.         a. Operates on a file of mode In_File or Inout_File. Returns True if 
  26230.            the current index exceeds the size of the external file; otherwise 
  26231.            returns False. 
  26232.  
  26233.         b. The exception Mode_Error is propagated if the mode of the given file 
  26234.            is Out_File. 
  26235.   NOTES 
  26236.  
  26237.    1. (20) Append_File mode is not supported for the generic package Direct_IO. 
  26238.  
  26239.  
  26240. ΓòÉΓòÉΓòÉ 17.9. The Generic Package Storage_IO ΓòÉΓòÉΓòÉ
  26241.  
  26242.    1. The generic package Storage_IO provides for reading from and writing to 
  26243.       an in-memory buffer. This generic package supports the construction of 
  26244.       user-defined input-output packages. 
  26245.  
  26246.             Static Semantics
  26247.  
  26248.    2. The generic library package Storage_IO has the following declaration: 
  26249.  
  26250.          3.
  26251.  
  26252.                       with Ada.IO_Exceptions;
  26253.                       with System.Storage_Elements;
  26254.                       generic
  26255.                         type Element_Type is private;
  26256.                       package Ada.Storage_IO is
  26257.                         pragma Preelaborate(Storage_IO);
  26258.  
  26259.          4.
  26260.  
  26261.                         Buffer_Size : constant System.Storage_Elements.Storage_Count
  26262.                          := implementation-defined;
  26263.                         subtype Buffer_Type is
  26264.                          System.Storage_Elements.Storage_Array (1┬╖┬╖Buffer_Size);
  26265.  
  26266.          5.
  26267.  
  26268.                         -- Input and output operations
  26269.  
  26270.          6.
  26271.  
  26272.                         procedure Read (Buffer : in    Buffer_Type;
  26273.                                 Item  :   out Element_Type);
  26274.  
  26275.          7.
  26276.  
  26277.                         procedure Write(Buffer :   out Buffer_Type;
  26278.                                 Item  : in   Element_Type);
  26279.  
  26280.          8.
  26281.  
  26282.                         -- Exceptions
  26283.  
  26284.          9.
  26285.  
  26286.                         Data_Error : exception renames IO_Exceptions.Data_Error;
  26287.                       end Ada.Storage_IO;
  26288.  
  26289.   10. In each instance, the constant Buffer_Size has a value that is the size 
  26290.       (in storage elements) of the buffer required to represent the content of 
  26291.       an object of subtype Element_Type, including any implicit levels of 
  26292.       indirection used by the implementation. The Read and Write procedures of 
  26293.       Storage_IO correspond to the Read and Write procedures of Direct_IO (see 
  26294.       A.8.4) but with the content of the Item parameter being read from or 
  26295.       written into the specified Buffer, rather than an external file. 
  26296.  
  26297.       NOTES 
  26298.  
  26299.   11. (21) A buffer used for Storage_IO holds only one element at a time; an 
  26300.       external file used for Direct_IO holds a sequence of elements. 
  26301.  
  26302.  
  26303. ΓòÉΓòÉΓòÉ 17.10. Text Input-Output ΓòÉΓòÉΓòÉ
  26304.  
  26305.  
  26306.   Static Semantics
  26307.  
  26308.    1. This clause describes the package Text_IO, which provides facilities for 
  26309.       input and output in human-readable form. Each file is read or written 
  26310.       sequentially, as a sequence of characters grouped into lines, and as a 
  26311.       sequence of lines grouped into pages. The specification of the package is 
  26312.       given below in subclause (see A.10.1). 
  26313.  
  26314.    2. The facilities for file management given above, in A.8.2 and A.8.3, are 
  26315.       available for text input-output. In place of Read and Write, however, 
  26316.       there are procedures Get and Put that input values of suitable types from 
  26317.       text files, and output values to them. These values are provided to the 
  26318.       Put procedures, and returned by the Get procedures, in a parameter Item. 
  26319.       Several overloaded procedures of these names exist, for different types 
  26320.       of Item. These Get procedures analyze the input sequences of characters 
  26321.       based on lexical elements (see 2.) and return the corresponding values; 
  26322.       the Put procedures output the given values as appropriate lexical 
  26323.       elements. Procedures Get and Put are also available that input and output 
  26324.       individual characters treated as character values rather than as lexical 
  26325.       elements. Related to character input are procedures to look ahead at the 
  26326.       next character without reading it, and to read a character 
  26327.       ``immediately'' without waiting for an end-of-line to signal 
  26328.       availability. 
  26329.  
  26330.    3. In addition to the procedures Get and Put for numeric and enumeration 
  26331.       types of Item that operate on text files, analogous procedures are 
  26332.       provided that read from and write to a parameter of type String. These 
  26333.       procedures perform the same analysis and composition of character 
  26334.       sequences as their counterparts which have a file parameter. 
  26335.  
  26336.    4. For all Get and Put procedures that operate on text files, and for many 
  26337.       other subprograms, there are forms with and without a file parameter. 
  26338.       Each such Get procedure operates on an input file, and each such Put 
  26339.       procedure operates on an output file. If no file is specified, a default 
  26340.       input file or a default output file is used. 
  26341.  
  26342.    5. At the beginning of program execution the default input and output files 
  26343.       are the so-called standard input file and standard output file. These 
  26344.       files are open, have respectively the current modes In_File and Out_File, 
  26345.       and are associated with two implementation-defined external files. 
  26346.       Procedures are provided to change the current default input file and the 
  26347.       current default output file. 
  26348.  
  26349.    6. At the beginning of program execution a default file for 
  26350.       program-dependent error-related text output is the so-called standard 
  26351.       error file. This file is open, has the current mode Out_File, and is 
  26352.       associated with an implementation-defined external file. A procedure is 
  26353.       provided to change the current default error file. 
  26354.  
  26355.    7. From a logical point of view, a text file is a sequence of pages, a page 
  26356.       is a sequence of lines, and a line is a sequence of characters; the end 
  26357.       of a line is marked by a line terminator; the end of a page is marked by 
  26358.       the combination of a line terminator immediately followed by a page 
  26359.       terminator; and the end of a file is marked by the combination of a line 
  26360.       terminator immediately followed by a page terminator and then a file 
  26361.       terminator. Terminators are generated during output; either by calls of 
  26362.       procedures provided expressly for that purpose; or implicitly as part of 
  26363.       other operations, for example, when a bounded line length, a bounded page 
  26364.       length, or both, have been specified for a file. 
  26365.  
  26366.    8. The actual nature of terminators is not defined by the language and hence 
  26367.       depends on the implementation. Although terminators are recognized or 
  26368.       generated by certain of the procedures that follow, they are not 
  26369.       necessarily implemented as characters or as sequences of characters. 
  26370.       Whether they are characters (and if so which ones) in any particular 
  26371.       implementation need not concern a user who neither explicitly outputs nor 
  26372.       explicitly inputs control characters. The effect of input (Get) or output 
  26373.       (Put) of control characters (other than horizontal tabulation) is not 
  26374.       specified by the language. 
  26375.  
  26376.    9. The characters of a line are numbered, starting from one; the number of a 
  26377.       character is called its column number. For a line terminator, a column 
  26378.       number is also defined: it is one more than the number of characters in 
  26379.       the line. The lines of a page, and the pages of a file, are similarly 
  26380.       numbered. The current column number is the column number of the next 
  26381.       character or line terminator to be transferred. The current line number 
  26382.       is the number of the current line. The current page number is the number 
  26383.       of the current page. These numbers are values of the subtype 
  26384.       Positive_Count of the type Count (by convention, the value zero of the 
  26385.       type Count is used to indicate special conditions). 
  26386.  
  26387.         10.
  26388.  
  26389.                       type Count is range 0 ┬╖┬╖ implementation-defined;
  26390.                       subtype Positive_Count is Count range 1 ┬╖┬╖ Count'Last;
  26391.  
  26392.   11. For an output file or an append file, a maximum line length can be 
  26393.       specified and a maximum page length can be specified. If a value to be 
  26394.       output cannot fit on the current line, for a specified maximum line 
  26395.       length, then a new line is automatically started before the value is 
  26396.       output; if, further, this new line cannot fit on the current page, for a 
  26397.       specified maximum page length, then a new page is automatically started 
  26398.       before the value is output. Functions are provided to determine the 
  26399.       maximum line length and the maximum page length. When a file is opened 
  26400.       with mode Out_File or Append_File, both values are zero: by convention, 
  26401.       this means that the line lengths and page lengths are unbounded. 
  26402.       (Consequently, output consists of a single line if the subprograms for 
  26403.       explicit control of line and page structure are not used.)  The constant 
  26404.       Unbounded is provided for this purpose. 
  26405.  
  26406.  A.10.1                        The Package Text_IO 
  26407.  A.10.2                        Text File Management 
  26408.  A.10.3                        Default Input, Output, and Error Files 
  26409.  A.10.4                        Specification of Line and Page Lengths 
  26410.  A.10.5                        Operations on Columns, Lines, and Pages 
  26411.  A.10.6                        Get and Put Procedures 
  26412.  A.10.7                        Input-Output of Characters and Strings 
  26413.  A.10.8                        Input-Output for Integer Types 
  26414.  A.10.9                        Input-Output for Real Types 
  26415.  A.10.10                       Input-Output for Enumeration Types 
  26416.  
  26417.  
  26418. ΓòÉΓòÉΓòÉ 17.10.1. The Package Text_IO ΓòÉΓòÉΓòÉ
  26419.  
  26420.  
  26421.   Static Semantics
  26422.  
  26423.    1. The library package Text_IO has the following declaration: 
  26424.  
  26425.          2.
  26426.  
  26427.                       with Ada.IO_Exceptions;
  26428.                       package Ada.Text_IO is
  26429.  
  26430.          3.
  26431.  
  26432.                         type File_Type is limited private;
  26433.  
  26434.          4.
  26435.  
  26436.                         type File_Mode is (In_File, Out_File, Append_File);
  26437.  
  26438.          5.
  26439.  
  26440.                         type Count is range 0 ┬╖┬╖ implementation-defined;
  26441.                         subtype Positive_Count is Count range 1 ┬╖┬╖ Count'Last;
  26442.                         Unbounded : constant Count := 0; -- line and page length
  26443.  
  26444.          6.
  26445.  
  26446.                         subtype Field    is Integer range 0 ┬╖┬╖ implementation-defined;
  26447.                         subtype Number_Base is Integer range 2 ┬╖┬╖ 16;
  26448.  
  26449.          7.
  26450.  
  26451.                         type Type_Set is (Lower_Case, Upper_Case);
  26452.  
  26453.          8.
  26454.  
  26455.                         -- File Management
  26456.  
  26457.          9.
  26458.  
  26459.                         procedure Create (File : in out File_Type;
  26460.                                  Mode : in File_Mode := Out_File;
  26461.                                  Name : in String   := "";
  26462.                                  Form : in String   := "");
  26463.  
  26464.         10.
  26465.  
  26466.                         procedure Open  (File : in out File_Type;
  26467.                                  Mode : in File_Mode;
  26468.                                  Name : in String;
  26469.                                  Form : in String := "");
  26470.  
  26471.         11.
  26472.  
  26473.                         procedure Close  (File : in out File_Type);
  26474.                         procedure Delete (File : in out File_Type);
  26475.                         procedure Reset  (File : in out File_Type; Mode : in File_Mode);
  26476.                         procedure Reset  (File : in out File_Type);
  26477.  
  26478.         12.
  26479.  
  26480.                         function  Mode  (File : in File_Type) return File_Mode;
  26481.                         function  Name  (File : in File_Type) return String;
  26482.                         function  Form  (File : in File_Type) return String;
  26483.  
  26484.         13.
  26485.  
  26486.                         function  Is_Open(File : in File_Type) return Boolean;
  26487.  
  26488.         14.
  26489.  
  26490.                         -- Control of default input and output files
  26491.  
  26492.         15.
  26493.  
  26494.                         procedure Set_Input (File : in File_Type);
  26495.                         procedure Set_Output(File : in File_Type);
  26496.                         procedure Set_Error (File : in File_Type);
  26497.  
  26498.         16.
  26499.  
  26500.                         function Standard_Input  return File_Type;
  26501.                         function Standard_Output return File_Type;
  26502.                         function Standard_Error  return File_Type;
  26503.  
  26504.         17.
  26505.  
  26506.                         function Current_Input  return File_Type;
  26507.                         function Current_Output  return File_Type;
  26508.                         function Current_Error  return File_Type;
  26509.  
  26510.         18.
  26511.  
  26512.                         type File_Access is access constant File_Type;
  26513.  
  26514.         19.
  26515.  
  26516.                         function Standard_Input  return File_Access;
  26517.                         function Standard_Output return File_Access;
  26518.                         function Standard_Error  return File_Access;
  26519.  
  26520.         20.
  26521.  
  26522.                         function Current_Input  return File_Access;
  26523.                         function Current_Output  return File_Access;
  26524.                         function Current_Error  return File_Access;
  26525.  
  26526.         21.
  26527.  
  26528.                         --Buffer control
  26529.                         procedure Flush (File : in out File_Type);
  26530.                         procedure Flush;
  26531.  
  26532.         22.
  26533.  
  26534.                         -- Specification of line and page lengths
  26535.  
  26536.         23.
  26537.  
  26538.                         procedure Set_Line_Length(File : in File_Type; To : in Count);
  26539.                         procedure Set_Line_Length(To  : in Count);
  26540.  
  26541.         24.
  26542.  
  26543.                         procedure Set_Page_Length(File : in File_Type; To : in Count);
  26544.                         procedure Set_Page_Length(To  : in Count);
  26545.  
  26546.         25.
  26547.  
  26548.                         function  Line_Length(File : in File_Type) return Count;
  26549.                         function  Line_Length return Count;
  26550.  
  26551.         26.
  26552.  
  26553.                         function  Page_Length(File : in File_Type) return Count;
  26554.                         function  Page_Length return Count;
  26555.  
  26556.         27.
  26557.  
  26558.                         -- Column, Line, and Page Control
  26559.  
  26560.         28.
  26561.  
  26562.                         procedure New_Line  (File   : in File_Type;
  26563.                                    Spacing : in Positive_Count := 1);
  26564.                         procedure New_Line  (Spacing : in Positive_Count := 1);
  26565.  
  26566.         29.
  26567.  
  26568.                         procedure Skip_Line  (File   : in File_Type;
  26569.                                    Spacing : in Positive_Count := 1);
  26570.                         procedure Skip_Line  (Spacing : in Positive_Count := 1);
  26571.  
  26572.         30.
  26573.  
  26574.                         function  End_Of_Line(File : in File_Type) return Boolean;
  26575.                         function  End_Of_Line return Boolean;
  26576.  
  26577.         31.
  26578.  
  26579.                         procedure New_Page  (File : in File_Type);
  26580.                         procedure New_Page;
  26581.  
  26582.         32.
  26583.  
  26584.                         procedure Skip_Page  (File : in File_Type);
  26585.                         procedure Skip_Page;
  26586.  
  26587.         33.
  26588.  
  26589.                         function  End_Of_Page(File : in File_Type) return Boolean;
  26590.                         function  End_Of_Page return Boolean;
  26591.  
  26592.         34.
  26593.  
  26594.                         function  End_Of_File(File : in File_Type) return Boolean;
  26595.                         function  End_Of_File return Boolean;
  26596.  
  26597.         35.
  26598.  
  26599.                         procedure Set_Col (File : in File_Type; To : in Positive_Count);
  26600.                         procedure Set_Col (To  : in Positive_Count);
  26601.  
  26602.         36.
  26603.  
  26604.                         procedure Set_Line(File : in File_Type; To : in Positive_Count);
  26605.                         procedure Set_Line(To  : in Positive_Count);
  26606.  
  26607.         37.
  26608.  
  26609.                         function Col (File : in File_Type) return Positive_Count;
  26610.                         function Col  return Positive_Count;
  26611.  
  26612.         38.
  26613.  
  26614.                         function Line(File : in File_Type) return Positive_Count;
  26615.                         function Line return Positive_Count;
  26616.  
  26617.         39.
  26618.  
  26619.                         function Page(File : in File_Type) return Positive_Count;
  26620.                         function Page return Positive_Count;
  26621.  
  26622.         40.
  26623.  
  26624.                         -- Character Input-Output
  26625.  
  26626.         41.
  26627.  
  26628.                         procedure Get(File : in  File_Type; Item : out Character);
  26629.                         procedure Get(Item : out Character);
  26630.  
  26631.         42.
  26632.  
  26633.                         procedure Put(File : in  File_Type; Item : in Character);
  26634.                         procedure Put(Item : in  Character);
  26635.  
  26636.         43.
  26637.  
  26638.                         procedure Look_Ahead (File     : in  File_Type;
  26639.                                    Item     : out Character;
  26640.                                    End_Of_Line : out Boolean);
  26641.                         procedure Look_Ahead (Item     : out Character;
  26642.                                    End_Of_Line : out Boolean);
  26643.  
  26644.         44.
  26645.  
  26646.                         procedure Get_Immediate(File    : in  File_Type;
  26647.                                     Item    : out Character);
  26648.                         procedure Get_Immediate(Item    : out Character);
  26649.  
  26650.         45.
  26651.  
  26652.                         procedure Get_Immediate(File    : in  File_Type;
  26653.                                     Item    : out Character;
  26654.                                     Available : out Boolean);
  26655.                         procedure Get_Immediate(Item    : out Character;
  26656.                                     Available : out Boolean);
  26657.  
  26658.         46.
  26659.  
  26660.                         -- String Input-Output
  26661.  
  26662.         47.
  26663.  
  26664.                         procedure Get(File : in  File_Type; Item : out String);
  26665.                         procedure Get(Item : out String);
  26666.  
  26667.         48.
  26668.  
  26669.                         procedure Put(File : in  File_Type; Item : in String);
  26670.                         procedure Put(Item : in  String);
  26671.  
  26672.         49.
  26673.  
  26674.                         procedure Get_Line(File : in  File_Type;
  26675.                                  Item : out String;
  26676.                                  Last : out Natural);
  26677.                         procedure Get_Line(Item : out String; Last : out Natural);
  26678.  
  26679.         50.
  26680.  
  26681.                         procedure Put_Line(File : in  File_Type; Item : in String);
  26682.                         procedure Put_Line(Item : in  String);
  26683.  
  26684.         51.
  26685.  
  26686.                         -- Generic packages for Input-Output of Integer Types
  26687.  
  26688.         52.
  26689.  
  26690.                         generic
  26691.                          type Num is range <>;
  26692.                         package Integer_IO is
  26693.  
  26694.         53.
  26695.  
  26696.                           Default_Width : Field := Num'Width;
  26697.                          Default_Base  : Number_Base := 10;
  26698.  
  26699.         54.
  26700.  
  26701.                           procedure Get(File  : in  File_Type;
  26702.                                 Item  : out Num;
  26703.                                 Width : in Field := 0);
  26704.                          procedure Get(Item  : out Num;
  26705.                                 Width : in  Field := 0);
  26706.  
  26707.         55.
  26708.  
  26709.                           procedure Put(File  : in File_Type;
  26710.                                 Item  : in Num;
  26711.                                 Width : in Field := Default_Width;
  26712.                                 Base  : in Number_Base := Default_Base);
  26713.                          procedure Put(Item  : in Num;
  26714.                                 Width : in Field := Default_Width;
  26715.                                 Base  : in Number_Base := Default_Base);
  26716.                          procedure Get(From : in  String;
  26717.                                 Item : out Num;
  26718.                                 Last : out Positive);
  26719.                          procedure Put(To  : out String;
  26720.                                 Item : in Num;
  26721.                                 Base : in Number_Base := Default_Base);
  26722.  
  26723.         56.
  26724.  
  26725.                         end Integer_IO;
  26726.  
  26727.         57.
  26728.  
  26729.                         generic
  26730.                          type Num is mod <>;
  26731.                         package Modular_IO is
  26732.  
  26733.         58.
  26734.  
  26735.                           Default_Width : Field := Num'Width;
  26736.                          Default_Base  : Number_Base := 10;
  26737.  
  26738.         59.
  26739.  
  26740.                           procedure Get(File  : in  File_Type;
  26741.                                 Item  : out Num;
  26742.                                 Width : in Field := 0);
  26743.                          procedure Get(Item  : out Num;
  26744.                                 Width : in  Field := 0);
  26745.  
  26746.         60.
  26747.  
  26748.                           procedure Put(File  : in File_Type;
  26749.                                 Item  : in Num;
  26750.                                 Width : in Field := Default_Width;
  26751.                                 Base  : in Number_Base := Default_Base);
  26752.                          procedure Put(Item  : in Num;
  26753.                                 Width : in Field := Default_Width;
  26754.                                 Base  : in Number_Base := Default_Base);
  26755.                          procedure Get(From : in  String;
  26756.                                 Item : out Num;
  26757.                                 Last : out Positive);
  26758.                          procedure Put(To  : out String;
  26759.                                 Item : in Num;
  26760.                                 Base : in Number_Base := Default_Base);
  26761.  
  26762.         61.
  26763.  
  26764.                         end Modular_IO;
  26765.  
  26766.         62.
  26767.  
  26768.                         -- Generic packages for Input-Output of Real Types
  26769.  
  26770.         63.
  26771.  
  26772.                         generic
  26773.                          type Num is digits <>;
  26774.                         package Float_IO is
  26775.  
  26776.         64.
  26777.  
  26778.                           Default_Fore : Field := 2;
  26779.                          Default_Aft  : Field := Num'Digits-1;
  26780.                          Default_Exp  : Field := 3;
  26781.  
  26782.         65.
  26783.  
  26784.                           procedure Get(File  : in  File_Type;
  26785.                                 Item  : out Num;
  26786.                                 Width : in  Field := 0);
  26787.                          procedure Get(Item  : out Num;
  26788.                                 Width : in  Field := 0);
  26789.  
  26790.         66.
  26791.  
  26792.                           procedure Put(File : in File_Type;
  26793.                                 Item : in Num;
  26794.                                 Fore : in Field := Default_Fore;
  26795.                                 Aft  : in Field := Default_Aft;
  26796.                                 Exp  : in Field := Default_Exp);
  26797.                          procedure Put(Item : in Num;
  26798.                                 Fore : in Field := Default_Fore;
  26799.                                 Aft  : in Field := Default_Aft;
  26800.                                 Exp  : in Field := Default_Exp);
  26801.  
  26802.         67.
  26803.  
  26804.                           procedure Get(From : in String;
  26805.                                 Item : out Num;
  26806.                                 Last : out Positive);
  26807.                          procedure Put(To  : out String;
  26808.                                 Item : in Num;
  26809.                                 Aft  : in Field := Default_Aft;
  26810.                                 Exp  : in Field := Default_Exp);
  26811.                         end Float_IO;
  26812.  
  26813.         68.
  26814.  
  26815.                         generic
  26816.                          type Num is delta <>;
  26817.                         package Fixed_IO is
  26818.  
  26819.         69.
  26820.  
  26821.                           Default_Fore : Field := Num'Fore;
  26822.                          Default_Aft  : Field := Num'Aft;
  26823.                          Default_Exp  : Field := 0;
  26824.  
  26825.         70.
  26826.  
  26827.                           procedure Get(File  : in  File_Type;
  26828.                                 Item  : out Num;
  26829.                                 Width : in  Field := 0);
  26830.                          procedure Get(Item  : out Num;
  26831.                                 Width : in  Field := 0);
  26832.  
  26833.         71.
  26834.  
  26835.                           procedure Put(File : in File_Type;
  26836.                                 Item : in Num;
  26837.                                 Fore : in Field := Default_Fore;
  26838.                                 Aft  : in Field := Default_Aft;
  26839.                                 Exp  : in Field := Default_Exp);
  26840.                          procedure Put(Item : in Num;
  26841.                                 Fore : in Field := Default_Fore;
  26842.                                 Aft  : in Field := Default_Aft;
  26843.                                 Exp  : in Field := Default_Exp);
  26844.  
  26845.         72.
  26846.  
  26847.                           procedure Get(From : in  String;
  26848.                                 Item : out Num;
  26849.                                 Last : out Positive);
  26850.                          procedure Put(To  : out String;
  26851.                                 Item : in Num;
  26852.                                 Aft  : in Field := Default_Aft;
  26853.                                 Exp  : in Field := Default_Exp);
  26854.                         end Fixed_IO;
  26855.  
  26856.         73.
  26857.  
  26858.                         generic
  26859.                          type Num is delta <> digits <>;
  26860.                         package Decimal_IO is
  26861.  
  26862.         74.
  26863.  
  26864.                           Default_Fore : Field := Num'Fore;
  26865.                          Default_Aft  : Field := Num'Aft;
  26866.                          Default_Exp  : Field := 0;
  26867.  
  26868.         75.
  26869.  
  26870.                           procedure Get(File  : in  File_Type;
  26871.                                 Item  : out Num;
  26872.                                 Width : in  Field := 0);
  26873.                          procedure Get(Item  : out Num;
  26874.                                 Width : in  Field := 0);
  26875.  
  26876.         76.
  26877.  
  26878.                           procedure Put(File : in File_Type;
  26879.                                 Item : in Num;
  26880.                                 Fore : in Field := Default_Fore;
  26881.                                 Aft  : in Field := Default_Aft;
  26882.                                 Exp  : in Field := Default_Exp);
  26883.                          procedure Put(Item : in Num;
  26884.                                 Fore : in Field := Default_Fore;
  26885.                                 Aft  : in Field := Default_Aft;
  26886.                                 Exp  : in Field := Default_Exp);
  26887.  
  26888.         77.
  26889.  
  26890.                           procedure Get(From : in  String;
  26891.                                 Item : out Num;
  26892.                                 Last : out Positive);
  26893.                          procedure Put(To  : out String;
  26894.                                 Item : in Num;
  26895.                                 Aft  : in Field := Default_Aft;
  26896.                                 Exp  : in Field := Default_Exp);
  26897.                         end Decimal_IO;
  26898.  
  26899.         78.
  26900.  
  26901.                         -- Generic package for Input-Output of Enumeration Types
  26902.  
  26903.         79.
  26904.  
  26905.                         generic
  26906.                          type Enum is (<>);
  26907.                         package Enumeration_IO is
  26908.  
  26909.         80.
  26910.  
  26911.                           Default_Width  : Field := 0;
  26912.                          Default_Setting : Type_Set := Upper_Case;
  26913.  
  26914.         81.
  26915.  
  26916.                           procedure Get(File : in  File_Type;
  26917.                                 Item : out Enum);
  26918.                          procedure Get(Item : out Enum);
  26919.  
  26920.         82.
  26921.  
  26922.                           procedure Put(File  : in File_Type;
  26923.                                 Item  : in Enum;
  26924.                                 Width : in Field   := Default_Width;
  26925.                                 Set  : in Type_Set := Default_Setting);
  26926.                          procedure Put(Item  : in Enum;
  26927.                                 Width : in Field   := Default_Width;
  26928.                                 Set  : in Type_Set := Default_Setting);
  26929.  
  26930.         83.
  26931.  
  26932.                           procedure Get(From : in  String;
  26933.                                 Item : out Enum;
  26934.                                 Last : out Positive);
  26935.                          procedure Put(To  : out String;
  26936.                                 Item : in  Enum;
  26937.                                 Set  : in  Type_Set := Default_Setting);
  26938.                         end Enumeration_IO;
  26939.  
  26940.         84.
  26941.  
  26942.                         -- Exceptions
  26943.  
  26944.         85.
  26945.  
  26946.                         Status_Error : exception renames IO_Exceptions.Status_Error;
  26947.                         Mode_Error  : exception renames IO_Exceptions.Mode_Error;
  26948.                         Name_Error  : exception renames IO_Exceptions.Name_Error;
  26949.                         Use_Error   : exception renames IO_Exceptions.Use_Error;
  26950.                         Device_Error : exception renames IO_Exceptions.Device_Error;
  26951.                         End_Error   : exception renames IO_Exceptions.End_Error;
  26952.                         Data_Error  : exception renames IO_Exceptions.Data_Error;
  26953.                         Layout_Error : exception renames IO_Exceptions.Layout_Error;
  26954.                       private
  26955.                         ┬╖┬╖┬╖ -- not specified by the language
  26956.                       end Ada.Text_IO;
  26957.  
  26958.  
  26959. ΓòÉΓòÉΓòÉ 17.10.2. Text File Management ΓòÉΓòÉΓòÉ
  26960.  
  26961.  
  26962.   Static Semantics
  26963.  
  26964.    1. The only allowed file modes for text files are the modes In_File, 
  26965.       Out_File, and Append_File. The subprograms given in A.8.2, for the 
  26966.       control of external files, and the function End_Of_File given in  A.8.3, 
  26967.       for sequential input-output, are also available for text files. There is 
  26968.       also a version of End_Of_File that refers to the current default input 
  26969.       file. For text files, the procedures have the following additional 
  26970.       effects: 
  26971.  
  26972.         a. For the procedures Create and Open: After a file with mode Out_File 
  26973.            or Append_File is opened, the page length and line length are 
  26974.            unbounded (both have the conventional value zero). After a file (of 
  26975.            any mode) is opened, the current column, current line, and current 
  26976.            page numbers are set to one. If the mode is Append_File, it is 
  26977.            implementation defined whether a page terminator will separate 
  26978.            preexisting text in the file from the new text to be written. 
  26979.  
  26980.         b. For the procedure Close: If the file has the current mode Out_File 
  26981.            or Append_File, has the effect of calling New_Page, unless the 
  26982.            current page is already terminated; then outputs a file terminator. 
  26983.  
  26984.         c. For the procedure Reset: If the file has the current mode Out_File 
  26985.            or Append_File, has the effect of calling New_Page, unless the 
  26986.            current page is already terminated; then outputs a file terminator. 
  26987.            The current column, line, and page numbers are set to one, and the 
  26988.            line and page lengths to Unbounded. If the new mode is Append_File, 
  26989.            it is implementation defined whether a page terminator will separate 
  26990.            preexisting text in the file from the new text to be written. 
  26991.  
  26992.    1. The exception Mode_Error is propagated by the procedure Reset upon an 
  26993.       attempt to change the mode of a file that is the current default input 
  26994.       file, the current default output file, or the current default error file. 
  26995.  
  26996.       NOTES 
  26997.  
  26998.    2. (22) An implementation can define the Form parameter of Create and Open 
  26999.       to control effects including the following: 
  27000.  
  27001.         a. the interpretation of line and column numbers for an interactive 
  27002.            file, and 
  27003.  
  27004.         b. the interpretation of text formats in a file created by a foreign 
  27005.            program. 
  27006.  
  27007.  
  27008. ΓòÉΓòÉΓòÉ 17.10.3. Default Input, Output, and Error Files ΓòÉΓòÉΓòÉ
  27009.  
  27010.  
  27011.   Static Semantics
  27012.  
  27013.    1. The following subprograms provide for the control of the particular 
  27014.       default files that are used when a file parameter is omitted from a Get, 
  27015.       Put, or other operation of text input-output described below, or when 
  27016.       application-dependent error-related text is to be output. 
  27017.  
  27018.          2.
  27019.  
  27020.             procedure Set_Input(File : in File_Type);
  27021.  
  27022.         a. Operates on a file of mode In_File. Sets the current default input 
  27023.            file to File. 
  27024.  
  27025.         b. The exception Status_Error is propagated if the given file is not 
  27026.            open. The exception Mode_Error is propagated if the mode of the 
  27027.            given file is not In_File. 
  27028.  
  27029.          1.
  27030.  
  27031.             procedure Set_Output(File : in File_Type);
  27032.             procedure Set_Error (File : in File_Type);
  27033.  
  27034.         a. Each operates on a file of mode Out_File or Append_File. Set_Output 
  27035.            sets the current default output file to File. Set_Error sets the 
  27036.            current default error file to File. The exception Status_Error is 
  27037.            propagated if the given file is not open. The exception Mode_Error 
  27038.            is propagated if the mode of the given file is not Out_File or 
  27039.            Append_File. 
  27040.  
  27041.          1.
  27042.  
  27043.             function Standard_Input return File_Type;
  27044.             function Standard_Input return File_Access;
  27045.  
  27046.         a. Returns the standard input file, see A.10, or an access value 
  27047.            designating the standard input file, respectively. 
  27048.  
  27049.          1.
  27050.  
  27051.             function Standard_Output return File_Type;
  27052.             function Standard_Output return File_Access;
  27053.  
  27054.         a. Returns the standard output file, see A.10, or an access value 
  27055.            designating the standard output file, respectively. 
  27056.  
  27057.          1.
  27058.  
  27059.             function Standard_Error return File_Type;
  27060.             function Standard_Error return File_Access;
  27061.  
  27062.         a. Returns the standard error file, see A.10, or an access value 
  27063.            designating the standard output file, respectively. 
  27064.  
  27065.         b. The Form strings implicitly associated with the opening of 
  27066.            Standard_Input, Standard_Output, and Standard_Error at the start of 
  27067.            program execution are implementation defined. 
  27068.  
  27069.          1.
  27070.  
  27071.             function Current_Input return File_Type;
  27072.             function Current_Input return File_Access;
  27073.  
  27074.         a. Returns the current default input file, or an access value 
  27075.            designating the current default input file, respectively. 
  27076.  
  27077.          1.
  27078.  
  27079.             function Current_Output return File_Type;
  27080.             function Current_Output return File_Access;
  27081.  
  27082.         a. Returns the current default output file, or an access value 
  27083.            designating the current default output file, respectively. 
  27084.  
  27085.          1.
  27086.  
  27087.             function Current_Error return File_Type;
  27088.             function Current_Error return File_Access;
  27089.  
  27090.         a. Returns the current default error file, or an access value 
  27091.            designating the current default error file, respectively. 
  27092.  
  27093.          1.
  27094.  
  27095.             procedure Flush (File : in out File_Type);
  27096.             procedure Flush;
  27097.  
  27098.         a. The effect of Flush is the same as the corresponding subprogram in 
  27099.            Streams.Stream_IO, see A.12.1. If File is not explicitly specified, 
  27100.            Current_Output is used. 
  27101.  
  27102.   Erroneous Execution
  27103.  
  27104.    1. The execution of a program is erroneous if it attempts to use a current 
  27105.       default input, default output, or default error file that no longer 
  27106.       exists. 
  27107.  
  27108.    2. If the Close operation is applied to a file object that is also serving 
  27109.       as the default input, default output, or default error file, then 
  27110.       subsequent operations on such a default file are erroneous. 
  27111.  
  27112.       NOTES 
  27113.  
  27114.    3. (23) The standard input, standard output, and standard error files cannot 
  27115.       be opened, closed, reset, or deleted, because the parameter File of the 
  27116.       corresponding procedures has the mode in out. 
  27117.  
  27118.    4. (24) The standard input, standard output, and standard error files are 
  27119.       different file objects, but not necessarily different external files. 
  27120.  
  27121.  
  27122. ΓòÉΓòÉΓòÉ 17.10.4. Specification of Line and Page Lengths ΓòÉΓòÉΓòÉ
  27123.  
  27124.  
  27125.   Static Semantics
  27126.  
  27127.    1. The subprograms described in this subclause are concerned with the line 
  27128.       and page structure of a file of mode Out_File or Append_File. They 
  27129.       operate either on the file given as the first parameter, or, in the 
  27130.       absence of such a file parameter, on the current default output file. 
  27131.       They provide for output of text with a specified maximum line length or 
  27132.       page length. In these cases, line and page terminators are output 
  27133.       implicitly and automatically when needed. When line and page lengths are 
  27134.       unbounded (that is, when they have the conventional value zero), as in 
  27135.       the case of a newly opened file, new lines and new pages are only started 
  27136.       when explicitly called for. 
  27137.  
  27138.    2. In all cases, the exception Status_Error is propagated if the file to be 
  27139.       used is not open; the exception Mode_Error is propagated if the mode of 
  27140.       the file is not Out_File or Append_File. 
  27141.  
  27142.          3.
  27143.  
  27144.             procedure Set_Line_Length(File : in File_Type; To : in Count);
  27145.             procedure Set_Line_Length(To  : in Count);
  27146.  
  27147.         a. Sets the maximum line length of the specified output or append file 
  27148.            to the number of characters specified by To. The value zero for To 
  27149.            specifies an unbounded line length. 
  27150.  
  27151.         b. The exception Use_Error is propagated if the specified line length 
  27152.            is inappropriate for the associated external file. 
  27153.  
  27154.          1.
  27155.  
  27156.             procedure Set_Page_Length(File : in File_Type; To : in Count);
  27157.             procedure Set_Page_Length(To  : in Count);
  27158.  
  27159.         a. Sets the maximum page length of the specified output or append file 
  27160.            to the number of lines specified by To. The value zero for To 
  27161.            specifies an unbounded page length. 
  27162.  
  27163.         b. The exception Use_Error is propagated if the specified page length 
  27164.            is inappropriate for the associated external file. 
  27165.  
  27166.          1.
  27167.  
  27168.             function Line_Length(File : in File_Type) return Count;
  27169.             function Line_Length return Count;
  27170.  
  27171.         a. Returns the maximum line length currently set for the specified 
  27172.            output or append file, or zero if the line length is unbounded. 
  27173.  
  27174.          1.
  27175.  
  27176.             function Page_Length(File : in File_Type) return Count;
  27177.             function Page_Length return Count;
  27178.  
  27179.         a. Returns the maximum page length currently set for the specified 
  27180.            output or append file, or zero if the page length is unbounded. 
  27181.  
  27182.  
  27183. ΓòÉΓòÉΓòÉ 17.10.5. Operations on Columns, Lines, and Pages ΓòÉΓòÉΓòÉ
  27184.  
  27185.  
  27186.   Static Semantics
  27187.  
  27188.    1. The subprograms described in this subclause provide for explicit control 
  27189.       of line and page structure; they operate either on the file given as the 
  27190.       first parameter, or, in the absence of such a file parameter, on the 
  27191.       appropriate (input or output) current default file. The exception 
  27192.       Status_Error is propagated by any of these subprograms if the file to be 
  27193.       used is not open. 
  27194.  
  27195.          2.
  27196.  
  27197.             procedure New_Line(File   : in File_Type;
  27198.                       Spacing : in Positive_Count := 1);
  27199.             procedure New_Line(Spacing : in Positive_Count := 1);
  27200.  
  27201.         a. Operates on a file of mode Out_File or Append_File. 
  27202.  
  27203.         b. For a Spacing of one: Outputs a line terminator and sets the current 
  27204.            column number to one. Then increments the current line number by 
  27205.            one, except in the case that the current line number is already 
  27206.            greater than or equal to the maximum page length, for a bounded page 
  27207.            length; in that case a page terminator is output, the current page 
  27208.            number is incremented by one, and the current line number is set to 
  27209.            one. 
  27210.  
  27211.         c. For a Spacing greater than one, the above actions are performed 
  27212.            Spacing times. 
  27213.  
  27214.         d. The exception Mode_Error is propagated if the mode is not Out_File 
  27215.            or Append_File. 
  27216.  
  27217.          1.
  27218.  
  27219.             procedure Skip_Line(File   : in File_Type;
  27220.                       Spacing : in Positive_Count := 1);
  27221.             procedure Skip_Line(Spacing : in Positive_Count := 1);
  27222.  
  27223.         a. Operates on a file of mode In_File. 
  27224.  
  27225.         b. For a Spacing of one: Reads and discards all characters until a line 
  27226.            terminator has been read, and then sets the current column number to 
  27227.            one. If the line terminator is not immediately followed by a page 
  27228.            terminator, the current line number is incremented by one. 
  27229.            Otherwise, if the line terminator is immediately followed by a page 
  27230.            terminator, then the page terminator is skipped, the current page 
  27231.            number is incremented by one, and the current line number is set to 
  27232.            one. 
  27233.  
  27234.         c. For a Spacing greater than one, the above actions are performed 
  27235.            Spacing times. 
  27236.  
  27237.         d. The exception Mode_Error is propagated if the mode is not In_File. 
  27238.            The exception End_Error is propagated if an attempt is made to read 
  27239.            a file terminator. 
  27240.  
  27241.          1.
  27242.  
  27243.             function End_Of_Line(File : in File_Type) return Boolean;
  27244.             function End_Of_Line return Boolean;
  27245.  
  27246.         a. Operates on a file of mode In_File. Returns True if a line 
  27247.            terminator or a file terminator is next; otherwise returns False. 
  27248.  
  27249.         b. The exception Mode_Error is propagated if the mode is not In_File. 
  27250.  
  27251.          1.
  27252.  
  27253.             procedure New_Page(File : in File_Type);
  27254.             procedure New_Page;
  27255.  
  27256.         a. Operates on a file of mode Out_File or Append_File. Outputs a line 
  27257.            terminator if the current line is not terminated, or if the current 
  27258.            page is empty (that is, if the current column and line numbers are 
  27259.            both equal to one). Then outputs a page terminator, which terminates 
  27260.            the current page. Adds one to the current page number and sets the 
  27261.            current column and line numbers to one. 
  27262.  
  27263.         b. The exception Mode_Error is propagated if the mode is not Out_File 
  27264.            or Append_File. 
  27265.  
  27266.          1.
  27267.  
  27268.             procedure Skip_Page(File : in File_Type);
  27269.             procedure Skip_Page;
  27270.  
  27271.         a. Operates on a file of mode In_File. Reads and discards all 
  27272.            characters and line terminators until a page terminator has been 
  27273.            read. Then adds one to the current page number, and sets the current 
  27274.            column and line numbers to one. 
  27275.  
  27276.         b. The exception Mode_Error is propagated if the mode is not In_File. 
  27277.            The exception End_Error is propagated if an attempt is made to read 
  27278.            a file terminator. 
  27279.  
  27280.          1.
  27281.  
  27282.             function End_Of_Page(File : in File_Type) return Boolean;
  27283.             function End_Of_Page return Boolean;
  27284.  
  27285.         a. Operates on a file of mode In_File. Returns True if the combination 
  27286.            of a line terminator and a page terminator is next, or if a file 
  27287.            terminator is next; otherwise returns False. 
  27288.  
  27289.         b. The exception Mode_Error is propagated if the mode is not In_File. 
  27290.  
  27291.          1.
  27292.  
  27293.             function End_Of_File(File : in File_Type) return Boolean;
  27294.             function End_Of_File return Boolean;
  27295.  
  27296.         a. Operates on a file of mode In_File. Returns True if a file 
  27297.            terminator is next, or if the combination of a line, a page, and a 
  27298.            file terminator is next; otherwise returns False. 
  27299.  
  27300.         b. The exception Mode_Error is propagated if the mode is not In_File. 
  27301.  
  27302.         c. The following subprograms provide for the control of the current 
  27303.            position of reading or writing in a file. In all cases, the default 
  27304.            file is the current output file. 
  27305.  
  27306.          1.
  27307.  
  27308.             procedure Set_Col(File : in File_Type; To : in Positive_Count);
  27309.             procedure Set_Col(To  : in Positive_Count);
  27310.  
  27311.         a. If the file mode is Out_File or Append_File: 
  27312.  
  27313.              1. If the value specified by To is greater than the current column 
  27314.                 number, outputs spaces, adding one to the current column number 
  27315.                 after each space, until the current column number equals the 
  27316.                 specified value. If the value specified by To is equal to the 
  27317.                 current column number, there is no effect. If the value 
  27318.                 specified by To is less than the current column number, has the 
  27319.                 effect of calling New_Line (with a spacing of one), then 
  27320.                 outputs (To - 1) spaces, and sets the current column number to 
  27321.                 the specified value. 
  27322.  
  27323.              2. The exception Layout_Error is propagated if the value specified 
  27324.                 by To exceeds Line_Length when the line length is bounded (that 
  27325.                 is, when it does not have the conventional value zero). 
  27326.  
  27327.         a. If the file mode is In_File: 
  27328.  
  27329.              1. Reads (and discards) individual characters, line terminators, 
  27330.                 and page terminators, until the next character to be read has a 
  27331.                 column number that equals the value specified by To; there is 
  27332.                 no effect if the current column number already equals this 
  27333.                 value. Each transfer of a character or terminator maintains the 
  27334.                 current column, line, and page numbers in the same way as a Get 
  27335.                 procedure, see A.10.6. (Short lines will be skipped until a 
  27336.                 line is reached that has a character at the specified column 
  27337.                 position.) 
  27338.  
  27339.              2. The exception End_Error is propagated if an attempt is made to 
  27340.                 read a file terminator. 
  27341.  
  27342.          1.
  27343.  
  27344.             procedure Set_Line(File : in File_Type; To : in Positive_Count);
  27345.             procedure Set_Line(To  : in Positive_Count);
  27346.  
  27347.         a. If the file mode is Out_File or Append_File: 
  27348.  
  27349.              1. If the value specified by To is greater than the current line 
  27350.                 number, has the effect of repeatedly calling New_Line (with a 
  27351.                 spacing of one), until the current line number equals the 
  27352.                 specified value. If the value specified by To is equal to the 
  27353.                 current line number, there is no effect. If the value specified 
  27354.                 by To is less than the current line number, has the effect of 
  27355.                 calling New_Page followed by a call of New_Line with a spacing 
  27356.                 equal to (To - 1). 
  27357.  
  27358.              2. The exception Layout_Error is propagated if the value specified 
  27359.                 by To exceeds Page_Length when the page length is bounded (that 
  27360.                 is, when it does not have the conventional value zero). 
  27361.  
  27362.         a. If the mode is In_File: 
  27363.  
  27364.              1. Has the effect of repeatedly calling Skip_Line (with a spacing 
  27365.                 of one), until the current line number equals the value 
  27366.                 specified by To; there is no effect if the current line number 
  27367.                 already equals this value. (Short pages will be skipped until a 
  27368.                 page is reached that has a line at the specified line 
  27369.                 position.) 
  27370.  
  27371.              2. The exception End_Error is propagated if an attempt is made to 
  27372.                 read a file terminator. 
  27373.  
  27374.          1.
  27375.  
  27376.             function Col(File : in File_Type) return Positive_Count;
  27377.             function Col return Positive_Count;
  27378.  
  27379.         a. Returns the current column number. 
  27380.  
  27381.         b. The exception Layout_Error is propagated if this number exceeds 
  27382.            Count'Last. 
  27383.  
  27384.          1.
  27385.  
  27386.             function Line(File : in File_Type) return Positive_Count;
  27387.             function Line return Positive_Count;
  27388.  
  27389.         a. Returns the current line number. 
  27390.  
  27391.         b. The exception Layout_Error is propagated if this number exceeds 
  27392.            Count'Last. 
  27393.  
  27394.          1.
  27395.  
  27396.             function Page(File : in File_Type) return Positive_Count;
  27397.             function Page return Positive_Count;
  27398.  
  27399.         a. Returns the current page number. 
  27400.  
  27401.         b. The exception Layout_Error is propagated if this number exceeds 
  27402.            Count'Last. 
  27403.  
  27404.    1. The column number, line number, or page number are allowed to exceed 
  27405.       Count'Last (as a consequence of the input or output of sufficiently many 
  27406.       characters, lines, or pages). These events do not cause any exception to 
  27407.       be propagated. However, a call of Col, Line, or Page propagates the 
  27408.       exception Layout_Error if the corresponding number exceeds Count'Last. 
  27409.  
  27410.       NOTES 
  27411.  
  27412.    2. (25) A page terminator is always skipped whenever the preceding line 
  27413.       terminator is skipped. An implementation may represent the combination of 
  27414.       these terminators by a single character, provided that it is properly 
  27415.       recognized on input. 
  27416.  
  27417.  
  27418. ΓòÉΓòÉΓòÉ 17.10.6. Get and Put Procedures ΓòÉΓòÉΓòÉ
  27419.  
  27420.  
  27421.   Static Semantics
  27422.  
  27423.    1. The procedures Get and Put for items of the type Character, String, 
  27424.       numeric types, and enumeration types are described in subsequent 
  27425.       subclauses. Features of these procedures that are common to most of these 
  27426.       types are described in this subclause. The Get and Put procedures for 
  27427.       items of type Character and String deal with individual character values; 
  27428.       the Get and Put procedures for numeric and enumeration types treat the 
  27429.       items as lexical elements. 
  27430.  
  27431.    2. All procedures Get and Put have forms with a file parameter, written 
  27432.       first. Where this parameter is omitted, the appropriate (input or output) 
  27433.       current default file is understood to be specified. Each procedure Get 
  27434.       operates on a file of mode In_File. Each procedure Put operates on a file 
  27435.       of mode Out_File or Append_File. 
  27436.  
  27437.    3. All procedures Get and Put maintain the current column, line, and page 
  27438.       numbers of the specified file: the effect of each of these procedures 
  27439.       upon these numbers is the result of the effects of individual transfers 
  27440.       of characters and of individual output or skipping of terminators. Each 
  27441.       transfer of a character adds one to the current column number. Each 
  27442.       output of a line terminator sets the current column number to one and 
  27443.       adds one to the current line number. Each output of a page terminator 
  27444.       sets the current column and line numbers to one and adds one to the 
  27445.       current page number. For input, each skipping of a line terminator sets 
  27446.       the current column number to one and adds one to the current line number; 
  27447.       each skipping of a page terminator sets the current column and line 
  27448.       numbers to one and adds one to the current page number. Similar 
  27449.       considerations apply to the procedures Get_Line, Put_Line, and Set_Col. 
  27450.  
  27451.    4. Several Get and Put procedures, for numeric and enumeration types, have 
  27452.       format parameters which specify field lengths; these parameters are of 
  27453.       the nonnegative subtype Field of the type Integer. 
  27454.  
  27455.    5. Input-output of enumeration values uses the syntax of the corresponding 
  27456.       lexical elements. Any Get procedure for an enumeration type begins by 
  27457.       skipping any leading blanks, or line or page terminators. Get procedures 
  27458.       for numeric or enumeration types start by skipping leading blanks, where 
  27459.       a blank is defined as a space or a horizontal tabulation character. Next, 
  27460.       characters are input only so long as the sequence input is an initial 
  27461.       sequence of an identifier or of a character literal (in particular, input 
  27462.       ceases when a line terminator is encountered). The character or line 
  27463.       terminator that causes input to cease remains available for subsequent 
  27464.       input. 
  27465.  
  27466.    6. For a numeric type, the Get procedures have a format parameter called 
  27467.       Width. If the value given for this parameter is zero, the Get procedure 
  27468.       proceeds in the same manner as for enumeration types, but using the 
  27469.       syntax of numeric literals instead of that of enumeration literals. If a 
  27470.       nonzero value is given, then exactly Width characters are input, or the 
  27471.       characters up to a line terminator, whichever comes first; any skipped 
  27472.       leading blanks are included in the count. The syntax used for numeric 
  27473.       literals is an extended syntax that allows a leading sign (but no 
  27474.       intervening blanks, or line or page terminators) and that also allows 
  27475.       (for real types) an integer literal as well as forms that have digits 
  27476.       only before the point or only after the point. 
  27477.  
  27478.    7. Any Put procedure, for an item of a numeric or an enumeration type, 
  27479.       outputs the value of the item as a numeric literal, identifier, or 
  27480.       character literal, as appropriate. This is preceded by leading spaces if 
  27481.       required by the format parameters Width or Fore (as described in later 
  27482.       subclauses), and then a minus sign for a negative value; for an 
  27483.       enumeration type, the spaces follow instead of leading. The format given 
  27484.       for a Put procedure is overridden if it is insufficiently wide, by using 
  27485.       the minimum needed width. 
  27486.  
  27487.    8. Two further cases arise for Put procedures for numeric and enumeration 
  27488.       types, if the line length of the specified output file is bounded (that 
  27489.       is, if it does not have the conventional value zero). If the number of 
  27490.       characters to be output does not exceed the maximum line length, but is 
  27491.       such that they cannot fit on the current line, starting from the current 
  27492.       column, then (in effect) New_Line is called (with a spacing of one) 
  27493.       before output of the item. Otherwise, if the number of characters exceeds 
  27494.       the maximum line length, then the exception Layout_Error is propagated 
  27495.       and nothing is output. 
  27496.  
  27497.    9. The exception Status_Error is propagated by any of the procedures Get, 
  27498.       Get_Line, Put, and Put_Line if the file to be used is not open. The 
  27499.       exception Mode_Error is propagated by the procedures Get and Get_Line if 
  27500.       the mode of the file to be used is not In_File; and by the procedures Put 
  27501.       and Put_Line, if the mode is not Out_File or Append_File. 
  27502.  
  27503.   10. The exception End_Error is propagated by a Get procedure if an attempt is 
  27504.       made to skip a file terminator. The exception Data_Error is propagated by 
  27505.       a Get procedure if the sequence finally input is not a lexical element 
  27506.       corresponding to the type, in particular if no characters were input; for 
  27507.       this test, leading blanks are ignored; for an item of a numeric type, 
  27508.       when a sign is input, this rule applies to the succeeding numeric 
  27509.       literal. The exception Layout_Error is propagated by a Put procedure that 
  27510.       outputs to a parameter of type String, if the length of the actual string 
  27511.       is insufficient for the output of the item. 
  27512.  
  27513.             Examples
  27514.  
  27515.   11. In the examples, here and in A.10.8, and A.10.9, the string quotes and 
  27516.       the lower case letter b are not transferred: they are shown only to 
  27517.       reveal the layout and spaces. 
  27518.  
  27519.         12.
  27520.  
  27521.                       N : Integer;
  27522.                         ┬╖┬╖┬╖
  27523.                       Get(N);
  27524.  
  27525.         13.
  27526.  
  27527.                       -- Characters at input  Sequence input  Value of N
  27528.                       -- bb-12535b       -12535      -12535
  27529.                       -- bb12_535e1b      12_535e1     125350
  27530.                       -- bb12_535e;       12_535e     (none) Data_Error raised
  27531.  
  27532.   14. Example of overridden width parameter: 
  27533.  
  27534.         15.
  27535.  
  27536.                       Put(Item => -23, Width => 2);  --  "-23"
  27537.  
  27538.  
  27539. ΓòÉΓòÉΓòÉ 17.10.7. Input-Output of Characters and Strings ΓòÉΓòÉΓòÉ
  27540.  
  27541.  
  27542.   Static Semantics
  27543.  
  27544.    1. For an item of type Character the following procedures are provided: 
  27545.  
  27546.          2.
  27547.  
  27548.             procedure Get(File : in File_Type; Item : out Character);
  27549.             procedure Get(Item : out Character);
  27550.  
  27551.         a. After skipping any line terminators and any page terminators, reads 
  27552.            the next character from the specified input file and returns the 
  27553.            value of this character in the out parameter Item. 
  27554.  
  27555.         b. The exception End_Error is propagated if an attempt is made to skip 
  27556.            a file terminator. 
  27557.  
  27558.          1.
  27559.  
  27560.             procedure Put(File : in File_Type; Item : in Character);
  27561.             procedure Put(Item : in Character);
  27562.  
  27563.         a. If the line length of the specified output file is bounded (that is, 
  27564.            does not have the conventional value zero), and the current column 
  27565.            number exceeds it, has the effect of calling New_Line with a spacing 
  27566.            of one. Then, or otherwise, outputs the given character to the file. 
  27567.  
  27568.          1.
  27569.  
  27570.             procedure Look_Ahead (File     : in  File_Type;
  27571.                        Item     : out Character;
  27572.                        End_Of_Line : out Boolean);
  27573.  
  27574.             procedure Look_Ahead (Item     : out Character;
  27575.                        End_Of_Line : out Boolean);
  27576.  
  27577.         a. Mode_Error is propagated if the mode of the file is not In_File. 
  27578.            Sets End_Of_Line to True if at end of line, including if at end of 
  27579.            page or at end of file; in each of these cases the value of Item is 
  27580.            not specified. Otherwise End_Of_Line is set to False and Item is set 
  27581.            to the the next character (without consuming it) from the file. 
  27582.  
  27583.          1.
  27584.  
  27585.             procedure Get_Immediate(File : in  File_Type;
  27586.                         Item : out Character);
  27587.  
  27588.             procedure Get_Immediate(Item : out Character);
  27589.  
  27590.         a. Reads the next character, either control or graphic, from the 
  27591.            specified File or the default input file. Mode_Error is propagated 
  27592.            if the mode of the file is not In_File. End_Error is propagated if 
  27593.            at the end of the file. The current column, line and page numbers 
  27594.            for the file are not affected. 
  27595.  
  27596.          1.
  27597.  
  27598.             procedure Get_Immediate(File    : in  File_Type;
  27599.                         Item    : out Character;
  27600.                         Available : out Boolean);
  27601.  
  27602.             procedure Get_Immediate(Item    : out Character;
  27603.                         Available : out Boolean);
  27604.  
  27605.         a. If a character, either control or graphic, is available from the 
  27606.            specified File or the default input file, then the character is 
  27607.            read; Available is True and Item contains the value of this 
  27608.            character. If a character is not available, then Available is False 
  27609.            and the value of Item is not specified. Mode_Error is propagated if 
  27610.            the mode of the file is not In_File. End_Error is propagated if at 
  27611.            the end of the file. The current column, line and page numbers for 
  27612.            the file are not affected. 
  27613.  
  27614.    1. For an item of type String the following procedures are provided: 
  27615.  
  27616.          2.
  27617.  
  27618.             procedure Get(File : in File_Type; Item : out String);
  27619.             procedure Get(Item : out String);
  27620.  
  27621.         a. Determines the length of the given string and attempts that number 
  27622.            of Get operations for successive characters of the string (in 
  27623.            particular, no operation is performed if the string is null). 
  27624.  
  27625.          1.
  27626.  
  27627.             procedure Put(File : in File_Type; Item : in String);
  27628.             procedure Put(Item : in String);
  27629.  
  27630.         a. Determines the length of the given string and attempts that number 
  27631.            of Put operations for successive characters of the string (in 
  27632.            particular, no operation is performed if the string is null). 
  27633.  
  27634.          1.
  27635.  
  27636.             procedure Get_Line(File : in   File_Type;
  27637.                       Item :   out String;
  27638.                       Last :   out Natural);
  27639.  
  27640.             procedure Get_Line(Item : out String; Last : out Natural);
  27641.  
  27642.         a. Reads successive characters from the specified input file and 
  27643.            assigns them to successive characters of the specified string. 
  27644.            Reading stops if the end of the string is met. Reading also stops if 
  27645.            the end of the line is met before meeting the end of the string; in 
  27646.            this case Skip_Line is (in effect) called with a spacing of 1. The 
  27647.            values of characters not assigned are not specified. 
  27648.  
  27649.         b. If characters are read, returns in Last the index value such that 
  27650.            Item(Last) is the last character assigned (the index of the first 
  27651.            character assigned is Item'First). If no characters are read, 
  27652.            returns in Last an index value that is one less than Item'First. The 
  27653.            exception End_Error is propagated if an attempt is made to skip a 
  27654.            file terminator. 
  27655.  
  27656.          1.
  27657.  
  27658.             procedure Put_Line(File : in File_Type; Item : in String);
  27659.             procedure Put_Line(Item : in String);
  27660.  
  27661.         a. Calls the procedure Put for the given string, and then the procedure 
  27662.            New_Line with a spacing of one. 
  27663.  
  27664.   Implementation Advice
  27665.  
  27666.    1. The Get_Immediate procedures should be implemented with unbuffered input. 
  27667.       For a device such as a keyboard, input should be ``available'' if a key 
  27668.       has already been typed, whereas for a disk file, input should always be 
  27669.       available except at end of file. For a file associated with a 
  27670.       keyboard-like device, any line-editing features of the underlying 
  27671.       operating system should be disabled during the execution of 
  27672.       Get_Immediate. 
  27673.  
  27674.       NOTES 
  27675.  
  27676.    2. (26) Get_Immediate can be used to read a single key from the keyboard 
  27677.       ``immediately''; that is, without waiting for an end of line. In a call 
  27678.       of Get_Immediate without the parameter Available, the caller will wait 
  27679.       until a character is available. 
  27680.  
  27681.    3. (27) In a literal string parameter of Put, the enclosing string bracket 
  27682.       characters are not output. Each doubled string bracket character in the 
  27683.       enclosed string is output as a single string bracket character, as a 
  27684.       consequence of the rule for string literals, see 2.6. 
  27685.  
  27686.    4. (28) A string read by Get or written by Put can extend over several 
  27687.       lines. An implementation is allowed to assume that certain external files 
  27688.       do not contain page terminators, in which case Get_Line and Skip_Line can 
  27689.       return as soon as a line terminator is read. 
  27690.  
  27691.  
  27692. ΓòÉΓòÉΓòÉ 17.10.8. Input-Output for Integer Types ΓòÉΓòÉΓòÉ
  27693.  
  27694.  
  27695.   Static Semantics
  27696.  
  27697.    1. The following procedures are defined in the generic packages Integer_IO 
  27698.       and Modular_IO, which have to be instantiated for the appropriate signed 
  27699.       integer or modular type respectively (indicated by Num in the 
  27700.       specifications). 
  27701.  
  27702.    2. Values are output as decimal or based literals, without low line 
  27703.       characters or exponent, and, for Integer_IO, preceded by a minus sign if 
  27704.       negative. The format (which includes any leading spaces and minus sign) 
  27705.       can be specified by an optional field width parameter. Values of widths 
  27706.       of fields in output formats are of the nonnegative integer subtype Field. 
  27707.       Values of bases are of the integer subtype Number_Base. 
  27708.  
  27709.          3.
  27710.  
  27711.                       subtype Number_Base is Integer range 2 ┬╖┬╖ 16;
  27712.  
  27713.    4. The default field width and base to be used by output procedures are 
  27714.       defined by the following variables that are declared in the generic 
  27715.       packages Integer_IO and Modular_IO: 
  27716.  
  27717.          5.
  27718.  
  27719.                       Default_Width : Field := Num'Width;
  27720.                       Default_Base  : Number_Base := 10;
  27721.  
  27722.    6. The following procedures are provided: 
  27723.  
  27724.          7.
  27725.  
  27726.             procedure Get(File  : in   File_Type;
  27727.                    Item  :   out Num;
  27728.                    Width : in   Field := 0);
  27729.  
  27730.             procedure Get(Item : out Num; Width : in Field := 0);
  27731.  
  27732.         a. If the value of the parameter Width is zero, skips any leading 
  27733.            blanks, line terminators, or page terminators, then reads a plus 
  27734.            sign if present or (for a signed type only) a minus sign if present, 
  27735.            then reads the longest possible sequence of characters matching the 
  27736.            syntax of a numeric literal without a point. If a nonzero value of 
  27737.            Width is supplied, then exactly Width characters are input, or the 
  27738.            characters (possibly none) up to a line terminator, whichever comes 
  27739.            first; any skipped leading blanks are included in the count. 
  27740.  
  27741.         b. Returns, in the parameter Item, the value of type Num that 
  27742.            corresponds to the sequence input. 
  27743.  
  27744.         c. 10  The exception Data_Error is propagated if the sequence of 
  27745.            characters read does not form a legal integer literal or if the 
  27746.            value obtained is not of the subtype Num (for Integer_IO) or is not 
  27747.            in the base range of Num (for Modular_IO). 
  27748.  
  27749.          1.
  27750.  
  27751.             procedure Put(File  : in File_Type;
  27752.                    Item  : in Num;
  27753.                    Width : in Field := Default_Width;
  27754.                    Base  : in Number_Base := Default_Base);
  27755.  
  27756.             procedure Put(Item  : in Num;
  27757.                    Width : in Field := Default_Width;
  27758.                    Base  : in Number_Base := Default_Base);
  27759.  
  27760.         a. Outputs the value of the parameter Item as an integer literal, with 
  27761.            no low lines, no exponent, and no leading zeros (but a single zero 
  27762.            for the value zero), and a preceding minus sign for a negative 
  27763.            value. 
  27764.  
  27765.         b. If the resulting sequence of characters to be output has fewer than 
  27766.            Width characters, then leading spaces are first output to make up 
  27767.            the difference. 
  27768.  
  27769.         c. Uses the syntax for decimal literal if the parameter Base has the 
  27770.            value ten (either explicitly or through Default_Base); otherwise, 
  27771.            uses the syntax for based literal, with any letters in upper case. 
  27772.  
  27773.          1.
  27774.  
  27775.             procedure Get(From : in   String;
  27776.                    Item :   out Num;
  27777.                    Last :   out Positive);
  27778.  
  27779.         a. Reads an integer value from the beginning of the given string, 
  27780.            following the same rules as the Get procedure that reads an integer 
  27781.            value from a file, but treating the end of the string as a file 
  27782.            terminator. Returns, in the parameter Item, the value of type Num 
  27783.            that corresponds to the sequence input. Returns in Last the index 
  27784.            value such that From(Last) is the last character read. 
  27785.  
  27786.         b. The exception Data_Error is propagated if the sequence input does 
  27787.            not have the required syntax or if the value obtained is not of the 
  27788.            subtype Num. 
  27789.  
  27790.          1.
  27791.  
  27792.             procedure Put(To  :   out String;
  27793.                    Item : in   Num;
  27794.                    Base : in   Number_Base := Default_Base);
  27795.  
  27796.         a. Outputs the value of the parameter Item to the given string, 
  27797.            following the same rule as for output to a file, using the length of 
  27798.            the given string as the value for Width. 
  27799.  
  27800.    1. Integer_Text_IO is a library package that is a nongeneric equivalent to 
  27801.       Text_IO.Integer_IO for the predefined type Integer: 
  27802.  
  27803.          2.
  27804.  
  27805.                       with Ada.Text_IO;
  27806.                       package Ada.Integer_Text_IO is new Ada.Text_IO.Integer_IO(Integer);
  27807.  
  27808.    3. For each predefined signed integer type, a nongeneric equivalent to 
  27809.       Text_IO.Integer_IO is provided, with names such as 
  27810.       Ada.Long_Integer_Text_IO. 
  27811.  
  27812.             Implementation Permissions
  27813.  
  27814.    4. The nongeneric equivalent packages may, but need not, be actual 
  27815.       instantiations of the generic package for the appropriate predefined 
  27816.       type. 
  27817.  
  27818.       NOTES 
  27819.  
  27820.    5. (29) For Modular_IO, execution of Get propagates Data_Error if the 
  27821.       sequence of characters read forms an integer literal outside the range 
  27822.       0┬╖┬╖Num'Last. 
  27823.  
  27824.             Examples
  27825.  
  27826.          1.
  27827.  
  27828.                       package Int_IO is new Integer_IO(Small_Int); use Int_IO;
  27829.                       -- default format used at instantiation,
  27830.                       -- Default_Width = 4, Default_Base = 10
  27831.  
  27832.          2.
  27833.  
  27834.                       Put(126);               -- "b126"
  27835.                       Put(-126, 7);             -- "bbb-126"
  27836.                       Put(126, Width => 13, Base => 2);   -- "bbb2#1111110#"
  27837.  
  27838.  
  27839. ΓòÉΓòÉΓòÉ 17.10.9. Input-Output for Real Types ΓòÉΓòÉΓòÉ
  27840.  
  27841.  
  27842.   Static Semantics
  27843.  
  27844.    1. The following procedures are defined in the generic packages Float_IO, 
  27845.       Fixed_IO, and Decimal_IO, which have to be instantiated for the 
  27846.       appropriate floating point, ordinary fixed point, or decimal fixed point 
  27847.       type respectively (indicated by Num in the specifications). 
  27848.  
  27849.    2. Values are output as decimal literals without low line characters. The 
  27850.       format of each value output consists of a Fore field, a decimal point, an 
  27851.       Aft field, and (if a nonzero Exp parameter is supplied) the letter E and 
  27852.       an Exp field. The two possible formats thus correspond to: 
  27853.  
  27854.          3.
  27855.  
  27856.                       Fore .  Aft
  27857.  
  27858.    4. and to: 
  27859.  
  27860.          5.
  27861.  
  27862.                       Fore .  Aft  E  Exp
  27863.  
  27864.    6. without any spaces between these fields. The Fore field may include 
  27865.       leading spaces, and a minus sign for negative values. The Aft field 
  27866.       includes only decimal digits (possibly with trailing zeros). The Exp 
  27867.       field includes the sign (plus or minus) and the exponent (possibly with 
  27868.       leading zeros). 
  27869.  
  27870.    7. For floating point types, the default lengths of these fields are defined 
  27871.       by the following variables that are declared in the generic package 
  27872.       Float_IO: 
  27873.  
  27874.          8.
  27875.  
  27876.                       Default_Fore : Field := 2;
  27877.                       Default_Aft  : Field := Num'Digits-1;
  27878.                       Default_Exp  : Field := 3;
  27879.  
  27880.    9. For ordinary or decimal fixed point types, the default lengths of these 
  27881.       fields are defined by the following variables that are declared in the 
  27882.       generic packages Fixed_IO and Decimal_IO, respectively: 
  27883.  
  27884.         10.
  27885.  
  27886.                       Default_Fore : Field := Num'Fore;
  27887.                       Default_Aft  : Field := Num'Aft;
  27888.                       Default_Exp  : Field := 0;
  27889.  
  27890.   11. The following procedures are provided: 
  27891.  
  27892.         12.
  27893.  
  27894.             procedure Get(File  : in   File_Type;
  27895.                    Item  :   out Num;
  27896.                    Width : in   Field := 0);
  27897.  
  27898.             procedure Get(Item : out Num; Width : in Field := 0);
  27899.  
  27900.         a. If the value of the parameter Width is zero, skips any leading 
  27901.            blanks, line terminators, or page terminators, then reads the 
  27902.            longest possible sequence of characters matching the syntax of any 
  27903.            of the following (see 2.4): 
  27904.  
  27905.              1. [+|-]numeric_literal 
  27906.  
  27907.              2. [+|-]numeral.[exponent] 
  27908.  
  27909.              3. [+|-].numeral[exponent] 
  27910.  
  27911.              4. [+|-]base#based_numeral.#[exponent] 
  27912.  
  27913.              5. [+|-]base#.based_numeral#[exponent] 
  27914.  
  27915.         a. If a nonzero value of Width is supplied, then exactly Width 
  27916.            characters are input, or the characters (possibly none) up to a line 
  27917.            terminator, whichever comes first; any skipped leading blanks are 
  27918.            included in the count. 
  27919.  
  27920.         b. Returns in the parameter Item the value of type Num that corresponds 
  27921.            to the sequence input, preserving the sign (positive if none has 
  27922.            been specified) of a zero value if Num is a floating point type and 
  27923.            Num'Signed_Zeros is True. 
  27924.  
  27925.         c. The exception Data_Error is propagated if the sequence input does 
  27926.            not have the required syntax or if the value obtained is not of the 
  27927.            subtype Num. 
  27928.  
  27929.          1.
  27930.  
  27931.             procedure Put(File : in File_Type;
  27932.                    Item : in Num;
  27933.                    Fore : in Field := Default_Fore;
  27934.                    Aft  : in Field := Default_Aft;
  27935.                    Exp  : in Field := Default_Exp);
  27936.  
  27937.             procedure Put(Item : in Num;
  27938.                    Fore : in Field := Default_Fore;
  27939.                    Aft  : in Field := Default_Aft;
  27940.                    Exp  : in Field := Default_Exp);
  27941.  
  27942.         a. Outputs the value of the parameter Item as a decimal literal with 
  27943.            the format defined by Fore, Aft and Exp. If the value is negative, 
  27944.            or if Num is a floating point type where Num'Signed_Zeros is True 
  27945.            and the value is a negatively signed zero, then a minus sign is 
  27946.            included in the integer part. If Exp has the value zero, then the 
  27947.            integer part to be output has as many digits as are needed to 
  27948.            represent the integer part of the value of Item, overriding Fore if 
  27949.            necessary, or consists of the digit zero if the value of Item has no 
  27950.            integer part. 
  27951.  
  27952.         b. If Exp has a value greater than zero, then the integer part to be 
  27953.            output has a single digit, which is nonzero except for the value 0.0 
  27954.            of Item. 
  27955.  
  27956.         c. In both cases, however, if the integer part to be output has fewer 
  27957.            than Fore characters, including any minus sign, then leading spaces 
  27958.            are first output to make up the difference. The number of digits of 
  27959.            the fractional part is given by Aft, or is one if Aft equals zero. 
  27960.            The value is rounded; a value of exactly one half in the last place 
  27961.            is rounded away from zero. 
  27962.  
  27963.         d. If Exp has the value zero, there is no exponent part. If Exp has a 
  27964.            value greater than zero, then the exponent part to be output has as 
  27965.            many digits as are needed to represent the exponent part of the 
  27966.            value of Item (for which a single digit integer part is used), and 
  27967.            includes an initial sign (plus or minus). If the exponent part to be 
  27968.            output has fewer than Exp characters, including the sign, then 
  27969.            leading zeros precede the digits, to make up the difference. For the 
  27970.            value 0.0 of Item, the exponent has the value zero. 
  27971.  
  27972.          1.
  27973.  
  27974.             procedure Get(From : in String; Item : out Num; Last : out Positive);
  27975.  
  27976.         a. Reads a real value from the beginning of the given string, following 
  27977.            the same rule as the Get procedure that reads a real value from a 
  27978.            file, but treating the end of the string as a file terminator. 
  27979.            Returns, in the parameter Item, the value of type Num that 
  27980.            corresponds to the sequence input. Returns in Last the index value 
  27981.            such that From(Last) is the last character read. 
  27982.  
  27983.         b. The exception Data_Error is propagated if the sequence input does 
  27984.            not have the required syntax, or if the value obtained is not of the 
  27985.            subtype Num. 
  27986.  
  27987.          1.
  27988.  
  27989.             procedure Put(To  : out String;
  27990.                    Item : in Num;
  27991.                    Aft  : in Field := Default_Aft;
  27992.                    Exp  : in Field := Default_Exp);
  27993.  
  27994.         a. Outputs the value of the parameter Item to the given string, 
  27995.            following the same rule as for output to a file, using a value for 
  27996.            Fore such that the sequence of characters output exactly fills the 
  27997.            string, including any leading spaces. 
  27998.  
  27999.    1. Float_Text_IO is a library package that is a nongeneric equivalent to 
  28000.       Text_IO.Float_IO for the predefined type Float: 
  28001.  
  28002.          2.
  28003.  
  28004.                       with Ada.Text_IO;
  28005.                       package Ada.Float_Text_IO is new Ada.Text_IO.Float_IO(Float);
  28006.  
  28007.    3. For each predefined floating point type, a nongeneric equivalent to 
  28008.       Text_IO.Float_IO is provided, with names such as Ada.Long_Float_Text_IO. 
  28009.  
  28010.             Implementation Permissions
  28011.  
  28012.    4. An implementation may extend Get and Put for floating point types to 
  28013.       support special values such as infinities and NaNs. 
  28014.  
  28015.    5. The implementation of Put need not produce an output value with greater 
  28016.       accuracy than is supported for the base subtype. The additional accuracy, 
  28017.       if any, of the value produced by Put when the number of requested digits 
  28018.       in the integer and fractional parts exceeds the required accuracy is 
  28019.       implementation defined. 
  28020.  
  28021.    6. The nongeneric equivalent packages may, but need not, be actual 
  28022.       instantiations of the generic package for the appropriate predefined 
  28023.       type. 
  28024.  
  28025.       NOTES 
  28026.  
  28027.    7. (30) For an item with a positive value, if output to a string exactly 
  28028.       fills the string without leading spaces, then output of the corresponding 
  28029.       negative value will propagate Layout_Error. 
  28030.  
  28031.    8. (31) The rules for the Value attribute, see 3.5, and the rules for Get 
  28032.       are based on the same set of formats. 
  28033.  
  28034.             Examples
  28035.  
  28036.          1.
  28037.  
  28038.                       package Real_IO is new Float_IO(Real); use Real_IO;
  28039.                       -- default format used at instantiation, Default_Exp = 3
  28040.  
  28041.          2.
  28042.  
  28043.                       X : Real := -123.4567;  --  digits 8  (see 3.5.7)
  28044.  
  28045.          3.
  28046.  
  28047.                       Put(X);  -- default format "-1.2345670E+02"
  28048.                       Put(X, Fore => 5, Aft => 3, Exp => 2);  -- "bbb-1.235E+2"
  28049.                       Put(X, 5, 3, 0);  -- "b-123.457"
  28050.  
  28051.  
  28052. ΓòÉΓòÉΓòÉ 17.10.10. Input-Output for Enumeration Types ΓòÉΓòÉΓòÉ
  28053.  
  28054.  
  28055.   Static Semantics
  28056.  
  28057.    1. The following procedures are defined in the generic package 
  28058.       Enumeration_IO, which has to be instantiated for the appropriate 
  28059.       enumeration type (indicated by Enum in the specification). 
  28060.  
  28061.    2. Values are output using either upper or lower case letters for 
  28062.       identifiers. This is specified by the parameter Set, which is of the 
  28063.       enumeration type Type_Set. 
  28064.  
  28065.          3.
  28066.  
  28067.                       type Type_Set is (Lower_Case, Upper_Case);
  28068.  
  28069.    4. The format (which includes any trailing spaces) can be specified by an 
  28070.       optional field width parameter. The default field width and letter case 
  28071.       are defined by the following variables that are declared in the generic 
  28072.       package Enumeration_IO: 
  28073.  
  28074.          5.
  28075.  
  28076.                       Default_Width  : Field := 0;
  28077.                       Default_Setting : Type_Set := Upper_Case;
  28078.  
  28079.    6. The following procedures are provided: 
  28080.  
  28081.          7.
  28082.  
  28083.             procedure Get(File : in File_Type; Item : out Enum);
  28084.             procedure Get(Item : out Enum);
  28085.  
  28086.         a. After skipping any leading blanks, line terminators, or page 
  28087.            terminators, reads an identifier according to the syntax of this 
  28088.            lexical element (lower and upper case being considered equivalent), 
  28089.            or a character literal according to the syntax of this lexical 
  28090.            element (including the apostrophes). Returns, in the parameter Item, 
  28091.            the value of type Enum that corresponds to the sequence input. 
  28092.  
  28093.         b. The exception Data_Error is propagated if the sequence input does 
  28094.            not have the required syntax, or if the identifier or character 
  28095.            literal does not correspond to a value of the subtype Enum. 
  28096.  
  28097.          1.
  28098.  
  28099.             procedure Put(File  : in File_Type;
  28100.                    Item  : in Enum;
  28101.                    Width : in Field := Default_Width;
  28102.                    Set  : in Type_Set := Default_Setting);
  28103.  
  28104.             procedure Put(Item  : in Enum;
  28105.                    Width : in Field := Default_Width;
  28106.                    Set  : in Type_Set := Default_Setting);
  28107.  
  28108.         a. Outputs the value of the parameter Item as an enumeration literal 
  28109.            (either an identifier or a character literal). The optional 
  28110.            parameter Set indicates whether lower case or upper case is used for 
  28111.            identifiers; it has no effect for character literals. If the 
  28112.            sequence of characters produced has fewer than Width characters, 
  28113.            then trailing spaces are finally output to make up the difference. 
  28114.            If Enum is a character type, the sequence of characters produced is 
  28115.            as for Enum'Image(Item), as modified by the Width and Set 
  28116.            parameters. 
  28117.  
  28118.          1.
  28119.  
  28120.             procedure Get(From : in   String;
  28121.                    Item :   out Enum;
  28122.                    Last :   out Positive);
  28123.  
  28124.         a. Reads an enumeration value from the beginning of the given string, 
  28125.            following the same rule as the Get procedure that reads an 
  28126.            enumeration value from a file, but treating the end of the string as 
  28127.            a file terminator. Returns, in the parameter Item, the value of type 
  28128.            Enum that corresponds to the sequence input. Returns in Last the 
  28129.            index value such that From(Last) is the last character read. 
  28130.  
  28131.         b. The exception Data_Error is propagated if the sequence input does 
  28132.            not have the required syntax, or if the identifier or character 
  28133.            literal does not correspond to a value of the subtype Enum. 
  28134.  
  28135.          1.
  28136.  
  28137.             procedure Put(To  : out String;
  28138.                    Item : in Enum;
  28139.                    Set  : in Type_Set := Default_Setting);
  28140.  
  28141.         a. Outputs the value of the parameter Item to the given string, 
  28142.            following the same rule as for output to a file, using the length of 
  28143.            the given string as the value for Width. 
  28144.  
  28145.    1. Although the specification of the generic package Enumeration_IO would 
  28146.       allow instantiation for an float type, this is not the intended purpose 
  28147.       of this generic package, and the effect of such instantiations is not 
  28148.       defined by the language. 
  28149.  
  28150.       NOTES 
  28151.  
  28152.    2. (32) There is a difference between Put defined for characters, and for 
  28153.       enumeration values. Thus 
  28154.  
  28155.          3.
  28156.  
  28157.                       Ada.Text_IO.Put('A');  --  outputs the character A
  28158.  
  28159.          4.
  28160.  
  28161.                       package Char_IO is new Ada.Text_IO.Enumeration_IO(Character);
  28162.                       Char_IO.Put('A');  -- outputs the character 'A', between apostrophes
  28163.  
  28164.    5. (33) The type Boolean is an enumeration type, hence Enumeration_IO can be 
  28165.       instantiated for this type. 
  28166.  
  28167.  
  28168. ΓòÉΓòÉΓòÉ 17.11. Wide Text Input-Output ΓòÉΓòÉΓòÉ
  28169.  
  28170.    1. The package Wide_Text_IO provides facilities for input and output in 
  28171.       human-readable form. Each file is read or written sequentially, as a 
  28172.       sequence of wide characters grouped into lines, and as a sequence of 
  28173.       lines grouped into pages. 
  28174.  
  28175.             Static Semantics
  28176.  
  28177.    2. The specification of package Wide_Text_IO is the same as that for 
  28178.       Text_IO, except that in each Get, Look_Ahead, Get_Immediate, Get_Line, 
  28179.       Put, and Put_Line procedure, any occurrence of Character is replaced by 
  28180.       Wide_Character, and any occurrence of String is replaced by Wide_String. 
  28181.  
  28182.    3. Nongeneric equivalents of Wide_Text_IO.Integer_IO and 
  28183.       Wide_Text_IO.Float_IO are provided (as for Text_IO) for each predefined 
  28184.       numeric type, with names such as Ada.Integer_Wide_Text_IO, 
  28185.       Ada.Long_Integer_Wide_Text_IO, Ada.Float_Wide_Text_IO, 
  28186.       Ada.Long_Float_Wide_Text_IO. 
  28187.  
  28188.  
  28189. ΓòÉΓòÉΓòÉ 17.12. Stream Input-Output ΓòÉΓòÉΓòÉ
  28190.  
  28191.    1. The packages Streams.Stream_IO, Text_IO.Text_Streams, and 
  28192.       Wide_Text_IO.Text_Streams provide stream-oriented operations on files. 
  28193.  
  28194.  A.12.1                        The Package Streams.Stream_IO 
  28195.  A.12.2                        The Package Text_IO.Text_Streams 
  28196.  A.12.3                        The Package Wide_Text_IO.Text_Streams 
  28197.  
  28198.  
  28199. ΓòÉΓòÉΓòÉ 17.12.1. The Package Streams.Stream_IO ΓòÉΓòÉΓòÉ
  28200.  
  28201.    1. The subprograms in the child package Streams.Stream_IO provide control 
  28202.       over stream files. Access to a stream file is either sequential, via a 
  28203.       call on Read or Write to transfer an array of stream elements, or 
  28204.       positional (if supported by the implementation for the given file), by 
  28205.       specifying a relative index for an element. Since a stream file can be 
  28206.       converted to a Stream_Access value, calling stream-oriented attribute 
  28207.       subprograms of different element types with the same Stream_Access value 
  28208.       provides heterogeneous input-output. See 13.13 for a general discussion 
  28209.       of streams. 
  28210.  
  28211.             Static Semantics
  28212.  
  28213.    2. The library package Streams.Stream_IO has the following declaration: 
  28214.  
  28215.          3.
  28216.  
  28217.                       with Ada.IO_Exceptions;
  28218.                       package Ada.Streams.Stream_IO is
  28219.  
  28220.          4.
  28221.  
  28222.                          type Stream_Access is access all Root_Stream_Type'Class;
  28223.  
  28224.          5.
  28225.  
  28226.                          type File_Type is limited private;
  28227.  
  28228.          6.
  28229.  
  28230.                          type File_Mode is (In_File, Out_File, Append_File);
  28231.  
  28232.          7.
  28233.  
  28234.                          type   Count      is range 0 ┬╖┬╖ implementation-defined;
  28235.                         subtype Positive_Count is Count range 1 ┬╖┬╖ Count'Last;
  28236.                          -- Index into file, in stream elements.
  28237.  
  28238.          8.
  28239.  
  28240.                          procedure Create (File : in out File_Type;
  28241.                                  Mode : in File_Mode := Out_File;
  28242.                                  Name : in String   := "";
  28243.                                  Form : in String   := "");
  28244.  
  28245.          9.
  28246.  
  28247.                          procedure Open (File : in out File_Type;
  28248.                                 Mode : in File_Mode;
  28249.                                 Name : in String;
  28250.                                 Form : in String := "");
  28251.  
  28252.         10.
  28253.  
  28254.                          procedure Close  (File : in out File_Type);
  28255.                         procedure Delete (File : in out File_Type);
  28256.                         procedure Reset  (File : in out File_Type; Mode : in File_Mode);
  28257.                         procedure Reset  (File : in out File_Type);
  28258.  
  28259.         11.
  28260.  
  28261.                          function Mode (File : in File_Type) return File_Mode;
  28262.                         function Name (File : in File_Type) return String;
  28263.                         function Form (File : in File_Type) return String;
  28264.  
  28265.         12.
  28266.  
  28267.                          function Is_Open   (File : in File_Type) return Boolean;
  28268.                         function End_Of_File (File : in File_Type) return Boolean;
  28269.  
  28270.         13.
  28271.  
  28272.                          function Stream (File : in File_Type) return Stream_Access;
  28273.                         -- Return stream access for use with T'Input and T'Output
  28274.  
  28275.          1.
  28276.  
  28277.                          -- Read array of stream elements from file
  28278.                         procedure Read (File : in  File_Type;
  28279.                                 Item : out Stream_Element_Array;
  28280.                                 Last : out Stream_Element_Offset;
  28281.                                 From : in  Positive_Count);
  28282.  
  28283.          2.
  28284.  
  28285.                          procedure Read (File : in  File_Type;
  28286.                                 Item : out Stream_Element_Array;
  28287.                                 Last : out Stream_Element_Offset);
  28288.  
  28289.          1.
  28290.  
  28291.                          -- Write array of stream elements into file
  28292.                         procedure Write (File : in File_Type;
  28293.                                  Item : in Stream_Element_Array;
  28294.                                  To  : in Positive_Count);
  28295.  
  28296.          2.
  28297.  
  28298.                          procedure Write (File : in File_Type;
  28299.                                  Item : in Stream_Element_Array);
  28300.  
  28301.          1.
  28302.  
  28303.                          -- Operations on position within file
  28304.  
  28305.          2.
  28306.  
  28307.                          procedure Set_Index(File : in File_Type;
  28308.                                   To  : in Positive_Count);
  28309.  
  28310.          3.
  28311.  
  28312.                          function Index(File : in File_Type) return Positive_Count;
  28313.                         function Size (File : in File_Type) return Count;
  28314.  
  28315.          4.
  28316.  
  28317.                          procedure Set_Mode(File : in out File_Type;
  28318.                                   Mode : in   File_Mode);
  28319.  
  28320.          5.
  28321.  
  28322.                          procedure Flush(File : in out File_Type);
  28323.  
  28324.          6.
  28325.  
  28326.                          -- exceptions
  28327.                         Status_Error : exception renames IO_Exceptions.Status_Error;
  28328.                         Mode_Error  : exception renames IO_Exceptions.Mode_Error;
  28329.                         Name_Error  : exception renames IO_Exceptions.Name_Error;
  28330.                         Use_Error   : exception renames IO_Exceptions.Use_Error;
  28331.                         Device_Error : exception renames IO_Exceptions.Device_Error;
  28332.                         End_Error   : exception renames IO_Exceptions.End_Error;
  28333.                         Data_Error  : exception renames IO_Exceptions.Data_Error;
  28334.  
  28335.          7.
  28336.  
  28337.                       private
  28338.                         ┬╖┬╖┬╖ -- not specified by the language
  28339.                       end Ada.Streams.Stream_IO;
  28340.  
  28341.    8. The subprograms Create, Open, Close, Delete, Reset, Mode, Name, Form, 
  28342.       Is_Open, and End_of_File have the same effect as the corresponding 
  28343.       subprograms in Sequential_IO, see A.8.2. 
  28344.  
  28345.    9. The Stream function returns a Stream_Access result from a File_Type 
  28346.       object, thus allowing the stream-oriented attributes Read, Write, Input, 
  28347.       and Output to be used on the same file for multiple types. 
  28348.  
  28349.   10. The procedures Read and Write are equivalent to the corresponding 
  28350.       operations in the package Streams. Read propagates Mode_Error if the mode 
  28351.       of File is not In_File. Write propagates Mode_Error if the mode of File 
  28352.       is not Out_File or Append_File. The Read procedure with a Positive_Count 
  28353.       parameter starts reading at the specified index. The Write procedure with 
  28354.       a Positive_Count parameter starts writing at the specified index. 
  28355.  
  28356.   11. The Index function returns the current file index, as a count (in stream 
  28357.       elements) from the beginning of the file. The position of the first 
  28358.       element in the file is 1. 
  28359.  
  28360.   12. The Set_Index procedure sets the current index to the specified value. 
  28361.  
  28362.   13. If positioning is not supported for the given file, then a call of Index 
  28363.       or Set_Index propagates Use_Error. Similarly, a call of Read or Write 
  28364.       with a Positive_Count parameter propagates Use_Error. 
  28365.  
  28366.   14. The Size function returns the current size of the file, in stream 
  28367.       elements. 
  28368.  
  28369.   15. The Set_Mode procedure changes the mode of the file. If the new mode is 
  28370.       Append_File, the file is positioned to its end; otherwise, the position 
  28371.       in the file is unchanged. 
  28372.  
  28373.   16. The Flush procedure synchronizes the external file with the internal file 
  28374.       (by flushing any internal buffers) without closing the file or changing 
  28375.       the position. Mode_Error is propagated if the mode of the file is 
  28376.       In_File. 
  28377.  
  28378.  
  28379. ΓòÉΓòÉΓòÉ 17.12.2. The Package Text_IO.Text_Streams ΓòÉΓòÉΓòÉ
  28380.  
  28381.    1. The package Text_IO.Text_Streams provides a function for treating a text 
  28382.       file as a stream. 
  28383.  
  28384.             Static Semantics
  28385.  
  28386.    2. The library package Text_IO.Text_Streams has the following declaration: 
  28387.  
  28388.          3.
  28389.  
  28390.                       with Ada.Streams;
  28391.                       package Ada.Text_IO.Text_Streams is
  28392.                         type Stream_Access is access all Streams.Root_Stream_Type'Class;
  28393.  
  28394.          4.
  28395.  
  28396.                         function Stream (File : in File_Type) return Stream_Access;
  28397.                       end Ada.Text_IO.Text_Streams;
  28398.  
  28399.    5. The Stream function has the same effect as the corresponding function in 
  28400.       Streams.Stream_IO. 
  28401.  
  28402.       NOTES 
  28403.  
  28404.    6. (34) The ability to obtain a stream for a text file allows Current_Input, 
  28405.       Current_Output, and Current_Error to be processed with the functionality 
  28406.       of streams, including the mixing of text and binary input-output, and the 
  28407.       mixing of binary input-output for different types. 
  28408.  
  28409.    7. (35) Performing operations on the stream associated with a text file does 
  28410.       not affect the column, line, or page counts. 
  28411.  
  28412.  
  28413. ΓòÉΓòÉΓòÉ 17.12.3. The Package Wide_Text_IO.Text_Streams ΓòÉΓòÉΓòÉ
  28414.  
  28415.    1. The package Wide_Text_IO.Text_Streams provides a function for treating a 
  28416.       wide text file as a stream. 
  28417.  
  28418.             Static Semantics
  28419.  
  28420.    2. The library package Wide_Text_IO.Text_Streams has the following 
  28421.       declaration: 
  28422.  
  28423.          3.
  28424.  
  28425.                       with Ada.Streams;
  28426.                       package Ada.Wide_Text_IO.Text_Streams is
  28427.                         type Stream_Access is access all Streams.Root_Stream_Type'Class;
  28428.  
  28429.          4.
  28430.  
  28431.                         function Stream (File : in File_Type) return Stream_Access;
  28432.                       end Ada.Wide_Text_IO.Text_Streams;
  28433.  
  28434.    5. The Stream function has the same effect as the corresponding function in 
  28435.       Streams.Stream_IO. 
  28436.  
  28437.  
  28438. ΓòÉΓòÉΓòÉ 17.13. Exceptions in Input-Output ΓòÉΓòÉΓòÉ
  28439.  
  28440.    1. The package IO_Exceptions defines the exceptions needed by the predefined 
  28441.       input-output packages. 
  28442.  
  28443.             Static Semantics
  28444.  
  28445.    2. The library package IO_Exceptions has the following declaration: 
  28446.  
  28447.          3.
  28448.  
  28449.                       package Ada.IO_Exceptions is
  28450.                         pragma Pure(IO_Exceptions);
  28451.  
  28452.          4.
  28453.  
  28454.                         Status_Error : exception;
  28455.                         Mode_Error  : exception;
  28456.                         Name_Error  : exception;
  28457.                         Use_Error   : exception;
  28458.                         Device_Error : exception;
  28459.                         End_Error   : exception;
  28460.                         Data_Error  : exception;
  28461.                         Layout_Error : exception;
  28462.  
  28463.          5.
  28464.  
  28465.                       end Ada.IO_Exceptions;
  28466.  
  28467.    6. If more than one error condition exists, the corresponding exception that 
  28468.       appears earliest in the following list is the one that is propagated. 
  28469.  
  28470.    7. The exception Status_Error is propagated by an attempt to operate upon a 
  28471.       file that is not open, and by an attempt to open a file that is already 
  28472.       open. 
  28473.  
  28474.    8. The exception Mode_Error is propagated by an attempt to read from, or 
  28475.       test for the end of, a file whose current mode is Out_File or 
  28476.       Append_File, and also by an attempt to write to a file whose current mode 
  28477.       is In_File. In the case of Text_IO, the exception Mode_Error is also 
  28478.       propagated by specifying a file whose current mode is Out_File or 
  28479.       Append_File in a call of Set_Input, Skip_Line, End_Of_Line, Skip_Page, or 
  28480.       End_Of_Page; and by specifying a file whose current mode is In_File in a 
  28481.       call of Set_Output, Set_Line_Length, Set_Page_Length, Line_Length, 
  28482.       Page_Length, New_Line, or New_Page. 
  28483.  
  28484.    9. The exception Name_Error is propagated by a call of Create or Open if the 
  28485.       string given for the parameter Name does not allow the identification of 
  28486.       an external file. For example, this exception is propagated if the string 
  28487.       is improper, or, alternatively, if either none or more than one external 
  28488.       file corresponds to the string. 
  28489.  
  28490.   10. The exception Use_Error is propagated if an operation is attempted that 
  28491.       is not possible for reasons that depend on characteristics of the 
  28492.       external file. For example, this exception is propagated by the procedure 
  28493.       Create, among other circumstances, if the given mode is Out_File but the 
  28494.       form specifies an input only device, if the parameter Form specifies 
  28495.       invalid access rights, or if an external file with the given name already 
  28496.       exists and overwriting is not allowed. 
  28497.  
  28498.   11. The exception Device_Error is propagated if an input-output operation 
  28499.       cannot be completed because of a malfunction of the underlying system. 
  28500.  
  28501.   12. The exception End_Error is propagated by an attempt to skip (read past) 
  28502.       the end of a file. 
  28503.  
  28504.   13. The exception Data_Error can be propagated by the procedure Read (or by 
  28505.       the Read attribute) if the element read cannot be interpreted as a value 
  28506.       of the required subtype. This exception is also propagated by a procedure 
  28507.       Get (defined in the package Text_IO) if the input character sequence 
  28508.       fails to satisfy the required syntax, or if the value input does not 
  28509.       belong to the range of the required subtype. 
  28510.  
  28511.   14. The exception Layout_Error is propagated (in text input-output) by Col, 
  28512.       Line, or Page if the value returned exceeds Count'Last. The exception 
  28513.       Layout_Error is also propagated on output by an attempt to set column or 
  28514.       line numbers in excess of specified maximum line or page lengths, 
  28515.       respectively (excluding the unbounded cases). It is also propagated by an 
  28516.       attempt to Put too many characters to a string. 
  28517.  
  28518.             Documentation Requirements
  28519.  
  28520.   15. The implementation shall document the conditions under which Name_Error, 
  28521.       Use_Error and Device_Error are propagated. 
  28522.  
  28523.             Implementation Permissions
  28524.  
  28525.   16. If the associated check is too complex, an implementation need not 
  28526.       propagate Data_Error as part of a procedure Read (or the Read attribute) 
  28527.       if the value read cannot be interpreted as a value of the required 
  28528.       subtype. 
  28529.  
  28530.             Erroneous Execution
  28531.  
  28532.   17. If the element read by the procedure Read (or by the Read attribute) 
  28533.       cannot be interpreted as a value of the required subtype, but this is not 
  28534.       detected and Data_Error is not propagated, then the resulting value can 
  28535.       be abnormal, and subsequent references to the value can lead to erroneous 
  28536.       execution, as explained in 13.9.1. 
  28537.  
  28538.  
  28539. ΓòÉΓòÉΓòÉ 17.14. File Sharing ΓòÉΓòÉΓòÉ
  28540.  
  28541.  
  28542.   Dynamic Semantics
  28543.  
  28544.    1. It is not specified by the language whether the same external file can be 
  28545.       associated with more than one file object. If such sharing is supported 
  28546.       by the implementation, the following effects are defined: 
  28547.  
  28548.         a. Operations on one text file object do not affect the column, line, 
  28549.            and page numbers of any other file object. 
  28550.  
  28551.         b. Standard_Input and Standard_Output are associated with distinct 
  28552.            external files, so operations on one of these files cannot affect 
  28553.            operations on the other file. In particular, reading from 
  28554.            Standard_Input does not affect the current page, line, and column 
  28555.            numbers for Standard_Output, nor does writing to Standard_Output 
  28556.            affect the current page, line, and column numbers for 
  28557.            Standard_Input. 
  28558.  
  28559.         c. For direct and stream files, the current index is a property of each 
  28560.            file object; an operation on one file object does not affect the 
  28561.            current index of any other file object. 
  28562.  
  28563.         d. For direct and stream files, the current size of the file is a 
  28564.            property of the external file. 
  28565.   All other effects are identical. 
  28566.  
  28567.  
  28568. ΓòÉΓòÉΓòÉ 17.15. The Package Command_Line ΓòÉΓòÉΓòÉ
  28569.  
  28570.    1. The package Command_Line allows a program to obtain the values of its 
  28571.       arguments and to set the exit status code to be returned on normal 
  28572.       termination. 
  28573.  
  28574.             Static Semantics
  28575.  
  28576.    2. The library package Ada.Command_Line has the following declaration: 
  28577.  
  28578.          3.
  28579.  
  28580.                       package Ada.Command_Line is
  28581.                        pragma Preelaborate(Command_Line);
  28582.  
  28583.          4.
  28584.  
  28585.                         function Argument_Count return Natural;
  28586.  
  28587.          5.
  28588.  
  28589.                         function Argument (Number : in Positive) return String;
  28590.  
  28591.          6.
  28592.  
  28593.                         function Command_Name return String;
  28594.  
  28595.          7.
  28596.  
  28597.                         type Exit_Status is implementation-defined integer type;
  28598.  
  28599.          8.
  28600.  
  28601.                         Success : constant Exit_Status;
  28602.                        Failure : constant Exit_Status;
  28603.  
  28604.          9.
  28605.  
  28606.                         procedure Set_Exit_Status (Code : in Exit_Status);
  28607.  
  28608.         10.
  28609.  
  28610.                       private
  28611.                        ┬╖┬╖┬╖ -- not specified by the language
  28612.                       end Ada.Command_Line;
  28613.  
  28614.         11.
  28615.  
  28616.             function Argument_Count return Natural;
  28617.  
  28618.         a. If the external execution environment supports passing arguments to 
  28619.            a program, then Argument_Count returns the number of arguments 
  28620.            passed to the program invoking the function. Otherwise it returns 0. 
  28621.            The meaning of ``number of arguments'' is implementation defined. 
  28622.  
  28623.          1.
  28624.  
  28625.             function Argument (Number : in Positive) return String;
  28626.  
  28627.         a. If the external execution environment supports passing arguments to 
  28628.            a program, then Argument returns an implementation-defined value 
  28629.            corresponding to the argument at relative position Number. If Number 
  28630.            is outside the range 1┬╖┬╖Argument_Count, then Constraint_Error is 
  28631.            propagated. 
  28632.  
  28633.          1.
  28634.  
  28635.             function Command_Name return String;
  28636.  
  28637.         a. If the external execution environment supports passing arguments to 
  28638.            a program, then Command_Name returns an implementation-defined value 
  28639.            corresponding to the name of the command invoking the program; 
  28640.            otherwise Command_Name returns the null string. 
  28641.  
  28642.         b. The type Exit_Status represents the range of exit status values 
  28643.            supported by the external execution environment. The constants 
  28644.            Success and Failure correspond to success and failure, respectively. 
  28645.  
  28646.          1.
  28647.  
  28648.             procedure Set_Exit_Status (Code : in Exit_Status);
  28649.  
  28650.         a. If the external execution environment supports returning an exit 
  28651.            status from a program, then Set_Exit_Status sets Code as the status. 
  28652.            Normal termination of a program returns as the exit status the value 
  28653.            most recently set by Set_Exit_Status, or, if no such value has been 
  28654.            set, then the value Success. If a program terminates abnormally, the 
  28655.            status set by Set_Exit_Status is ignored, and an 
  28656.            implementation-defined exit status value is set. 
  28657.  
  28658.         b. If the external execution environment does not support returning an 
  28659.            exit value from a program, then Set_Exit_Status does nothing. 
  28660.  
  28661.   Implementation Permissions
  28662.  
  28663.    1. An alternative declaration is allowed for package Command_Line if 
  28664.       different functionality is appropriate for the external execution 
  28665.       environment. 
  28666.  
  28667.       NOTES 
  28668.  
  28669.    2. (36) Argument_Count, Argument, and Command_Name correspond to the C 
  28670.       language's argc, argv[n] (for n>0) and argv[0], respectively. 
  28671.  
  28672.  
  28673. ΓòÉΓòÉΓòÉ 18. Interface to Other Languages (normative) ΓòÉΓòÉΓòÉ
  28674.  
  28675.    1. This Annex describes features for writing mixed-language programs. 
  28676.       General interface support is presented first; then specific support for 
  28677.       C, COBOL, and Fortran is defined, in terms of language interface packages 
  28678.       for each of these languages. 
  28679.  
  28680.  B.1                           Interfacing Pragmas 
  28681.  B.2                           The Package Interfaces 
  28682.  B.3                           Interfacing with C 
  28683.  B.4                           Interfacing with COBOL 
  28684.  B.5                           Interfacing with Fortran --- The Detailed Node 
  28685.                                Listing --- 
  28686.  B.1                           Interfacing Pragmas 
  28687.  B.2                           The Package Interfaces 
  28688.  B.3                           Interfacing with C 
  28689.  B.3.1                         The Package Interfaces.C.Strings 
  28690.  B.3.2                         The Generic Package Interfaces.C.Pointers 
  28691.  B.4                           Interfacing with COBOL 
  28692.  B.5                           Interfacing with Fortran 
  28693.  
  28694.  
  28695. ΓòÉΓòÉΓòÉ 18.1. Interfacing Pragmas ΓòÉΓòÉΓòÉ
  28696.  
  28697.    1. A pragma Import is used to import an entity defined in a foreign language 
  28698.       into an Ada program, thus allowing a foreign-language subprogram to be 
  28699.       called from Ada, or a foreign-language variable to be accessed from Ada. 
  28700.       In contrast, a pragma Export is used to export an Ada entity to a foreign 
  28701.       language, thus allowing an Ada subprogram to be called from a foreign 
  28702.       language, or an Ada object to be accessed from a foreign language. The 
  28703.       pragmas Import and Export are intended primarily for objects and 
  28704.       subprograms, although implementations are allowed to support other 
  28705.       entities. 
  28706.  
  28707.    2. A pragma Convention is used to specify that an Ada entity should use the 
  28708.       conventions of another language. It is intended primarily for types and 
  28709.       ``callback'' subprograms. For example, ``pragma Convention(Fortran, 
  28710.       Matrix);'' implies that Matrix should be represented according to the 
  28711.       conventions of the supported Fortran implementation, namely column-major 
  28712.       order. 
  28713.  
  28714.    3. A pragma Linker_Options is used to specify the system linker parameters 
  28715.       needed when a given compilation unit is included in a partition. 
  28716.  
  28717.             Syntax
  28718.  
  28719.    4. An interfacing pragma is a representation pragma that is one of the 
  28720.       pragmas Import, Export, or Convention. Their forms, together with that of 
  28721.       the related pragma Linker_Options, are as follows: 
  28722.  
  28723.          5.
  28724.  
  28725.                       pragma Import
  28726.                        ([Convention =>] convention_identifier,
  28727.                         [Entity =>] local_name [,
  28728.                         [External_Name =>] string_expression] [,
  28729.                         [Link_Name =>] string_expression]);
  28730.  
  28731.          6.
  28732.  
  28733.                       pragma Export
  28734.                        ([Convention =>] convention_identifier,
  28735.                         [Entity =>] local_name [,
  28736.                         [External_Name =>] string_expression] [,
  28737.                         [Link_Name =>] string_expression]);
  28738.  
  28739.          7.
  28740.  
  28741.                       pragma Convention
  28742.                        ([Convention =>] convention_identifier,
  28743.                        [Entity =>] local_name);
  28744.  
  28745.          8.
  28746.  
  28747.                       pragma Linker_Options(string_expression);
  28748.  
  28749.         a. A pragma Linker_Options is allowed only at the place of a 
  28750.            declarative_item. 
  28751.  
  28752.   Name Resolution Rules
  28753.  
  28754.    1. The expected type for a string_expression in an interfacing pragma or in 
  28755.       pragma Linker_Options is String. 
  28756.  
  28757.             Legality Rules
  28758.  
  28759.    2. The convention_identifier of an interfacing pragma shall be the name of a 
  28760.       convention. The convention names are implementation defined, except for 
  28761.       certain language-defined ones, such as Ada and Intrinsic, as explained in 
  28762.       6.3.1: ``Conformance Rules''. Additional convention names generally 
  28763.       represent the calling conventions of foreign languages, language 
  28764.       implementations, or specific run-time models. The convention of a 
  28765.       callable entity is its calling convention. 
  28766.  
  28767.    3. If L is a convention_identifier for a language, then a type T is said to 
  28768.       be compatible with convention L, (alternatively, is said to be an 
  28769.       L-compatible type) if any of the following conditions are met: 
  28770.  
  28771.         a. T is declared in a language interface package corresponding to L and 
  28772.            is defined to be L-compatible, see B.3, B.3.1, B.3.2, B.4 and B.5 
  28773.  
  28774.         b. Convention L has been specified for T in a pragma Convention, and T 
  28775.            is eligible for convention L; that is: 
  28776.  
  28777.              1. T is an array type with either an unconstrained or 
  28778.                 statically-constrained first subtype, and its component type is 
  28779.                 L-compatible, 
  28780.  
  28781.              2. T is a record type that has no discriminants and that only has 
  28782.                 components with statically-constrained subtypes, and each 
  28783.                 component type is L-compatible, 
  28784.  
  28785.              3. T is an access-to-object type, and its designated type is 
  28786.                 L-compatible, 
  28787.  
  28788.              4. T is an access-to-subprogram type, and its designated profile's 
  28789.                 parameter and result types are all L-compatible. 
  28790.  
  28791.         a. T is derived from an L-compatible type, 
  28792.  
  28793.         b. The implementation permits T as an L-compatible type. 
  28794.  
  28795.    1. If pragma Convention applies to a type, then the type shall either be 
  28796.       compatible with or eligible for the convention specified in the pragma. 
  28797.  
  28798.    2. A pragma Import shall be the completion of a declaration. Notwithstanding 
  28799.       any rule to the contrary, a pragma Import may serve as the completion of 
  28800.       any kind of (explicit) declaration if supported by an implementation for 
  28801.       that kind of declaration. If a completion is a pragma Import, then it 
  28802.       shall appear in the same declarative_part, package_specification, 
  28803.       task_definition or protected_definition as the declaration. For a library 
  28804.       unit, it shall appear in the same compilation, before any subsequent 
  28805.       compilation_units other than pragmas. If the local_name denotes more than 
  28806.       one entity, then the pragma Import is the completion of all of them. 
  28807.  
  28808.    3. An entity specified as the Entity argument to a pragma Import (or pragma 
  28809.       Export) is said to be imported (respectively, exported). 
  28810.  
  28811.    4. The declaration of an imported object shall not include an explicit 
  28812.       initialization expression. Default initializations are not performed. 
  28813.  
  28814.    5. The type of an imported or exported object shall be compatible with the 
  28815.       convention specified in the corresponding pragma. 
  28816.  
  28817.    6. For an imported or exported subprogram, the result and parameter types 
  28818.       shall each be compatible with the convention specified in the 
  28819.       corresponding pragma. 
  28820.  
  28821.    7. The external name and link name string_expressions of a pragma Import or 
  28822.       Export, and the string_expression of a pragma Linker_Options, shall be 
  28823.       static. 
  28824.  
  28825.             Static Semantics
  28826.  
  28827.    8. Import, Export, and Convention pragmas are representation pragmas that 
  28828.       specify the convention aspect of representation. In addition, Import and 
  28829.       Export pragmas specify the imported and exported aspects of 
  28830.       representation, respectively. 
  28831.  
  28832.    9. An interfacing pragma is a program unit pragma when applied to a program 
  28833.       unit, see 10.1.5. 
  28834.  
  28835.   10. An interfacing pragma defines the convention of the entity denoted by the 
  28836.       local_name. The convention represents the calling convention or 
  28837.       representation convention of the entity. For an access-to-subprogram 
  28838.       type, it represents the calling convention of designated subprograms. In 
  28839.       addition: 
  28840.  
  28841.         a. A pragma Import specifies that the entity is defined externally 
  28842.            (that is, outside the Ada program). 
  28843.  
  28844.         b. A pragma Export specifies that the entity is used externally. 
  28845.  
  28846.         c. A pragma Import or Export optionally specifies an entity's external 
  28847.            name, link name, or both. 
  28848.  
  28849.    1. An external name is a string value for the name used by a foreign 
  28850.       language program either for an entity that an Ada program imports, or for 
  28851.       referring to an entity that an Ada program exports. 
  28852.  
  28853.    2. A link name is a string value for the name of an exported or imported 
  28854.       entity, based on the conventions of the foreign language's compiler in 
  28855.       interfacing with the system's linker tool. 
  28856.  
  28857.    3. The meaning of link names is implementation defined. If neither a link 
  28858.       name nor the Address attribute of an imported or exported entity is 
  28859.       specified, then a link name is chosen in an implementation-defined 
  28860.       manner, based on the external name if one is specified. 
  28861.  
  28862.    4. Pragma Linker_Options has the effect of passing its string argument as a 
  28863.       parameter to the system linker (if one exists), if the immediately 
  28864.       enclosing compilation unit is included in the partition being linked. The 
  28865.       interpretation of the string argument, and the way in which the string 
  28866.       arguments from multiple Linker_Options pragmas are combined, is 
  28867.       implementation defined. 
  28868.  
  28869.             Dynamic Semantics
  28870.  
  28871.    5. Notwithstanding what this International Standard says elsewhere, the 
  28872.       elaboration of a declaration denoted by the local_name of a pragma Import 
  28873.       does not create the entity. Such an elaboration has no other effect than 
  28874.       to allow the defining name to denote the external entity. 
  28875.  
  28876.             Implementation Advice
  28877.  
  28878.    6. If an implementation supports pragma Export to a given language, then it 
  28879.       should also allow the main subprogram to be written in that language. It 
  28880.       should support some mechanism for invoking the elaboration of the Ada 
  28881.       library units included in the system, and for invoking the finalization 
  28882.       of the environment task. On typical systems, the recommended mechanism is 
  28883.       to provide two subprograms whose link names are "adainit" and "adafinal". 
  28884.       Adainit should contain the elaboration code for library units. Adafinal 
  28885.       should contain the finalization code. These subprograms should have no 
  28886.       effect the second and subsequent time they are called. 
  28887.  
  28888.    7. Automatic elaboration of preelaborated packages should be provided when 
  28889.       pragma Export is supported. 
  28890.  
  28891.    8. For each supported convention L other than Intrinsic, an implementation 
  28892.       should support Import and Export pragmas for objects of L-compatible 
  28893.       types and for subprograms, and pragma Convention for L-eligible types and 
  28894.       for subprograms, presuming the other language has corresponding features. 
  28895.       Pragma Convention need not be supported for scalar types. 
  28896.  
  28897.       NOTES 
  28898.  
  28899.    9. (1) Implementations may place restrictions on interfacing pragmas; for 
  28900.       example, requiring each exported entity to be declared at the library 
  28901.       level. 
  28902.  
  28903.   10. (2) A pragma Import specifies the conventions for accessing external 
  28904.       entities. It is possible that the actual entity is written in assembly 
  28905.       language, but reflects the conventions of a particular language. For 
  28906.       example, pragma Import(Ada, ┬╖┬╖┬╖) can be used to interface to an assembly 
  28907.       language routine that obeys the Ada compiler's calling conventions. 
  28908.  
  28909.   11. (3) To obtain ``call-back'' to an Ada subprogram from a foreign language 
  28910.       environment, pragma Convention should be specified both for the 
  28911.       access-to-subprogram type and the specific subprogram(s) to which 'Access 
  28912.       is applied. 
  28913.  
  28914.   12. (4) It is illegal to specify more than one of Import, Export, or 
  28915.       Convention for a given entity. 
  28916.  
  28917.   13. (5) The local_name in an interfacing pragma can denote more than one 
  28918.       entity in the case of overloading. Such a pragma applies to all of the 
  28919.       denoted entities. 
  28920.  
  28921.   14. (6) Also  13.8: ``Machine Code Insertions''. 
  28922.  
  28923.   15. (7) If both External_Name and Link_Name are specified for an Import or 
  28924.       Export pragma, then the External_Name is ignored. 
  28925.  
  28926.   16. (8) An interfacing pragma might result in an effect that violates Ada 
  28927.       semantics. 
  28928.  
  28929.             Examples
  28930.  
  28931.   17. Example of interfacing pragmas: 
  28932.  
  28933.         18.
  28934.  
  28935.                       package Fortran_Library is
  28936.                        function Sqrt (X : Float) return Float;
  28937.                        function Exp  (X : Float) return Float;
  28938.                       private
  28939.                        pragma Import(Fortran, Sqrt);
  28940.                        pragma Import(Fortran, Exp);
  28941.                       end Fortran_Library;
  28942.  
  28943.  
  28944. ΓòÉΓòÉΓòÉ 18.2. The Package Interfaces ΓòÉΓòÉΓòÉ
  28945.  
  28946.    1. Package Interfaces is the parent of several library packages that declare 
  28947.       types and other entities useful for interfacing to foreign languages. It 
  28948.       also contains some implementation-defined types that are useful across 
  28949.       more than one language (in particular for interfacing to assembly 
  28950.       language). 
  28951.  
  28952.             Static Semantics
  28953.  
  28954.    2. The library package Interfaces has the following skeletal declaration: 
  28955.  
  28956.          3.
  28957.  
  28958.                       package Interfaces is
  28959.                         pragma Pure(Interfaces);
  28960.  
  28961.          4.
  28962.  
  28963.                         type Integer_n is range -2**(n-1) ┬╖┬╖ 2**(n-1) - 1;
  28964.                         -- 2's complement
  28965.  
  28966.          5.
  28967.  
  28968.                         type Unsigned_n is mod 2**n;
  28969.  
  28970.          6.
  28971.  
  28972.                         function Shift_Left  (Value  : Unsigned_n;
  28973.                                    Amount : Natural) return Unsigned_n;
  28974.                         function Shift_Right (Value  : Unsigned_n;
  28975.                                    Amount : Natural) return Unsigned_n;
  28976.                         function Shift_Right_Arithmetic (Value  : Unsigned_n;
  28977.                                         Amount : Natural)
  28978.                          return Unsigned_n;
  28979.                         function Rotate_Left  (Value  : Unsigned_n;
  28980.                                    Amount : Natural) return Unsigned_n;
  28981.                         function Rotate_Right (Value  : Unsigned_n;
  28982.                                    Amount : Natural) return Unsigned_n;
  28983.                         ┬╖┬╖┬╖
  28984.                       end Interfaces;
  28985.  
  28986.   Implementation Requirements
  28987.  
  28988.    7. An implementation shall provide the following declarations in the visible 
  28989.       part of package Interfaces: 
  28990.  
  28991.         a. Signed and modular integer types of n bits, if supported by the 
  28992.            target architecture, for each n that is at least the size of a 
  28993.            storage element and that is a factor of the word size. The names of 
  28994.            these types are of the form Integer_n for the signed types, and 
  28995.            Unsigned_n for the modular types; 
  28996.  
  28997.         b. For each such modular type in Interfaces, shifting and rotating 
  28998.            subprograms as specified in the declaration of Interfaces above. 
  28999.            These subprograms are Intrinsic. They operate on a bit-by-bit basis, 
  29000.            using the binary representation of the value of the operands to 
  29001.            yield a binary representation for the result. The Amount parameter 
  29002.            gives the number of bits by which to shift or rotate. For shifting, 
  29003.            zero bits are shifted in, except in the case of 
  29004.            Shift_Right_Arithmetic, where one bits are shifted in if Value is at 
  29005.            least half the modulus. 
  29006.  
  29007.         c. Floating point types corresponding to each floating point format 
  29008.            fully supported by the hardware. 
  29009.  
  29010.   Implementation Permissions
  29011.  
  29012.    1. An implementation may provide implementation-defined library units that 
  29013.       are children of Interfaces, and may add declarations to the visible part 
  29014.       of Interfaces in addition to the ones defined above. 
  29015.  
  29016.    2. Implementation Advice 
  29017.  
  29018.    3. For each implementation-defined convention identifier, there should be a 
  29019.       child package of package Interfaces with the corresponding name. This 
  29020.       package should contain any declarations that would be useful for 
  29021.       interfacing to the language (implementation) represented by the 
  29022.       convention. Any declarations useful for interfacing to any language on 
  29023.       the given hardware architecture should be provided directly in 
  29024.       Interfaces. 
  29025.  
  29026.    4. An implementation supporting an interface to C, COBOL, or Fortran should 
  29027.       provide the corresponding package or packages described in the following 
  29028.       clauses. 
  29029.  
  29030.  
  29031. ΓòÉΓòÉΓòÉ 18.3. Interfacing with C ΓòÉΓòÉΓòÉ
  29032.  
  29033.    1. The facilities relevant to interfacing with the C language are the 
  29034.       package Interfaces.C and its children; and support for the Import, 
  29035.       Export, and Convention pragmas with convention_identifier C. 
  29036.  
  29037.    2. The package Interfaces.C contains the basic types, constants and 
  29038.       subprograms that allow an Ada program to pass scalars and strings to C 
  29039.       functions. 
  29040.  
  29041.             Static Semantics
  29042.  
  29043.    3. The library package Interfaces.C has the following declaration: 
  29044.  
  29045.          4.
  29046.  
  29047.                       package Interfaces.C is
  29048.                         pragma Pure(C);
  29049.  
  29050.          5.
  29051.  
  29052.                         -- Declarations based on C's <limits.h>
  29053.  
  29054.          6.
  29055.  
  29056.                         CHAR_BIT  : constant := implementation-defined; -- typically 8
  29057.                         SCHAR_MIN : constant := implementation-defined; -- typically -128
  29058.                         SCHAR_MAX : constant := implementation-defined; -- typically 127
  29059.                         UCHAR_MAX : constant := implementation-defined; -- typically 255
  29060.  
  29061.          7.
  29062.  
  29063.                         -- Signed and Unsigned Integers
  29064.                         type int  is range implementation-defined;
  29065.                         type short is range implementation-defined;
  29066.                         type long  is range implementation-defined;
  29067.  
  29068.          8.
  29069.  
  29070.                         type signed_char is range SCHAR_MIN ┬╖┬╖ SCHAR_MAX;
  29071.                         for signed_char'Size use CHAR_BIT;
  29072.  
  29073.          9.
  29074.  
  29075.                         type unsigned    is mod implementation-defined;
  29076.                         type unsigned_short is mod implementation-defined;
  29077.                         type unsigned_long  is mod implementation-defined;
  29078.  
  29079.         10.
  29080.  
  29081.                         type unsigned_char is mod (UCHAR_MAX+1);
  29082.                         for unsigned_char'Size use CHAR_BIT;
  29083.  
  29084.         11.
  29085.  
  29086.                         subtype plain_char is implementation-defined;
  29087.  
  29088.         12.
  29089.  
  29090.                         type ptrdiff_t is range implementation-defined;
  29091.  
  29092.         13.
  29093.  
  29094.                         type size_t is mod implementation-defined;
  29095.  
  29096.         14.
  29097.  
  29098.                         -- Floating Point
  29099.  
  29100.         15.
  29101.  
  29102.                         type C_float   is digits implementation-defined;
  29103.  
  29104.         16.
  29105.  
  29106.                         type double    is digits implementation-defined;
  29107.  
  29108.         17.
  29109.  
  29110.                         type long_double is digits implementation-defined;
  29111.  
  29112.         18.
  29113.  
  29114.                         -- Characters and Strings
  29115.  
  29116.         19.
  29117.  
  29118.                         type char is <implementation-defined character type>;
  29119.  
  29120.         20.
  29121.  
  29122.                         nul : constant char := char'First;
  29123.  
  29124.         21.
  29125.  
  29126.                         function To_C  (Item : in Character) return char;
  29127.  
  29128.         22.
  29129.  
  29130.                         function To_Ada (Item : in char) return Character;
  29131.  
  29132.         23.
  29133.  
  29134.                         type char_array is array (size_t range <>) of aliased char;
  29135.                         pragma Pack(char_array);
  29136.                         for char_array'Component_Size use CHAR_BIT;
  29137.  
  29138.         24.
  29139.  
  29140.                         function Is_Nul_Terminated (Item : in char_array) return Boolean;
  29141.  
  29142.         25.
  29143.  
  29144.                         function To_C  (Item    : in String;
  29145.                                 Append_Nul : in Boolean := True)
  29146.                          return char_array;
  29147.  
  29148.         26.
  29149.  
  29150.                         function To_Ada (Item   : in char_array;
  29151.                                 Trim_Nul : in Boolean := True)
  29152.                          return String;
  29153.  
  29154.         27.
  29155.  
  29156.                         procedure To_C (Item    : in String;
  29157.                                 Target   : out char_array;
  29158.                                 Count    : out size_t;
  29159.                                 Append_Nul : in Boolean := True);
  29160.  
  29161.         28.
  29162.  
  29163.                         procedure To_Ada (Item   : in char_array;
  29164.                                  Target  : out String;
  29165.                                  Count   : out Natural;
  29166.                                  Trim_Nul : in Boolean := True);
  29167.  
  29168.         29.
  29169.  
  29170.                         -- Wide Character and Wide String
  29171.  
  29172.         30.
  29173.  
  29174.                         type wchar_t is implementation-defined;
  29175.  
  29176.         31.
  29177.  
  29178.                         wide_nul : constant wchar_t := wchar_t'First;
  29179.  
  29180.         32.
  29181.  
  29182.                         function To_C  (Item : in Wide_Character) return wchar_t;
  29183.                         function To_Ada (Item : in wchar_t    ) return Wide_Character;
  29184.  
  29185.         33.
  29186.  
  29187.                         type wchar_array is array (size_t range <>) of aliased wchar_t;
  29188.  
  29189.         34.
  29190.  
  29191.                         pragma Pack(wchar_array);
  29192.  
  29193.         35.
  29194.  
  29195.                         function Is_Nul_Terminated (Item : in wchar_array)
  29196.                          return Boolean;
  29197.  
  29198.         36.
  29199.  
  29200.                         function To_C  (Item    : in Wide_String;
  29201.                                 Append_Nul : in Boolean := True)
  29202.                          return wchar_array;
  29203.  
  29204.         37.
  29205.  
  29206.                         function To_Ada (Item   : in wchar_array;
  29207.                                 Trim_Nul : in Boolean := True)
  29208.                          return Wide_String;
  29209.  
  29210.         38.
  29211.  
  29212.                         procedure To_C (Item    : in  Wide_String;
  29213.                                 Target   : out wchar_array;
  29214.                                 Count    : out size_t;
  29215.                                 Append_Nul : in  Boolean := True);
  29216.  
  29217.         39.
  29218.  
  29219.                         procedure To_Ada (Item   : in  wchar_array;
  29220.                                  Target  : out Wide_String;
  29221.                                  Count   : out Natural;
  29222.                                  Trim_Nul : in  Boolean := True);
  29223.  
  29224.         40.
  29225.  
  29226.                         Terminator_Error : exception;
  29227.  
  29228.         41.
  29229.  
  29230.                       end Interfaces.C;
  29231.  
  29232.   42. Each of the types declared in Interfaces.C is C-compatible. 
  29233.  
  29234.   43. The types int, short, long, unsigned, ptrdiff_t, size_t, double, char, 
  29235.       and wchar_t correspond respectively to the C types having the same names. 
  29236.       The types signed_char, unsigned_short, unsigned_long, unsigned_char, 
  29237.       C_float, and long_double correspond respectively to the C types signed 
  29238.       char, unsigned short, unsigned long, unsigned char, float, and long 
  29239.       double. 
  29240.  
  29241.   44. The type of the subtype plain_char is either signed_char or 
  29242.       unsigned_char, depending on the C implementation. 
  29243.  
  29244.         45.
  29245.  
  29246.             function To_C  (Item : in Character) return char;
  29247.             function To_Ada (Item : in char   ) return Character;
  29248.  
  29249.         a. The functions To_C and To_Ada map between the Ada type Character and 
  29250.            the C type char. 
  29251.  
  29252.          1.
  29253.  
  29254.             function Is_Nul_Terminated (Item : in char_array) return Boolean;
  29255.  
  29256.         a. The result of Is_Nul_Terminated is True if Item contains nul, and is 
  29257.            False otherwise. 
  29258.  
  29259.          1.
  29260.  
  29261.             function To_C (Item    : in String;
  29262.                     Append_Nul : in Boolean := True)
  29263.              return char_array;
  29264.  
  29265.             function To_Ada (Item   : in char_array;
  29266.                      Trim_Nul : in Boolean := True)
  29267.              return String;
  29268.  
  29269.         a. The result of To_C is a char_array value of length Item'Length (if 
  29270.            Append_Nul is False) or Item'Length+1 (if Append_Nul is True). The 
  29271.            lower bound is 0. For each component Item(I), the corresponding 
  29272.            component in the result is To_C applied to Item(I). The value nul is 
  29273.            appended if Append_Nul is True. 
  29274.  
  29275.         b. The result of To_Ada is a String whose length is Item'Length (if 
  29276.            Trim_Nul is False) or the length of the slice of Item preceding the 
  29277.            first nul (if Trim_Nul is True). The lower bound of the result is 1. 
  29278.            If Trim_Nul is False, then for each component Item(I) the 
  29279.            corresponding component in the result is To_Ada applied to Item(I). 
  29280.            If Trim_Nul is True, then for each component Item(I) before the 
  29281.            first nul the corresponding component in the result is To_Ada 
  29282.            applied to Item(I). The function propagates Terminator_Error if 
  29283.            Trim_Nul is True and Item does not contain nul. 
  29284.  
  29285.          1.
  29286.  
  29287.             procedure To_C (Item    : in String;
  29288.                     Target   : out char_array;
  29289.                     Count    : out size_t;
  29290.                     Append_Nul : in Boolean := True);
  29291.  
  29292.             procedure To_Ada (Item   : in char_array;
  29293.                      Target  : out String;
  29294.                      Count   : out Natural;
  29295.                      Trim_Nul : in Boolean := True);
  29296.  
  29297.         a. For procedure To_C, each element of Item is converted (via the To_C 
  29298.            function) to a char, which is assigned to the corresponding element 
  29299.            of Target. If Append_Nul is True, nul is then assigned to the next 
  29300.            element of Target. In either case, Count is set to the number of 
  29301.            Target elements assigned. If Target is not long enough, 
  29302.            Constraint_Error is propagated. 
  29303.  
  29304.         b. For procedure To_Ada, each element of Item (if Trim_Nul is False) or 
  29305.            each element of Item preceding the first nul (if Trim_Nul is True) 
  29306.            is converted (via the To_Ada function) to a Character, which is 
  29307.            assigned to the corresponding element of Target. Count is set to the 
  29308.            number of Target elements assigned. If Target is not long enough, 
  29309.            Constraint_Error is propagated. If Trim_Nul is True and Item does 
  29310.            not contain nul, then Terminator_Error is propagated. 
  29311.  
  29312.          1.
  29313.  
  29314.             function Is_Nul_Terminated (Item : in wchar_array) return Boolean;
  29315.  
  29316.         a. The result of Is_Nul_Terminated is True if Item contains wide_nul, 
  29317.            and is False otherwise. 
  29318.  
  29319.          1.
  29320.  
  29321.             function To_C  (Item : in Wide_Character) return wchar_t;
  29322.             function To_Ada (Item : in wchar_t    ) return Wide_Character;
  29323.  
  29324.         a. To_C and To_Ada provide the mappings between the Ada and C wide 
  29325.            character types. 
  29326.  
  29327.          1.
  29328.  
  29329.             function To_C  (Item    : in Wide_String;
  29330.                      Append_Nul : in Boolean := True)
  29331.               return wchar_array;
  29332.  
  29333.             function To_Ada (Item   : in wchar_array;
  29334.                      Trim_Nul : in Boolean := True)
  29335.               return Wide_String;
  29336.  
  29337.             procedure To_C (Item    : in Wide_String;
  29338.                     Target   : out wchar_array;
  29339.                     Count    : out size_t;
  29340.                     Append_Nul : in Boolean := True);
  29341.  
  29342.             procedure To_Ada (Item   : in wchar_array;
  29343.                      Target  : out Wide_String;
  29344.                      Count   : out Natural;
  29345.                      Trim_Nul : in Boolean := True);
  29346.  
  29347.         a. The To_C and To_Ada subprograms that convert between Wide_String and 
  29348.            wchar_array have analogous effects to the To_C and To_Ada 
  29349.            subprograms that convert between String and char_array, except that 
  29350.            wide_nul is used instead of nul. 
  29351.  
  29352.   Implementation Requirements
  29353.  
  29354.    1. An implementation shall support pragma Convention with a C 
  29355.       convention_identifier for a C-eligible type, see B.1. 
  29356.  
  29357.             Implementation Permissions
  29358.  
  29359.    2. An implementation may provide additional declarations in the C interface 
  29360.       packages. 
  29361.  
  29362.             Implementation Advice
  29363.  
  29364.    3. An implementation should support the following interface correspondences 
  29365.       between Ada and C. 
  29366.  
  29367.         a. An Ada procedure corresponds to a void-returning C function. 
  29368.  
  29369.         b. An Ada function corresponds to a non-void C function. 
  29370.  
  29371.         c. An Ada in scalar parameter is passed as a scalar argument to a C 
  29372.            function. 
  29373.  
  29374.         d. An Ada in parameter of an access-to-object type with designated type 
  29375.            T is passed as a t* argument to a C function, where t is the C type 
  29376.            corresponding to the Ada type T. 
  29377.  
  29378.         e. An Ada access T parameter, or an Ada out or in out parameter of an 
  29379.            elementary type T, is passed as a t* argument to a C function, where 
  29380.            t is the C type corresponding to the Ada type T. In the case of an 
  29381.            elementary out or in out parameter, a pointer to a temporary copy is 
  29382.            used to preserve by-copy semantics. 
  29383.  
  29384.         f. An Ada parameter of a record type T, of any mode, is passed as a t* 
  29385.            argument to a C function, where t is the C struct corresponding to 
  29386.            the Ada type T. 
  29387.  
  29388.         g. An Ada parameter of an array type with component type T, of any 
  29389.            mode, is passed as a t* argument to a C function, where t is the C 
  29390.            type corresponding to the Ada type T. 
  29391.  
  29392.         h. An Ada parameter of an access-to-subprogram type is passed as a 
  29393.            pointer to a C function whose prototype corresponds to the 
  29394.            designated subprogram's specification. 
  29395.   NOTES 
  29396.  
  29397.    1. (9) Values of type char_array are not implicitly terminated with nul. If 
  29398.       a char_array is to be passed as a parameter to an imported C function 
  29399.       requiring nul termination, it is the programmer's responsibility to 
  29400.       obtain this effect. 
  29401.  
  29402.    2. (10) To obtain the effect of C's sizeof(item_type), where Item_Type is 
  29403.       the corresponding Ada type, evaluate the expression: 
  29404.       size_t(Item_Type'Size/CHAR_BIT). 
  29405.  
  29406.    3. (11) There is no explicit support for C's union types. Unchecked 
  29407.       conversions can be used to obtain the effect of C unions. 
  29408.  
  29409.    4. (12) A C function that takes a variable number of arguments can 
  29410.       correspond to several Ada subprograms, taking various specific numbers 
  29411.       and types of parameters. 
  29412.  
  29413.             Examples
  29414.  
  29415.    5. Example of using the Interfaces.C package: 
  29416.  
  29417.          6.
  29418.  
  29419.                       --Calling the C Library Function strcpy
  29420.                       with Interfaces.C;
  29421.                       procedure Test is
  29422.                         package C renames Interfaces.C;
  29423.                         use type C.char_array;
  29424.                         -- Call <string.h> strcpy:
  29425.                         -- C definition of strcpy:
  29426.                         --   char *strcpy(char *s1, const char *s2);
  29427.                         -- This function copies the string pointed to by s2
  29428.                         -- (including the terminating null character) into the array
  29429.                         -- pointed to by s1. If copying takes place between objects that
  29430.                         -- overlap, the behavior is undefined. The strcpy function
  29431.                         --  returns the value of s1.
  29432.  
  29433.          7.
  29434.  
  29435.                         -- Note: since the C function's return value is of no interest,
  29436.                         --  the Ada interface is a procedure
  29437.                         procedure Strcpy (Target : out C.char_array;
  29438.                                  Source : in  C.char_array);
  29439.  
  29440.          8.
  29441.  
  29442.                       pragma Import(C, Strcpy, "strcpy");
  29443.  
  29444.          9.
  29445.  
  29446.                         Chars1 :  C.char_array(1┬╖┬╖20);
  29447.                         Chars2 :  C.char_array(1┬╖┬╖20);
  29448.  
  29449.         10.
  29450.  
  29451.                       begin
  29452.                         Chars2(1┬╖┬╖6) := "qwert" & C.nul;
  29453.  
  29454.         11.
  29455.  
  29456.                         Strcpy(Chars1, Chars2);
  29457.  
  29458.         12.
  29459.  
  29460.                       -- Now Chars1(1┬╖┬╖6) = "qwert" & C.Nul
  29461.  
  29462.         13.
  29463.  
  29464.                       end Test;
  29465.  
  29466.  B.3.1                         The Package Interfaces.C.Strings 
  29467.  B.3.2                         The Generic Package Interfaces.C.Pointers 
  29468.  
  29469.  
  29470. ΓòÉΓòÉΓòÉ 18.3.1. The Package Interfaces.C.Strings ΓòÉΓòÉΓòÉ
  29471.  
  29472.    1. The package Interfaces.C.Strings declares types and subprograms allowing 
  29473.       an Ada program to allocate, reference, update, and free C-style strings. 
  29474.       In particular, the private type chars_ptr corresponds to a common use of 
  29475.       ``char *'' in C programs, and an object of this type can be passed to a 
  29476.       subprogram to which pragma Import(C,┬╖┬╖┬╖) has been applied, and for which 
  29477.       ``char *'' is the type of the argument of the C function. 
  29478.  
  29479.             Static Semantics
  29480.  
  29481.    2. The library package Interfaces.C.Strings has the following declaration: 
  29482.  
  29483.          3.
  29484.  
  29485.                       package Interfaces.C.Strings is
  29486.                         pragma Preelaborate(Strings);
  29487.  
  29488.          4.
  29489.  
  29490.                         type char_array_access is access all char_array;
  29491.  
  29492.          5.
  29493.  
  29494.                         type chars_ptr is private;
  29495.  
  29496.          6.
  29497.  
  29498.                         type chars_ptr_array is array (size_t range <>) of chars_ptr;
  29499.  
  29500.          7.
  29501.  
  29502.                         Null_Ptr : constant chars_ptr;
  29503.  
  29504.          8.
  29505.  
  29506.                         function To_Chars_Ptr (Item    : in char_array_access;
  29507.                                    Nul_Check : in Boolean := False)
  29508.                          return chars_ptr;
  29509.  
  29510.          9.
  29511.  
  29512.                         function New_Char_Array (Chars : in char_array) return chars_ptr;
  29513.  
  29514.         10.
  29515.  
  29516.                         function New_String (Str : in String) return chars_ptr;
  29517.  
  29518.         11.
  29519.  
  29520.                         procedure Free (Item : in out chars_ptr);
  29521.  
  29522.         12.
  29523.  
  29524.                         Dereference_Error : exception;
  29525.  
  29526.         13.
  29527.  
  29528.                         function Value (Item : in chars_ptr) return char_array;
  29529.  
  29530.         14.
  29531.  
  29532.                         function Value (Item : in chars_ptr; Length : in size_t)
  29533.                          return char_array;
  29534.  
  29535.         15.
  29536.  
  29537.                         function Value (Item : in chars_ptr) return String;
  29538.  
  29539.         16.
  29540.  
  29541.                         function Value (Item : in chars_ptr; Length : in size_t)
  29542.                          return String;
  29543.  
  29544.         17.
  29545.  
  29546.                         function Strlen (Item : in chars_ptr) return size_t;
  29547.  
  29548.         18.
  29549.  
  29550.                         procedure Update (Item  : in chars_ptr;
  29551.                                  Offset : in size_t;
  29552.                                  Chars  : in char_array;
  29553.                                  Check  : in Boolean := True);
  29554.  
  29555.         19.
  29556.  
  29557.                         procedure Update (Item  : in chars_ptr;
  29558.                                  Offset : in size_t;
  29559.                                  Str   : in String;
  29560.                                  Check  : in Boolean := True);
  29561.  
  29562.         20.
  29563.  
  29564.                         Update_Error : exception;
  29565.  
  29566.         21.
  29567.  
  29568.                       private
  29569.                         ┬╖┬╖┬╖ -- not specified by the language
  29570.                       end Interfaces.C.Strings;
  29571.  
  29572.   22. The type chars_ptr is C-compatible and corresponds to the use of C's 
  29573.       ``char *'' for a pointer to the first char in a char array terminated by 
  29574.       nul. When an object of type chars_ptr is declared, its value is by 
  29575.       default set to Null_Ptr, unless the object is imported, see B.1. 
  29576.  
  29577.         23.
  29578.  
  29579.             function To_Chars_Ptr (Item    : in char_array_access;
  29580.                         Nul_Check : in Boolean := False)
  29581.               return chars_ptr;
  29582.  
  29583.         a. If Item is null, then To_Chars_Ptr returns Null_Ptr. Otherwise, if 
  29584.            Nul_Check is True and Item.all does not contain nul, then the 
  29585.            function propagates Terminator_Error; if Nul_Check is True and 
  29586.            Item.all does contain nul, To_Chars_Ptr performs a pointer 
  29587.            conversion with no allocation of memory. 
  29588.  
  29589.          1.
  29590.  
  29591.             function New_Char_Array (Chars  : in char_array) return chars_ptr;
  29592.  
  29593.         a. This function returns a pointer to an allocated object initialized 
  29594.            to Chars(Chars'First ┬╖┬╖ Index) & nul, where 
  29595.  
  29596.         b. Index = Chars'Last if Chars does not contain nul, or 
  29597.  
  29598.         c. Index is the smallest size_t value I such that Chars(I+1) = nul. 
  29599.   Storage_Error is propagated if the allocation fails. 
  29600.  
  29601.          1.
  29602.  
  29603.             function New_String (Str : in String) return chars_ptr;
  29604.  
  29605.         a. This function is equivalent to New_Char_Array(To_C(Str)). 
  29606.  
  29607.          1.
  29608.  
  29609.             procedure Free (Item : in out chars_ptr);
  29610.  
  29611.         a. If Item is Null_Ptr, then Free has no effect. Otherwise, Free 
  29612.            releases the storage occupied by Value(Item), and resets Item to 
  29613.            Null_Ptr. 
  29614.  
  29615.          1.
  29616.  
  29617.             function Value (Item : in chars_ptr) return char_array;
  29618.  
  29619.         a. If Item = Null_Ptr then Value propagates Dereference_Error. 
  29620.            Otherwise Value returns the prefix of the array of chars pointed to 
  29621.            by Item, up to and including the first nul. The lower bound of the 
  29622.            result is 0. If Item does not point to a nul-terminated string, then 
  29623.            execution of Value is erroneous. 
  29624.  
  29625.          1.
  29626.  
  29627.             function Value (Item : in chars_ptr; Length : in size_t)
  29628.               return char_array;
  29629.  
  29630.         a. If Item = Null_Ptr then Value(Item) propagates Dereference_Error. 
  29631.            Otherwise Value returns the shorter of two arrays: the first Length 
  29632.            chars pointed to by Item, and Value(Item). The lower bound of the 
  29633.            result is 0. 
  29634.  
  29635.          1.
  29636.  
  29637.             function Value (Item : in chars_ptr) return String;
  29638.  
  29639.         a. Equivalent to To_Ada(Value(Item), Trim_Nul=>True). 
  29640.  
  29641.          1.
  29642.  
  29643.             function Value (Item : in chars_ptr; Length : in size_t)
  29644.               return String;
  29645.  
  29646.         a. Equivalent to To_Ada(Value(Item, Length), Trim_Nul=>True). 
  29647.  
  29648.          1.
  29649.  
  29650.             function Strlen (Item : in chars_ptr) return size_t;
  29651.  
  29652.         a. Returns Val'Length-1 where Val = Value(Item); propagates 
  29653.            Dereference_Error if Item = Null_Ptr. 
  29654.  
  29655.          1.
  29656.  
  29657.             procedure Update (Item  : in chars_ptr;
  29658.                      Offset : in size_t;
  29659.                      Chars  : in char_array;
  29660.                      Check  : Boolean := True);
  29661.  
  29662.         a. This procedure updates the value pointed to by Item, starting at 
  29663.            position Offset, using Chars as the data to be copied into the 
  29664.            array. Overwriting the nul terminator, and skipping with the Offset 
  29665.            past the nul terminator, are both prevented if Check is True, as 
  29666.            follows: 
  29667.  
  29668.              1. Let N = Strlen(Item). If Check is True, then: 
  29669.  
  29670.                   a. If Offset+Chars'Length>N, propagate Update_Error. 
  29671.  
  29672.                   b. Otherwise, overwrite the data in the array pointed to by 
  29673.                      Item, starting at the char at position Offset, with the 
  29674.                      data in Chars. 
  29675.  
  29676.              1. If Check is False, then processing is as above, but with no 
  29677.                 check that Offset+Chars'Length>N. 
  29678.  
  29679.          1.
  29680.  
  29681.             procedure Update (Item  : in chars_ptr;
  29682.                      Offset : in size_t;
  29683.                      Str   : in String;
  29684.                      Check  : in Boolean := True);
  29685.  
  29686.         a. Equivalent to Update(Item, Offset, To_C(Str), Check). 
  29687.  
  29688.   Erroneous Execution
  29689.  
  29690.    1. Execution of any of the following is erroneous if the Item parameter is 
  29691.       not null_ptr and Item does not point to a nul-terminated array of chars. 
  29692.  
  29693.         a. a Value function not taking a Length parameter, 
  29694.  
  29695.         b. the Free procedure, 
  29696.  
  29697.         c. the Strlen function. 
  29698.  
  29699.    1. Execution of Free(X) is also erroneous if the chars_ptr X was not 
  29700.       returned by New_Char_Array or New_String. 
  29701.  
  29702.    2. Reading or updating a freed char_array is erroneous. 
  29703.  
  29704.    3. Execution of Update is erroneous if Check is False and a call with Check 
  29705.       equal to True would have propagated Update_Error. 
  29706.  
  29707.       NOTES 
  29708.  
  29709.    4. (13) New_Char_Array and New_String might be implemented either through 
  29710.       the allocation function from the C environment (``malloc'') or through 
  29711.       Ada dynamic memory allocation (``new''). The key points are 
  29712.  
  29713.         a. the returned value (a chars_ptr) is represented as a C ``char *'' so 
  29714.            that it may be passed to C functions; 
  29715.  
  29716.         b. the allocated object should be freed by the programmer via a call of 
  29717.            Free, not by a called C function. 
  29718.  
  29719.  
  29720. ΓòÉΓòÉΓòÉ 18.3.2. The Generic Package Interfaces.C.Pointers ΓòÉΓòÉΓòÉ
  29721.  
  29722.    1. The generic package Interfaces.C.Pointers allows the Ada programmer to 
  29723.       perform C-style operations on pointers. It includes an access type 
  29724.       Pointer, Value functions that dereference a Pointer and deliver the 
  29725.       designated array, several pointer arithmetic operations, and ``copy'' 
  29726.       procedures that copy the contents of a source pointer into the array 
  29727.       designated by a destination pointer. As in C, it treats an object Ptr of 
  29728.       type Pointer as a pointer to the first element of an array, so that for 
  29729.       example, adding 1 to Ptr yields a pointer to the second element of the 
  29730.       array. 
  29731.  
  29732.    2. The generic allows two styles of usage: one in which the array is 
  29733.       terminated by a special terminator element; and another in which the 
  29734.       programmer needs to keep track of the length. 
  29735.  
  29736.             Static Semantics
  29737.  
  29738.    3. The generic library package Interfaces.C.Pointers has the following 
  29739.       declaration: 
  29740.  
  29741.          4.
  29742.  
  29743.                       generic
  29744.                         type Index is (<>);
  29745.                         type Element is private;
  29746.                         type Element_Array is array (Index range <>) of aliased Element;
  29747.                         Default_Terminator : Element;
  29748.                       package Interfaces.C.Pointers is
  29749.                         pragma Preelaborate(Pointers);
  29750.  
  29751.          5.
  29752.  
  29753.                         type Pointer is access all Element;
  29754.  
  29755.          6.
  29756.  
  29757.                         function Value(Ref     : in Pointer;
  29758.                                Terminator : in Element := Default_Terminator)
  29759.                          return Element_Array;
  29760.  
  29761.          7.
  29762.  
  29763.                         function Value(Ref   : in Pointer;
  29764.                                Length : in ptrdiff_t)
  29765.                          return Element_Array;
  29766.  
  29767.          8.
  29768.  
  29769.                         Pointer_Error : exception;
  29770.  
  29771.          9.
  29772.  
  29773.                         -- C-style Pointer arithmetic
  29774.  
  29775.         10.
  29776.  
  29777.                         function "+" (Left  : in Pointer;
  29778.                                Right : in ptrdiff_t) return Pointer;
  29779.                         function "+" (Left  : in ptrdiff_t;
  29780.                                Right : in Pointer)  return Pointer;
  29781.                         function "-" (Left  : in Pointer;
  29782.                                Right : in ptrdiff_t) return Pointer;
  29783.                         function "-" (Left  : in Pointer;
  29784.                                Right : in Pointer)  return ptrdiff_t;
  29785.  
  29786.         11.
  29787.  
  29788.                         procedure Increment (Ref : in out Pointer);
  29789.                         procedure Decrement (Ref : in out Pointer);
  29790.  
  29791.         12.
  29792.  
  29793.                         pragma Convention (Intrinsic, "+");
  29794.                         pragma Convention (Intrinsic, "-");
  29795.                         pragma Convention (Intrinsic, Increment);
  29796.                         pragma Convention (Intrinsic, Decrement);
  29797.  
  29798.         13.
  29799.  
  29800.                         function Virtual_Length
  29801.                          (Ref     : in Pointer;
  29802.                          Terminator : in Element := Default_Terminator)
  29803.                          return ptrdiff_t;
  29804.  
  29805.         14.
  29806.  
  29807.                         procedure Copy_Terminated_Array
  29808.                          (Source   : in Pointer;
  29809.                          Target   : in Pointer;
  29810.                          Limit    : in ptrdiff_t := ptrdiff_t'Last;
  29811.                          Terminator : in Element :=  Default_Terminator);
  29812.  
  29813.         15.
  29814.  
  29815.                         procedure Copy_Array (Source  : in Pointer;
  29816.                                    Target  : in Pointer;
  29817.                                    Length  : in ptrdiff_t);
  29818.  
  29819.         16.
  29820.  
  29821.                       end Interfaces.C.Pointers;
  29822.  
  29823.   17. The type Pointer is C-compatible and corresponds to one use of C's 
  29824.       ``Element *''. An object of type Pointer is interpreted as a pointer to 
  29825.       the initial Element in an Element_Array. Two styles are supported: 
  29826.  
  29827.         a. Explicit termination of an array value with Default_Terminator (a 
  29828.            special terminator value); 
  29829.  
  29830.         b. Programmer-managed length, with Default_Terminator treated simply as 
  29831.            a data element. 
  29832.  
  29833.          1.
  29834.  
  29835.             function Value(Ref     : in Pointer;
  29836.                     Terminator : in Element := Default_Terminator)
  29837.              return Element_Array;
  29838.  
  29839.         a. This function returns an Element_Array whose value is the array 
  29840.            pointed to by Ref, up to and including the first Terminator; the 
  29841.            lower bound of the array is Index'First. 
  29842.            Interfaces.C.Strings.Dereference_Error is propagated if Ref is null. 
  29843.  
  29844.          1.
  29845.  
  29846.             function Value(Ref   : in Pointer;
  29847.                     Length : in ptrdiff_t)
  29848.               return Element_Array;
  29849.  
  29850.         a. This function returns an Element_Array comprising the first Length 
  29851.            elements pointed to by Ref. The exception 
  29852.            Interfaces.C.Strings.Dereference_Error is propagated if Ref is null. 
  29853.  
  29854.    1. The "+" and "-" functions perform arithmetic on Pointer values, based on 
  29855.       the Size of the array elements. In each of these functions, Pointer_Error 
  29856.       is propagated if a Pointer parameter is null. 
  29857.  
  29858.          2.
  29859.  
  29860.             procedure Increment (Ref : in out Pointer);
  29861.  
  29862.         a. Equivalent to Ref := Ref+1. 
  29863.  
  29864.          1.
  29865.  
  29866.             procedure Decrement (Ref : in out Pointer);
  29867.  
  29868.         a. Equivalent to Ref := Ref-1. 
  29869.  
  29870.          1.
  29871.  
  29872.             function Virtual_Length
  29873.              (Ref     : in Pointer;
  29874.               Terminator : in Element := Default_Terminator)
  29875.               return ptrdiff_t;
  29876.  
  29877.         a. Returns the number of Elements, up to the one just before the first 
  29878.            Terminator, in Value(Ref, Terminator). 
  29879.  
  29880.          1.
  29881.  
  29882.             procedure Copy_Terminated_Array
  29883.              (Source   : in Pointer;
  29884.               Target   : in Pointer;
  29885.               Limit    : in ptrdiff_t := ptrdiff_t'Last;
  29886.               Terminator : in Element := Default_Terminator);
  29887.  
  29888.         a. This procedure copies Value(Source, Terminator) into the array 
  29889.            pointed to by Target; it stops either after Terminator has been 
  29890.            copied, or the number of elements copied is Limit, whichever occurs 
  29891.            first. Dereference_Error is propagated if either Source or Target is 
  29892.            null. 
  29893.  
  29894.          1.
  29895.  
  29896.             procedure Copy_Array (Source  : in Pointer;
  29897.                        Target  : in Pointer;
  29898.                        Length  : in ptrdiff_t);
  29899.  
  29900.         a. This procedure copies the first Length elements from the array 
  29901.            pointed to by Source, into the array pointed to by Target. 
  29902.            Dereference_Error is propagated if either Source or Target is null. 
  29903.  
  29904.   Erroneous Execution
  29905.  
  29906.    1. It is erroneous to dereference a Pointer that does not designate an 
  29907.       aliased Element. 
  29908.  
  29909.    2. Execution of Value(Ref, Terminator) is erroneous if Ref does not 
  29910.       designate an aliased Element in an Element_Array terminated by 
  29911.       Terminator. 
  29912.  
  29913.    3. Execution of Value(Ref, Length) is erroneous if Ref does not designate an 
  29914.       aliased Element in an Element_Array containing at least Length Elements 
  29915.       between the designated Element and the end of the array, inclusive. 
  29916.  
  29917.    4. Execution of Virtual_Length(Ref, Terminator) is erroneous if Ref does not 
  29918.       designate an aliased Element in an Element_Array terminated by 
  29919.       Terminator. 
  29920.  
  29921.    5. Execution of Copy_Terminated_Array(Source, Target, Limit, Terminator) is 
  29922.       erroneous in either of the following situations: 
  29923.  
  29924.         a. Execution of both Value(Source,Terminator) and Value(Source,Limit) 
  29925.            are erroneous, or 
  29926.  
  29927.         b. Copying writes past the end of the array containing the Element 
  29928.            designated by Target. 
  29929.  
  29930.    1. Execution of Copy_Array(Source, Target, Length) is erroneous if either 
  29931.       Value(Source, Length) is erroneous, or copying writes past the end of the 
  29932.       array containing the Element designated by Target. 
  29933.  
  29934.       NOTES 
  29935.  
  29936.    2. (14) To compose a Pointer from an Element_Array, use 'Access on the first 
  29937.       element. For example (assuming appropriate instantiations): 
  29938.  
  29939.          3.
  29940.  
  29941.                       Some_Array  : Element_Array(0┬╖┬╖5) ;
  29942.                       Some_Pointer : Pointer := Some_Array(0)'Access;
  29943.  
  29944.   Examples
  29945.  
  29946.    4. Example of Interfaces.C.Pointers: 
  29947.  
  29948.          5.
  29949.  
  29950.                       with Interfaces.C.Pointers;
  29951.                       with Interfaces.C.Strings;
  29952.                       procedure Test_Pointers is
  29953.                         package C renames Interfaces.C;
  29954.                         package Char_Ptrs is
  29955.                          new C.Pointers (Index        => C.size_t,
  29956.                                  Element       => C.char,
  29957.                                  Element_Array    => C.char_array,
  29958.                                  Default_Terminator => C.nul);
  29959.  
  29960.          6.
  29961.  
  29962.                         use type Char_Ptrs.Pointer;
  29963.                         subtype Char_Star is Char_Ptrs.Pointer;
  29964.  
  29965.          7.
  29966.  
  29967.                         procedure Strcpy (Target_Ptr, Source_Ptr : Char_Star) is
  29968.                          Target_Temp_Ptr : Char_Star := Target_Ptr;
  29969.                          Source_Temp_Ptr : Char_Star := Source_Ptr;
  29970.                          Element : C.char;
  29971.                         begin
  29972.                          if Target_Temp_Ptr = null or Source_Temp_Ptr = null then
  29973.                            raise C.Strings.Dereference_Error;
  29974.                          end if;
  29975.  
  29976.          8.
  29977.  
  29978.                           loop
  29979.                            Element       := Source_Temp_Ptr.all;
  29980.                            Target_Temp_Ptr.all := Element;
  29981.                            exit when Element = C.nul;
  29982.                            Char_Ptrs.Increment(Target_Temp_Ptr);
  29983.                            Char_Ptrs.Increment(Source_Temp_Ptr);
  29984.                          end loop;
  29985.                         end Strcpy;
  29986.                       begin
  29987.                         ┬╖┬╖┬╖
  29988.                       end Test_Pointers;
  29989.  
  29990.  
  29991. ΓòÉΓòÉΓòÉ 18.4. Interfacing with COBOL ΓòÉΓòÉΓòÉ
  29992.  
  29993.    1. The facilities relevant to interfacing with the COBOL language are the 
  29994.       package Interfaces.COBOL and support for the Import, Export and 
  29995.       Convention pragmas with convention_identifier COBOL. 
  29996.  
  29997.    2. The COBOL interface package supplies several sets of facilities: 
  29998.  
  29999.         a. A set of types corresponding to the native COBOL types of the 
  30000.            supported COBOL implementation (so-called ``internal COBOL 
  30001.            representations''), allowing Ada data to be passed as parameters to 
  30002.            COBOL programs 
  30003.  
  30004.         b. A set of types and constants reflecting external data 
  30005.            representations such as might be found in files or databases, 
  30006.            allowing COBOL-generated data to be read by an Ada program, and 
  30007.            Ada-generated data to be read by COBOL programs 
  30008.  
  30009.         c. A generic package for converting between an Ada decimal type value 
  30010.            and either an internal or external COBOL representation 
  30011.  
  30012.   Static Semantics
  30013.  
  30014.    1. The library package Interfaces.COBOL has the following declaration: 
  30015.  
  30016.          2.
  30017.  
  30018.                       package Interfaces.COBOL is
  30019.                         pragma Preelaborate(COBOL);
  30020.  
  30021.          3.
  30022.  
  30023.                         -- Types and operations for internal data representations
  30024.  
  30025.          4.
  30026.  
  30027.                         type Floating    is digits implementation-defined;
  30028.                         type Long_Floating is digits implementation-defined;
  30029.  
  30030.          5.
  30031.  
  30032.                         type Binary    is range implementation-defined;
  30033.                         type Long_Binary is range implementation-defined;
  30034.  
  30035.          6.
  30036.  
  30037.                         Max_Digits_Binary    : constant := implementation-defined;
  30038.                         Max_Digits_Long_Binary : constant := implementation-defined;
  30039.  
  30040.          7.
  30041.  
  30042.                         type Decimal_Element  is mod implementation-defined;
  30043.                         type Packed_Decimal is
  30044.                          array (Positive range <>) of Decimal_Element;
  30045.                         pragma Pack(Packed_Decimal);
  30046.  
  30047.          8.
  30048.  
  30049.                         type COBOL_Character is implementation-defined character type;
  30050.  
  30051.          9.
  30052.  
  30053.                         Ada_To_COBOL : array (Character) of COBOL_Character
  30054.                          := implementation-defined;
  30055.  
  30056.         10.
  30057.  
  30058.                         COBOL_To_Ada : array (COBOL_Character) of Character
  30059.                          := implementation-defined;
  30060.  
  30061.         11.
  30062.  
  30063.                         type Alphanumeric is
  30064.                          array (Positive range <>) of COBOL_Character;
  30065.                         pragma Pack(Alphanumeric);
  30066.  
  30067.         12.
  30068.  
  30069.                         function To_COBOL (Item : in String) return Alphanumeric;
  30070.                         function To_Ada  (Item : in Alphanumeric) return String;
  30071.  
  30072.         13.
  30073.  
  30074.                         procedure To_COBOL (Item    : in String;
  30075.                                   Target   : out Alphanumeric;
  30076.                                   Last    : out Natural);
  30077.  
  30078.         14.
  30079.  
  30080.                         procedure To_Ada (Item   : in Alphanumeric;
  30081.                                  Target  : out String;
  30082.                                  Last   : out Natural);
  30083.  
  30084.         15.
  30085.  
  30086.                         type Numeric is array (Positive range <>) of COBOL_Character;
  30087.                         pragma Pack(Numeric);
  30088.  
  30089.         16.
  30090.  
  30091.                         -- Formats for COBOL data representations
  30092.  
  30093.         17.
  30094.  
  30095.                         type Display_Format is private;
  30096.  
  30097.         18.
  30098.  
  30099.                         Unsigned       : constant Display_Format;
  30100.                         Leading_Separate   : constant Display_Format;
  30101.                         Trailing_Separate   : constant Display_Format;
  30102.                         Leading_Nonseparate  : constant Display_Format;
  30103.                         Trailing_Nonseparate : constant Display_Format;
  30104.  
  30105.         19.
  30106.  
  30107.                         type Binary_Format is private;
  30108.  
  30109.         20.
  30110.  
  30111.                         High_Order_First  : constant Binary_Format;
  30112.                         Low_Order_First  : constant Binary_Format;
  30113.                         Native_Binary   : constant Binary_Format;
  30114.  
  30115.         21.
  30116.  
  30117.                         type Packed_Format is private;
  30118.  
  30119.         22.
  30120.  
  30121.                         Packed_Unsigned  : constant Packed_Format;
  30122.                         Packed_Signed   : constant Packed_Format;
  30123.  
  30124.         23.
  30125.  
  30126.                         -- Types for external representation of COBOL binary data
  30127.  
  30128.         24.
  30129.  
  30130.                         type Byte is mod 2**COBOL_Character'Size;
  30131.                         type Byte_Array is array (Positive range <>) of Byte;
  30132.                         pragma Pack (Byte_Array);
  30133.  
  30134.         25.
  30135.  
  30136.                         Conversion_Error : exception;
  30137.  
  30138.         26.
  30139.  
  30140.                         generic
  30141.                          type Num is delta <> digits <>;
  30142.                         package Decimal_Conversions is
  30143.  
  30144.         27.
  30145.  
  30146.                           -- Display Formats: data values are represented as Numeric
  30147.  
  30148.         28.
  30149.  
  30150.                           function Valid (Item  : in Numeric;
  30151.                                  Format : in Display_Format) return Boolean;
  30152.  
  30153.         29.
  30154.  
  30155.                           function Length (Format : in Display_Format) return Natural;
  30156.  
  30157.         30.
  30158.  
  30159.                           function To_Decimal (Item  : in Numeric;
  30160.                                     Format : in Display_Format) return Num;
  30161.  
  30162.         31.
  30163.  
  30164.                           function To_Display (Item  : in Num;
  30165.                                     Format : in Display_Format)
  30166.                           return Numeric;
  30167.  
  30168.         32.
  30169.  
  30170.                           -- Packed Formats:
  30171.                          -- data values are represented as Packed_Decimal
  30172.  
  30173.         33.
  30174.  
  30175.                           function Valid (Item  : in Packed_Decimal;
  30176.                                  Format : in Packed_Format) return Boolean;
  30177.  
  30178.         34.
  30179.  
  30180.                           function Length (Format : in Packed_Format) return Natural;
  30181.  
  30182.         35.
  30183.  
  30184.                           function To_Decimal (Item  : in Packed_Decimal;
  30185.                                     Format : in Packed_Format) return Num;
  30186.  
  30187.         36.
  30188.  
  30189.                           function To_Packed (Item  : in Num;
  30190.                                    Format : in Packed_Format)
  30191.                           return Packed_Decimal;
  30192.  
  30193.         37.
  30194.  
  30195.                           -- Binary Formats:
  30196.                          -- external data values are represented as Byte_Array
  30197.  
  30198.         38.
  30199.  
  30200.                           function Valid (Item  : in Byte_Array;
  30201.                                  Format : in Binary_Format) return Boolean;
  30202.  
  30203.         39.
  30204.  
  30205.                           function Length (Format : in Binary_Format) return Natural;
  30206.                          function To_Decimal (Item  : in Byte_Array;
  30207.                                     Format : in Binary_Format) return Num;
  30208.  
  30209.         40.
  30210.  
  30211.                           function To_Binary (Item  : in Num;
  30212.                                   Format : in Binary_Format)
  30213.                           return Byte_Array;
  30214.  
  30215.         41.
  30216.  
  30217.                           -- Internal Binary formats:
  30218.                          -- data values are of type Binary or Long_Binary
  30219.  
  30220.         42.
  30221.  
  30222.                           function To_Decimal (Item : in Binary)    return Num;
  30223.                          function To_Decimal (Item : in Long_Binary) return Num;
  30224.  
  30225.         43.
  30226.  
  30227.                           function To_Binary    (Item : in Num)  return Binary;
  30228.                          function To_Long_Binary (Item : in Num)  return Long_Binary;
  30229.  
  30230.         44.
  30231.  
  30232.                         end Decimal_Conversions;
  30233.  
  30234.         45.
  30235.  
  30236.                       private
  30237.                         ┬╖┬╖┬╖ -- not specified by the language
  30238.                       end Interfaces.COBOL;
  30239.  
  30240.   46. Each of the types in Interfaces.COBOL is COBOL-compatible. 
  30241.  
  30242.   47. The types Floating and Long_Floating correspond to the native types in 
  30243.       COBOL for data items with computational usage implemented by floating 
  30244.       point. The types Binary and Long_Binary correspond to the native types in 
  30245.       COBOL for data items with binary usage, or with computational usage 
  30246.       implemented by binary. 
  30247.  
  30248.   48. Max_Digits_Binary is the largest number of decimal digits in a numeric 
  30249.       value that is represented as Binary. Max_Digits_Long_Binary is the 
  30250.       largest number of decimal digits in a numeric value that is represented 
  30251.       as Long_Binary. 
  30252.  
  30253.   49. The type Packed_Decimal corresponds to COBOL's packed-decimal usage. 
  30254.  
  30255.   50. The type COBOL_Character defines the run-time character set used in the 
  30256.       COBOL implementation. Ada_To_COBOL and COBOL_To_Ada are the mappings 
  30257.       between the Ada and COBOL run-time character sets. 
  30258.  
  30259.   51. Type Alphanumeric corresponds to COBOL's alphanumeric data category. 
  30260.  
  30261.   52. Each of the functions To_COBOL and To_Ada converts its parameter based on 
  30262.       the mappings Ada_To_COBOL and COBOL_To_Ada, respectively. The length of 
  30263.       the result for each is the length of the parameter, and the lower bound 
  30264.       of the result is 1. Each component of the result is obtained by applying 
  30265.       the relevant mapping to the corresponding component of the parameter. 
  30266.  
  30267.   53. Each of the procedures To_COBOL and To_Ada copies converted elements from 
  30268.       Item to Target, using the appropriate mapping (Ada_To_COBOL or 
  30269.       COBOL_To_Ada, respectively). The index in Target of the last element 
  30270.       assigned is returned in Last (0 if Item is a null array). If Item'Length 
  30271.       exceeds Target'Length, Constraint_Error is propagated. 
  30272.  
  30273.   54. Type Numeric corresponds to COBOL's numeric data category with display 
  30274.       usage. 
  30275.  
  30276.   55. The types Display_Format, Binary_Format, and Packed_Format are used in 
  30277.       conversions between Ada decimal type values and COBOL internal or 
  30278.       external data representations. The value of the constant Native_Binary is 
  30279.       either High_Order_First or Low_Order_First, depending on the 
  30280.       implementation. 
  30281.  
  30282.         56.
  30283.  
  30284.             function Valid (Item  : in Numeric;
  30285.                     Format : in Display_Format) return Boolean;
  30286.  
  30287.         a. The function Valid checks that the Item parameter has a value 
  30288.            consistent with the value of Format. If the value of Format is other 
  30289.            than Unsigned, Leading_Separate, and Trailing_Separate, the effect 
  30290.            is implementation defined. If Format does have one of these values, 
  30291.            the following rules apply: 
  30292.  
  30293.              1. Format=Unsigned: if Item comprises zero or more leading space 
  30294.                 characters followed by one or more decimal digit characters 
  30295.                 then Valid returns True, else it returns False. 
  30296.  
  30297.              2. Format=Leading_Separate: if Item comprises zero or more leading 
  30298.                 space characters, followed by a single occurrence of the plus 
  30299.                 or minus sign character, and then one or more decimal digit 
  30300.                 characters, then Valid returns True, else it returns False. 
  30301.  
  30302.              3. Format=Trailing_Separate: if Item comprises zero or more 
  30303.                 leading space characters, followed by one or more decimal digit 
  30304.                 characters and finally a plus or minus sign character, then 
  30305.                 Valid returns True, else it returns False. 
  30306.  
  30307.          1.
  30308.  
  30309.             function Length (Format : in Display_Format) return Natural;
  30310.  
  30311.         a. The Length function returns the minimal length of a Numeric value 
  30312.            sufficient to hold any value of type Num when represented as Format. 
  30313.  
  30314.          1.
  30315.  
  30316.             function To_Decimal (Item  : in Numeric;
  30317.                        Format : in Display_Format) return Num;
  30318.  
  30319.         a. Produces a value of type Num corresponding to Item as represented by 
  30320.            Format. The number of digits after the assumed radix point in Item 
  30321.            is Num'Scale. Conversion_Error is propagated if the value 
  30322.            represented by Item is outside the range of Num. 
  30323.  
  30324.          1.
  30325.  
  30326.             function To_Display (Item  : in Num;
  30327.                        Format : in Display_Format) return Numeric;
  30328.  
  30329.         a. This function returns the Numeric value for Item, represented in 
  30330.            accordance with Format. Conversion_Error is propagated if Num is 
  30331.            negative and Format is Unsigned. 
  30332.  
  30333.          1.
  30334.  
  30335.             function Valid (Item  : in Packed_Decimal;
  30336.                     Format : in Packed_Format) return Boolean;
  30337.  
  30338.         a. This function returns True if Item has a value consistent with 
  30339.            Format, and False otherwise. The rules for the formation of 
  30340.            Packed_Decimal values are implementation defined. 
  30341.  
  30342.          1.
  30343.  
  30344.             function Length (Format : in Packed_Format) return Natural;
  30345.  
  30346.         a. This function returns the minimal length of a Packed_Decimal value 
  30347.            sufficient to hold any value of type Num when represented as Format. 
  30348.  
  30349.          1.
  30350.  
  30351.             function To_Decimal (Item  : in Packed_Decimal;
  30352.                        Format : in Packed_Format) return Num;
  30353.  
  30354.         a. Produces a value of type Num corresponding to Item as represented by 
  30355.            Format. Num'Scale is the number of digits after the assumed radix 
  30356.            point in Item. Conversion_Error is propagated if the value 
  30357.            represented by Item is outside the range of Num. 
  30358.  
  30359.          1.
  30360.  
  30361.             function To_Packed (Item  : in Num;
  30362.                       Format : in Packed_Format)
  30363.              return Packed_Decimal;
  30364.  
  30365.         a. This function returns the Packed_Decimal value for Item, represented 
  30366.            in accordance with Format. Conversion_Error is propagated if Num is 
  30367.            negative and Format is Packed_Unsigned. 
  30368.  
  30369.          1.
  30370.  
  30371.             function Valid (Item  : in Byte_Array;
  30372.                     Format : in Binary_Format) return Boolean;
  30373.  
  30374.         a. This function returns True if Item has a value consistent with 
  30375.            Format, and False otherwise. 
  30376.  
  30377.          1.
  30378.  
  30379.             function Length (Format : in Binary_Format) return Natural;
  30380.  
  30381.         a. This function returns the minimal length of a Byte_Array value 
  30382.            sufficient to hold any value of type Num when represented as Format. 
  30383.  
  30384.          1.
  30385.  
  30386.             function To_Decimal (Item  : in Byte_Array;
  30387.                        Format : in Binary_Format) return Num;
  30388.  
  30389.         a. Produces a value of type Num corresponding to Item as represented by 
  30390.            Format. Num'Scale is the number of digits after the assumed radix 
  30391.            point in Item. Conversion_Error is propagated if the value 
  30392.            represented by Item is outside the range of Num. 
  30393.  
  30394.          1.
  30395.  
  30396.             function To_Binary (Item  : in Num;
  30397.                       Format : in Binary_Format) return Byte_Array;
  30398.  
  30399.         a. This function returns the Byte_Array value for Item, represented in 
  30400.            accordance with Format. 
  30401.  
  30402.          1.
  30403.  
  30404.             function To_Decimal (Item : in Binary)    return Num;
  30405.  
  30406.             function To_Decimal (Item : in Long_Binary) return Num;
  30407.  
  30408.         a. These functions convert from COBOL binary format to a corresponding 
  30409.            value of the decimal type Num. Conversion_Error is propagated if 
  30410.            Item is too large for Num. 
  30411.  
  30412.          1.
  30413.  
  30414.             function To_Binary    (Item : in Num)  return Binary;
  30415.  
  30416.             function To_Long_Binary (Item : in Num)  return Long_Binary;
  30417.  
  30418.         a. These functions convert from Ada decimal to COBOL binary format. 
  30419.            Conversion_Error is propagated if the value of Item is too large to 
  30420.            be represented in the result type. 
  30421.  
  30422.   Implementation Requirements
  30423.  
  30424.    1. An implementation shall support pragma Convention with a COBOL 
  30425.       convention_identifier for a COBOL-eligible type, see B.1. 
  30426.  
  30427.             Implementation Permissions
  30428.  
  30429.    2. An implementation may provide additional constants of the private types 
  30430.       Display_Format, Binary_Format, or Packed_Format. 
  30431.  
  30432.    3. An implementation may provide further floating point and integer types in 
  30433.       Interfaces.COBOL to match additional native COBOL types, and may also 
  30434.       supply corresponding conversion functions in the generic package 
  30435.       Decimal_Conversions. 
  30436.  
  30437.             Implementation Advice
  30438.  
  30439.    4. An Ada implementation should support the following interface 
  30440.       correspondences between Ada and COBOL. 
  30441.  
  30442.         a. An Ada access T parameter is passed as a ``BY REFERENCE'' data item 
  30443.            of the COBOL type corresponding to T. 
  30444.  
  30445.         b. An Ada in scalar parameter is passed as a ``BY CONTENT'' data item 
  30446.            of the corresponding COBOL type. 
  30447.  
  30448.         c. Any other Ada parameter is passed as a ``BY REFERENCE'' data item of 
  30449.            the COBOL type corresponding to the Ada parameter type; for scalars, 
  30450.            a local copy is used if necessary to ensure by-copy semantics. 
  30451.   NOTES 
  30452.  
  30453.    1. (15) An implementation is not required to support pragma Convention for 
  30454.       access types, nor is it required to support pragma Import, Export or 
  30455.       Convention for functions. 
  30456.  
  30457.    2. (16) If an Ada subprogram is exported to COBOL, then a call from COBOL 
  30458.       call may specify either ``BY CONTENT'' or ``BY REFERENCE''. 
  30459.  
  30460.             Examples
  30461.  
  30462.    3. Examples of Interfaces.COBOL: 
  30463.  
  30464.          4.
  30465.  
  30466.                       with Interfaces.COBOL;
  30467.                       procedure Test_Call is
  30468.  
  30469.          5.
  30470.  
  30471.                         -- Calling a foreign COBOL program
  30472.                         -- Assume that a COBOL program PROG has the following declaration
  30473.                         --  in its LINKAGE section:
  30474.                         --  01 Parameter-Area
  30475.                         --   05 NAME  PIC X(20).
  30476.                         --   05 SSN   PIC X(9).
  30477.                         --   05 SALARY PIC 99999V99 USAGE COMP.
  30478.                         -- The effect of PROG is to update SALARY based on some algorithm
  30479.  
  30480.          6.
  30481.  
  30482.                         package COBOL renames Interfaces.COBOL;
  30483.  
  30484.          7.
  30485.  
  30486.                         type Salary_Type is delta 0.01 digits 7;
  30487.  
  30488.          8.
  30489.  
  30490.                         type COBOL_Record is
  30491.                          record
  30492.                            Name  : COBOL.Numeric(1┬╖┬╖20);
  30493.                            SSN   : COBOL.Numeric(1┬╖┬╖9);
  30494.                            Salary : COBOL.Binary;  -- Assume Binary = 32 bits
  30495.                          end record;
  30496.                         pragma Convention (COBOL, COBOL_Record);
  30497.  
  30498.          9.
  30499.  
  30500.                         procedure Prog (Item : in out COBOL_Record);
  30501.                         pragma Import (COBOL, Prog, "PROG");
  30502.  
  30503.         10.
  30504.  
  30505.                         package Salary_Conversions is
  30506.                          new COBOL.Decimal_Conversions(Salary_Type);
  30507.  
  30508.         11.
  30509.  
  30510.                         Some_Salary : Salary_Type := 12_345.67;
  30511.                         Some_Record : COBOL_Record :=
  30512.                          (Name  => "Johnson, John    ",
  30513.                           SSN   => "111223333",
  30514.                           Salary => Salary_Conversions.To_Binary(Some_Salary));
  30515.  
  30516.         12.
  30517.  
  30518.                       begin
  30519.                         Prog (Some_Record);
  30520.                         ┬╖┬╖┬╖
  30521.                       end Test_Call;
  30522.  
  30523.         13.
  30524.  
  30525.                       with Interfaces.COBOL;
  30526.                       with COBOL_Sequential_IO;
  30527.                       -- Assumed to be supplied by implementation
  30528.                       procedure Test_External_Formats is
  30529.  
  30530.         14.
  30531.  
  30532.                         -- Using data created by a COBOL program
  30533.                         -- Assume that a COBOL program has created a sequential file with
  30534.                         --  the following record structure, and that we need to
  30535.                         --  process the records in an Ada program
  30536.                         --  01 EMPLOYEE-RECORD
  30537.                         --   05 NAME   PIC X(20).
  30538.                         --   05 SSN   PIC X(9).
  30539.                         --   05 SALARY  PIC 99999V99 USAGE COMP.
  30540.                         --   05 ADJUST  PIC S999V999 SIGN LEADING SEPARATE.
  30541.                         -- The COMP data is binary (32 bits), high-order byte first
  30542.  
  30543.         15.
  30544.  
  30545.                         package COBOL renames Interfaces.COBOL;
  30546.  
  30547.         16.
  30548.  
  30549.                         type Salary_Type    is delta 0.01  digits 7;
  30550.                         type Adjustments_Type is delta 0.001 digits 6;
  30551.  
  30552.         17.
  30553.  
  30554.                         type COBOL_Employee_Record_Type is  -- External representation
  30555.                          record
  30556.                            Name   : COBOL.Alphanumeric(1┬╖┬╖20);
  30557.                            SSN   : COBOL.Alphanumeric(1┬╖┬╖9);
  30558.                            Salary  : COBOL.Byte_Array(1┬╖┬╖4);
  30559.                            Adjust  : COBOL.Numeric(1┬╖┬╖7);  -- Sign and 6 digits
  30560.                          end record;
  30561.                         pragma Convention (COBOL, COBOL_Employee_Record_Type);
  30562.  
  30563.         18.
  30564.  
  30565.                         package COBOL_Employee_IO is
  30566.                          new COBOL_Sequential_IO(COBOL_Employee_Record_Type);
  30567.                         use COBOL_Employee_IO;
  30568.  
  30569.         19.
  30570.  
  30571.                         COBOL_File : File_Type;
  30572.  
  30573.         20.
  30574.  
  30575.                         type Ada_Employee_Record_Type is  -- Internal representation
  30576.                          record
  30577.                            Name   : String(1┬╖┬╖20);
  30578.                            SSN   : String(1┬╖┬╖9);
  30579.                            Salary  : Salary_Type;
  30580.                            Adjust  : Adjustments_Type;
  30581.                          end record;
  30582.  
  30583.         21.
  30584.  
  30585.                         COBOL_Record : COBOL_Employee_Record_Type;
  30586.                         Ada_Record  : Ada_Employee_Record_Type;
  30587.  
  30588.         22.
  30589.  
  30590.                         package Salary_Conversions is
  30591.                          new COBOL.Decimal_Conversions(Salary_Type);
  30592.                         use Salary_Conversions;
  30593.  
  30594.         23.
  30595.  
  30596.                         package Adjustments_Conversions is
  30597.                          new COBOL.Decimal_Conversions(Adjustments_Type);
  30598.                         use Adjustments_Conversions;
  30599.  
  30600.         24.
  30601.  
  30602.                       begin
  30603.                         Open (COBOL_File, Name => "Some_File");
  30604.  
  30605.         25.
  30606.  
  30607.                         loop
  30608.                          Read (COBOL_File, COBOL_Record);
  30609.  
  30610.         26.
  30611.  
  30612.                          Ada_Record.Name := To_Ada(COBOL_Record.Name);
  30613.                          Ada_Record.SSN  := To_Ada(COBOL_Record.SSN);
  30614.                          Ada_Record.Salary :=
  30615.                           To_Decimal(COBOL_Record.Salary, COBOL.High_Order_First);
  30616.                          Ada_Record.Adjust :=
  30617.                           To_Decimal(COBOL_Record.Adjust, COBOL.Leading_Separate);
  30618.                          ┬╖┬╖┬╖ -- Process Ada_Record
  30619.                         end loop;
  30620.                       exception
  30621.                         when End_Error => ┬╖┬╖┬╖
  30622.                       end Test_External_Formats;
  30623.  
  30624.  
  30625. ΓòÉΓòÉΓòÉ 18.5. Interfacing with Fortran ΓòÉΓòÉΓòÉ
  30626.  
  30627.    1. The facilities relevant to interfacing with the Fortran language are the 
  30628.       package Interfaces.Fortran and support for the Import, Export and 
  30629.       Convention pragmas with convention_identifier Fortran. 
  30630.  
  30631.    2. The package Interfaces.Fortran defines Ada types whose representations 
  30632.       are identical to the default representations of the Fortran intrinsic 
  30633.       types Integer, Real, Double Precision, Complex, Logical, and Character in 
  30634.       a supported Fortran implementation. These Ada types can therefore be used 
  30635.       to pass objects between Ada and Fortran programs. 
  30636.  
  30637.             Static Semantics
  30638.  
  30639.    3. The library package Interfaces.Fortran has the following declaration: 
  30640.  
  30641.          4.
  30642.  
  30643.                       with Ada.Numerics.Generic_Complex_Types;  --  see G.1.1.
  30644.                       pragma Elaborate_All(Ada.Numerics.Generic_Complex_Types);
  30645.                       package Interfaces.Fortran is
  30646.                         pragma Pure(Fortran);
  30647.  
  30648.          5.
  30649.  
  30650.                         type Fortran_Integer is range implementation-defined;
  30651.  
  30652.          6.
  30653.  
  30654.                         type Real       is digits implementation-defined;
  30655.                         type Double_Precision is digits implementation-defined;
  30656.  
  30657.          7.
  30658.  
  30659.                         type Logical is new Boolean;
  30660.  
  30661.          8.
  30662.  
  30663.                         package Single_Precision_Complex_Types is
  30664.                          new Ada.Numerics.Generic_Complex_Types (Real);
  30665.  
  30666.          9.
  30667.  
  30668.                         type Complex is new Single_Precision_Complex_Types.Complex;
  30669.  
  30670.         10.
  30671.  
  30672.                         subtype Imaginary is Single_Precision_Complex_Types.Imaginary;
  30673.                         i : Imaginary renames Single_Precision_Complex_Types.i;
  30674.                         j : Imaginary renames Single_Precision_Complex_Types.j;
  30675.  
  30676.         11.
  30677.  
  30678.                         type Character_Set is implementation-defined character type;
  30679.  
  30680.         12.
  30681.  
  30682.                         type Fortran_Character is
  30683.                          array (Positive range <>) of Character_Set;
  30684.                         pragma Pack (Fortran_Character);
  30685.  
  30686.         13.
  30687.  
  30688.                         function To_Fortran (Item : in Character) return Character_Set;
  30689.                         function To_Ada (Item : in Character_Set) return Character;
  30690.  
  30691.         14.
  30692.  
  30693.                         function To_Fortran (Item : in String) return Fortran_Character;
  30694.                         function To_Ada   (Item : in Fortran_Character) return String;
  30695.  
  30696.         15.
  30697.  
  30698.                         procedure To_Fortran (Item    : in String;
  30699.                                    Target   : out Fortran_Character;
  30700.                                    Last    : out Natural);
  30701.  
  30702.         16.
  30703.  
  30704.                         procedure To_Ada (Item   : in Fortran_Character;
  30705.                                  Target  : out String;
  30706.                                  Last   : out Natural);
  30707.  
  30708.         17.
  30709.  
  30710.                       end Interfaces.Fortran;
  30711.  
  30712.   18. The types Fortran_Integer, Real, Double_Precision, Logical, Complex, and 
  30713.       Fortran_Character are Fortran-compatible. 
  30714.  
  30715.   19. The To_Fortran and To_Ada functions map between the Ada type Character 
  30716.       and the Fortran type Character_Set, and also between the Ada type String 
  30717.       and the Fortran type Fortran_Character. The To_Fortran and To_Ada 
  30718.       procedures have analogous effects to the string conversion subprograms 
  30719.       found in Interfaces.COBOL. 
  30720.  
  30721.             Implementation Requirements
  30722.  
  30723.   20. An implementation shall support pragma Convention with a Fortran 
  30724.       convention_identifier for a Fortran-eligible type, see B.1. 
  30725.  
  30726.             Implementation Permissions
  30727.  
  30728.   21. An implementation may add additional declarations to the Fortran 
  30729.       interface packages. For example, the Fortran interface package for an 
  30730.       implementation of Fortran 77 (ANSI X3.9-1978) that defines types like 
  30731.       Integer*n, Real*n, Logical*n, and Complex*n may contain the declarations 
  30732.       of types named Integer_Star_n, Real_Star_n, Logical_Star_n, and 
  30733.       Complex_Star_n. (This convention should not apply to Character*n, for 
  30734.       which the Ada analog is the constrained array subtype Fortran_Character 
  30735.       (1┬╖┬╖n).) Similarly, the Fortran interface package for an implementation 
  30736.       of Fortran 90 that provides multiple kinds of intrinsic types, e.g. 
  30737.       Integer (Kind=n), Real (Kind=n), Logical (Kind=n), Complex (Kind=n), and 
  30738.       Character (Kind=n), may contain the declarations of types with the 
  30739.       recommended names Integer_Kind_n, Real_Kind_n, Logical_Kind_n, 
  30740.       Complex_Kind_n, and Character_Kind_n. 
  30741.  
  30742.             Implementation Advice
  30743.  
  30744.   22. An Ada implementation should support the following interface 
  30745.       correspondences between Ada and Fortran: 
  30746.  
  30747.         a. An Ada procedure corresponds to a Fortran subroutine. 
  30748.  
  30749.         b. An Ada function corresponds to a Fortran function. 
  30750.  
  30751.         c. An Ada parameter of an elementary, array, or record type T is passed 
  30752.            as a T(F) argument to a Fortran procedure, where T(F) is the Fortran 
  30753.            type corresponding to the Ada type T, and where the INTENT attribute 
  30754.            of the corresponding dummy argument matches the Ada formal parameter 
  30755.            mode; the Fortran implementation's parameter passing conventions are 
  30756.            used. For elementary types, a local copy is used if necessary to 
  30757.            ensure by-copy semantics. 
  30758.  
  30759.         d. An Ada parameter of an access-to-subprogram type is passed as a 
  30760.            reference to a Fortran procedure whose interface corresponds to the 
  30761.            designated subprogram's specification. 
  30762.   NOTES 
  30763.  
  30764.    1. (17) An object of a Fortran-compatible record type, declared in a library 
  30765.       package or subprogram, can correspond to a Fortran common block; the type 
  30766.       also corresponds to a Fortran ``derived type''. 
  30767.  
  30768.             Examples
  30769.  
  30770.    2. Example of Interfaces.Fortran: 
  30771.  
  30772.          3.
  30773.  
  30774.                       with Interfaces.Fortran;
  30775.                       use Interfaces.Fortran;
  30776.                       procedure Ada_Application is
  30777.  
  30778.          4.
  30779.  
  30780.                         type Fortran_Matrix is array
  30781.                          (Integer range <>,
  30782.                          Integer range <>) of Double_Precision;
  30783.                         pragma Convention (Fortran, Fortran_Matrix);
  30784.                         -- stored in Fortran's column-major order
  30785.                         procedure Invert
  30786.                          (Rank : in Fortran_Integer;
  30787.                          X   : in out Fortran_Matrix);
  30788.                         pragma Import (Fortran, Invert);
  30789.                         -- a Fortran subroutine
  30790.  
  30791.          5.
  30792.  
  30793.                         Rank    : constant Fortran_Integer := 100;
  30794.                         My_Matrix : Fortran_Matrix (1 ┬╖┬╖ Rank, 1 ┬╖┬╖ Rank);
  30795.  
  30796.          6.
  30797.  
  30798.                       begin
  30799.  
  30800.          7.
  30801.  
  30802.                         ┬╖┬╖┬╖
  30803.                         My_Matrix := ┬╖┬╖┬╖;
  30804.                         ┬╖┬╖┬╖
  30805.                         Invert (Rank, My_Matrix);
  30806.                         ┬╖┬╖┬╖
  30807.  
  30808.          8.
  30809.  
  30810.                       end Ada_Application;
  30811.  
  30812.  
  30813. ΓòÉΓòÉΓòÉ 19. Systems Programming (normative) ΓòÉΓòÉΓòÉ
  30814.  
  30815.    1. The Systems Programming Annex specifies additional capabilities provided 
  30816.       for low-level programming. These capabilities are also required in many 
  30817.       real-time, embedded, distributed, and information systems. 
  30818.  
  30819.  C.1                           Access to Machine Operations 
  30820.  C.2                           Required Representation Support 
  30821.  C.3                           Interrupt Support 
  30822.  C.4                           Preelaboration Requirements 
  30823.  C.5                           Pragma Discard_Names 
  30824.  C.6                           Shared Variable Control 
  30825.  C.7                           Task Identification and Attributes --- The 
  30826.                                Detailed Node Listing --- 
  30827.  C.1                           Access to Machine Operations 
  30828.  C.2                           Required Representation Support 
  30829.  C.3                           Interrupt Support 
  30830.  C.3.1                         Protected Procedure Handlers 
  30831.  C.3.2                         The Package Interrupts 
  30832.  C.4                           Preelaboration Requirements 
  30833.  C.5                           Pragma Discard_Names 
  30834.  C.6                           Shared Variable Control 
  30835.  C.7                           Task Identification and Attributes 
  30836.  C.7.1                         The Package Task_Identification 
  30837.  C.7.2                         The Package Task_Attributes 
  30838.  
  30839.  
  30840. ΓòÉΓòÉΓòÉ 19.1. Access to Machine Operations ΓòÉΓòÉΓòÉ
  30841.  
  30842.    1. This clause specifies rules regarding access to machine instructions from 
  30843.       within an Ada program. 
  30844.  
  30845.             Implementation Requirements
  30846.  
  30847.    2. The implementation shall support machine code insertions, see 13.8, or 
  30848.       intrinsic subprograms, see 6.3.1, (or both). Implementation-defined 
  30849.       attributes shall be provided to allow the use of Ada entities as 
  30850.       operands. 
  30851.  
  30852.             Implementation Advice
  30853.  
  30854.    3. The machine code or intrinsics support should allow access to all 
  30855.       operations normally available to assembly language programmers for the 
  30856.       target environment, including privileged instructions, if any. 
  30857.  
  30858.    4. The interfacing pragmas (see B) should support interface to assembler; 
  30859.       the default assembler should be associated with the convention identifier 
  30860.       Assembler. 
  30861.  
  30862.    5. If an entity is exported to assembly language, then the implementation 
  30863.       should allocate it at an addressable location, and should ensure that it 
  30864.       is retained by the linking process, even if not otherwise referenced from 
  30865.       the Ada code. The implementation should assume that any call to a machine 
  30866.       code or assembler subprogram is allowed to read or update every object 
  30867.       that is specified as exported. 
  30868.  
  30869.             Documentation Requirements
  30870.  
  30871.    6. The implementation shall document the overhead associated with calling 
  30872.       machine-code or intrinsic subprograms, as compared to a fully-inlined 
  30873.       call, and to a regular out-of-line call. 
  30874.  
  30875.    7. The implementation shall document the types of the package 
  30876.       System.Machine_Code usable for machine code insertions, and the 
  30877.       attributes to be used in machine code insertions for references to Ada 
  30878.       entities. 
  30879.  
  30880.    8. The implementation shall document the subprogram calling conventions 
  30881.       associated with the convention identifiers available for use with the 
  30882.       interfacing pragmas (Ada and Assembler, at a minimum), including register 
  30883.       saving, exception propagation, parameter passing, and function value 
  30884.       returning. 
  30885.  
  30886.    9. For exported and imported subprograms, the implementation shall document 
  30887.       the mapping between the Link_Name string, if specified, or the Ada 
  30888.       designator, if not, and the external link name used for such a 
  30889.       subprogram. 
  30890.  
  30891.             Implementation Advice
  30892.  
  30893.   10. The implementation should ensure that little or no overhead is associated 
  30894.       with calling intrinsic and machine-code subprograms. 
  30895.  
  30896.   11. It is recommended that intrinsic subprograms be provided for convenient 
  30897.       access to any machine operations that provide special capabilities or 
  30898.       efficiency and that are not otherwise available through the language 
  30899.       constructs. Examples of such instructions include: 
  30900.  
  30901.         a. Atomic read-modify-write operations -- e.g., test and set, compare 
  30902.            and swap, decrement and test, enqueue/dequeue. 
  30903.  
  30904.         b. Standard numeric functions -- e.g., sin, log. 
  30905.  
  30906.         c. String manipulation operations -- e.g., translate and test. 
  30907.  
  30908.         d. Vector operations -- e.g., compare vector against thresholds. 
  30909.  
  30910.         e. Direct operations on I/O ports. 
  30911.  
  30912.  
  30913. ΓòÉΓòÉΓòÉ 19.2. Required Representation Support ΓòÉΓòÉΓòÉ
  30914.  
  30915.    1. This clause specifies minimal requirements on the implementation's 
  30916.       support for representation items and related features. 
  30917.  
  30918.             Implementation Requirements
  30919.  
  30920.    2. The implementation shall support at least the functionality defined by 
  30921.       the recommended levels of support in 13. 
  30922.  
  30923.  
  30924. ΓòÉΓòÉΓòÉ 19.3. Interrupt Support ΓòÉΓòÉΓòÉ
  30925.  
  30926.    1. This clause specifies the language-defined model for hardware interrupts 
  30927.       in addition to mechanisms for handling interrupts. 
  30928.  
  30929.             Dynamic Semantics
  30930.  
  30931.    2. An interrupt represents a class of events that are detected by the 
  30932.       hardware or the system software. Interrupts are said to occur. An 
  30933.       occurrence of an interrupt is separable into generation and delivery. 
  30934.       Generation of an interrupt is the event in the underlying hardware or 
  30935.       system that makes the interrupt available to the program. Delivery is the 
  30936.       action that invokes part of the program as response to the interrupt 
  30937.       occurrence. Between generation and delivery, the interrupt occurrence (or 
  30938.       interrupt) is pending. Some or all interrupts may be blocked. When an 
  30939.       interrupt is blocked, all occurrences of that interrupt are prevented 
  30940.       from being delivered. Certain interrupts are reserved. The set of 
  30941.       reserved interrupts is implementation defined. A reserved interrupt is 
  30942.       either an interrupt for which user-defined handlers are not supported, or 
  30943.       one which already has an attached handler by some other 
  30944.       implementation-defined means. Program units can be connected to 
  30945.       non-reserved interrupts. While connected, the program unit is said to be 
  30946.       attached to that interrupt. The execution of that program unit, the 
  30947.       interrupt handler, is invoked upon delivery of the interrupt occurrence. 
  30948.  
  30949.    3. While a handler is attached to an interrupt, it is called once for each 
  30950.       delivered occurrence of that interrupt. While the handler executes, the 
  30951.       corresponding interrupt is blocked. 
  30952.  
  30953.    4. While an interrupt is blocked, all occurrences of that interrupt are 
  30954.       prevented from being delivered. Whether such occurrences remain pending 
  30955.       or are lost is implementation defined. 
  30956.  
  30957.    5. Each interrupt has a default treatment which determines the system's 
  30958.       response to an occurrence of that interrupt when no user-defined handler 
  30959.       is attached. The set of possible default treatments is implementation 
  30960.       defined, as is the method (if one exists) for configuring the default 
  30961.       treatments for interrupts. 
  30962.  
  30963.    6. An interrupt is delivered to the handler (or default treatment) that is 
  30964.       in effect for that interrupt at the time of delivery. 
  30965.  
  30966.    7. An exception propagated from a handler that is invoked by an interrupt 
  30967.       has no effect. 
  30968.  
  30969.    8. If the Ceiling_Locking policy, see D.3, is in effect, the interrupt 
  30970.       handler executes with the active priority that is the ceiling priority of 
  30971.       the corresponding protected object. 
  30972.  
  30973.             Implementation Requirements
  30974.  
  30975.    9. The implementation shall provide a mechanism to determine the minimum 
  30976.       stack space that is needed for each interrupt handler and to reserve that 
  30977.       space for the execution of the handler. This space should accommodate 
  30978.       nested invocations of the handler where the system permits this. 
  30979.  
  30980.   10. If the hardware or the underlying system holds pending interrupt 
  30981.       occurrences, the implementation shall provide for later delivery of these 
  30982.       occurrences to the program. 
  30983.  
  30984.   11. If the Ceiling_Locking policy is not in effect, the implementation shall 
  30985.       provide means for the application to specify whether interrupts are to be 
  30986.       blocked during protected actions. 
  30987.  
  30988.             Documentation Requirements
  30989.  
  30990.   12. The implementation shall document the following items: 
  30991.  
  30992.         a. For each interrupt, which interrupts are blocked from delivery when 
  30993.            a handler attached to that interrupt executes (either as a result of 
  30994.            an interrupt delivery or of an ordinary call on a procedure of the 
  30995.            corresponding protected object). 
  30996.  
  30997.         b. Any interrupts that cannot be blocked, and the effect of attaching 
  30998.            handlers to such interrupts, if this is permitted. 
  30999.  
  31000.         c. Which run-time stack an interrupt handler uses when it executes as a 
  31001.            result of an interrupt delivery; if this is configurable, what is 
  31002.            the mechanism to do so; how to specify how much space to reserve on 
  31003.            that stack. 
  31004.  
  31005.         d. Any implementation- or hardware-specific activity that happens 
  31006.            before a user-defined interrupt handler gets control (e.g., reading 
  31007.            device registers, acknowledging devices). 
  31008.  
  31009.         e. Any timing or other limitations imposed on the execution of 
  31010.            interrupt handlers. 
  31011.  
  31012.         f. The state (blocked/unblocked) of the non-reserved interrupts when 
  31013.            the program starts; if some interrupts are unblocked, what is the 
  31014.            mechanism a program can use to protect itself before it can attach 
  31015.            the corresponding handlers. 
  31016.  
  31017.         g. Whether the interrupted task is allowed to resume execution before 
  31018.            the interrupt handler returns. 
  31019.  
  31020.         h. The treatment of interrupt occurrences that are generated while the 
  31021.            interrupt is blocked; i.e., whether one or more occurrences are held 
  31022.            for later delivery, or all are lost. 
  31023.  
  31024.         i. Whether predefined or implementation-defined exceptions are raised 
  31025.            as a result of the occurrence of any interrupt, and the mapping 
  31026.            between the machine interrupts (or traps) and the predefined 
  31027.            exceptions. 
  31028.  
  31029.         j. On a multi-processor, the rules governing the delivery of an 
  31030.            interrupt to a particular processor. 
  31031.  
  31032.   Implementation Permissions
  31033.  
  31034.    1. If the underlying system or hardware does not allow interrupts to be 
  31035.       blocked, then no blocking is required as part of the execution of 
  31036.       subprograms of a protected object whose one of its subprograms is an 
  31037.       interrupt handler. 
  31038.  
  31039.    2. In a multi-processor with more than one interrupt subsystem, it is 
  31040.       implementation defined whether (and how) interrupt sources from separate 
  31041.       subsystems share the same Interrupt_ID type, see C.3.2. In particular, 
  31042.       the meaning of a blocked or pending interrupt may then be applicable to 
  31043.       one processor only. 
  31044.  
  31045.    3. Implementations are allowed to impose timing or other limitations on the 
  31046.       execution of interrupt handlers. 
  31047.  
  31048.    4. Other forms of handlers are allowed to be supported, in which case, the 
  31049.       rules of this subclause should be adhered to. 
  31050.  
  31051.    5. The active priority of the execution of an interrupt handler is allowed 
  31052.       to vary from one occurrence of the same interrupt to another. 
  31053.  
  31054.             Implementation Advice
  31055.  
  31056.    6. If the Ceiling_Locking policy is not in effect, the implementation should 
  31057.       provide means for the application to specify which interrupts are to be 
  31058.       blocked during protected actions, if the underlying system allows for a 
  31059.       finer-grain control of interrupt blocking. 
  31060.  
  31061.       NOTES 
  31062.  
  31063.    7. (1) The default treatment for an interrupt can be to keep the interrupt 
  31064.       pending or to deliver it to an implementation-defined handler. Examples 
  31065.       of actions that an implementation-defined handler is allowed to perform 
  31066.       include aborting the partition, ignoring (i.e., discarding occurrences 
  31067.       of) the interrupt, or queuing one or more occurrences of the interrupt 
  31068.       for possible later delivery when a user-defined handler is attached to 
  31069.       that interrupt. 
  31070.  
  31071.    8. (2) It is a bounded error to call Task_Identification.Current_Task (see 
  31072.       C.7.1) from an interrupt handler. 
  31073.  
  31074.    9. (3) The rule that an exception propagated from an interrupt handler has 
  31075.       no effect is modeled after the rule about exceptions propagated out of 
  31076.       task bodies. 
  31077.  
  31078.  C.3.1                         Protected Procedure Handlers 
  31079.  C.3.2                         The Package Interrupts 
  31080.  
  31081.  
  31082. ΓòÉΓòÉΓòÉ 19.3.1. Protected Procedure Handlers ΓòÉΓòÉΓòÉ
  31083.  
  31084.  
  31085.   Syntax
  31086.  
  31087.    1. The form of a pragma Interrupt_Handler is as follows: 
  31088.  
  31089.          2.
  31090.  
  31091.                       pragma Interrupt_Handler(handler_name);
  31092.  
  31093.    3. The form of a pragma Attach_Handler is as follows: 
  31094.  
  31095.          4.
  31096.  
  31097.                       pragma Attach_Handler(handler_name, expression);
  31098.  
  31099.   Name Resolution Rules
  31100.  
  31101.    5. For the Interrupt_Handler and Attach_Handler pragmas, the handler_name 
  31102.       shall resolve to denote a protected procedure with a parameterless 
  31103.       profile. 
  31104.  
  31105.    6. For the Attach_Handler pragma, the expected type for the expression is 
  31106.       Interrupts.Interrupt_ID, see C.3.2. 
  31107.  
  31108.             Legality Rules
  31109.  
  31110.    7. The Attach_Handler pragma is only allowed immediately within the 
  31111.       protected_definition where the corresponding subprogram is declared. The 
  31112.       corresponding protected_type_declaration or single_protected_declaration 
  31113.       shall be a library level declaration. 
  31114.  
  31115.    8. The Interrupt_Handler pragma is only allowed immediately within a 
  31116.       protected_definition. The corresponding protected_type_declaration shall 
  31117.       be a library level declaration. In addition, any object_declaration of 
  31118.       such a type shall be a library level declaration. 
  31119.  
  31120.             Dynamic Semantics
  31121.  
  31122.    9. If the pragma Interrupt_Handler appears in a protected_definition, then 
  31123.       the corresponding procedure can be attached dynamically, as a handler, to 
  31124.       interrupts, see C.3.2. Such procedures are allowed to be attached to 
  31125.       multiple interrupts. 
  31126.  
  31127.   10. The expression in the Attach_Handler pragma as evaluated at object 
  31128.       creation time specifies an interrupt. As part of the initialization of 
  31129.       that object, if the Attach_Handler pragma is specified, the handler 
  31130.       procedure is attached to the specified interrupt. A check is made that 
  31131.       the corresponding interrupt is not reserved. Program_Error is raised if 
  31132.       the check fails, and the existing treatment for the interrupt is not 
  31133.       affected. 
  31134.  
  31135.   11. If the Ceiling_Locking policy, see D.3 is in effect then upon the 
  31136.       initialization of a protected object that either an Attach_Handler or 
  31137.       Interrupt_Handler pragma applies to one of its procedures, a check is 
  31138.       made that the ceiling priority defined in the protected_definition is in 
  31139.       the range of System.Interrupt_Priority. If the check fails, Program_Error 
  31140.       is raised. 
  31141.  
  31142.   12. When a protected object is finalized, for any of its procedures that are 
  31143.       attached to interrupts, the handler is detached. If the handler was 
  31144.       attached by a procedure in the Interrupts package or if no user handler 
  31145.       was previously attached to the interrupt, the default treatment is 
  31146.       restored. Otherwise, that is, if an Attach_Handler pragma was used, the 
  31147.       previous handler is restored. 
  31148.  
  31149.   13. When a handler is attached to an interrupt, the interrupt is blocked 
  31150.       (subject to the Implementation Permission in C.3, during the execution of 
  31151.       every protected action on the protected object containing the handler. 
  31152.  
  31153.             Erroneous Execution
  31154.  
  31155.   14. If the Ceiling_Locking policy, see D.3, is in effect and an interrupt is 
  31156.       delivered to a handler, and the interrupt hardware priority is higher 
  31157.       than the ceiling priority of the corresponding protected object, the 
  31158.       execution of the program is erroneous. 
  31159.  
  31160.             Metrics
  31161.  
  31162.   15. The following metric shall be documented by the implementation: 
  31163.  
  31164.         a. The worst case overhead for an interrupt handler that is a 
  31165.            parameterless protected procedure, in clock cycles. This is the 
  31166.            execution time not directly attributable to the handler procedure or 
  31167.            the interrupted execution. It is estimated as C - (A+B), where A is 
  31168.            how long it takes to complete a given sequence of instructions 
  31169.            without any interrupt, B is how long it takes to complete a normal 
  31170.            call to a given protected procedure, and C is how long it takes to 
  31171.            complete the same sequence of instructions when it is interrupted by 
  31172.            one execution of the same procedure called via an interrupt. 
  31173.  
  31174.   Implementation Permissions
  31175.  
  31176.    1. When the pragmas Attach_Handler or Interrupt_Handler apply to a protected 
  31177.       procedure, the implementation is allowed to impose implementation-defined 
  31178.       restrictions on the corresponding protected_type_declaration and 
  31179.       protected_body. 
  31180.  
  31181.    2. An implementation may use a different mechanism for invoking a protected 
  31182.       procedure in response to a hardware interrupt than is used for a call to 
  31183.       that protected procedure from a task. 
  31184.  
  31185.    3. Notwithstanding what this subclause says elsewhere, the Attach_Handler 
  31186.       and Interrupt_Handler pragmas are allowed to be used for other, 
  31187.       implementation defined, forms of interrupt handlers. 
  31188.  
  31189.             Implementation Advice
  31190.  
  31191.    4. Whenever possible, the implementation should allow interrupt handlers to 
  31192.       be called directly by the hardware. 
  31193.  
  31194.    5. Whenever practical, the implementation should detect violations of any 
  31195.       implementation-defined restrictions before run time. 
  31196.  
  31197.       NOTES 
  31198.  
  31199.    6. (4) The Attach_Handler pragma can provide static attachment of handlers 
  31200.       to interrupts if the implementation supports preelaboration of protected 
  31201.       objects (see C.4). 
  31202.  
  31203.    7. (5) The ceiling priority of a protected object that one of its procedures 
  31204.       is attached to an interrupt should be at least as high as the highest 
  31205.       processor priority at which that interrupt will ever be delivered. 
  31206.  
  31207.    8. (6) Protected procedures can also be attached dynamically to interrupts 
  31208.       via operations declared in the predefined package Interrupts. 
  31209.  
  31210.    9. (7) An example of a possible implementation-defined restriction is 
  31211.       disallowing the use of the standard storage pools within the body of a 
  31212.       protected procedure that is an interrupt handler. 
  31213.  
  31214.  
  31215. ΓòÉΓòÉΓòÉ 19.3.2. The Package Interrupts ΓòÉΓòÉΓòÉ
  31216.  
  31217.  
  31218.   Static Semantics
  31219.  
  31220.    1. The following language-defined packages exist: 
  31221.  
  31222.          2.
  31223.  
  31224.                       with System;
  31225.                       package Ada.Interrupts is
  31226.                         type Interrupt_ID is implementation-defined;
  31227.                         type Parameterless_Handler is
  31228.                          access protected procedure;
  31229.  
  31230.          1.
  31231.  
  31232.                         function Is_Reserved (Interrupt : Interrupt_ID)
  31233.                          return Boolean;
  31234.  
  31235.          2.
  31236.  
  31237.                         function Is_Attached (Interrupt : Interrupt_ID)
  31238.                          return Boolean;
  31239.  
  31240.          3.
  31241.  
  31242.                         function Current_Handler (Interrupt : Interrupt_ID)
  31243.                          return Parameterless_Handler;
  31244.  
  31245.          4.
  31246.  
  31247.                         procedure Attach_Handler
  31248.                          (New_Handler : in Parameterless_Handler;
  31249.                           Interrupt  : in Interrupt_ID);
  31250.  
  31251.          5.
  31252.  
  31253.                         procedure Exchange_Handler
  31254.                          (Old_Handler : out Parameterless_Handler;
  31255.                           New_Handler : in Parameterless_Handler;
  31256.                           Interrupt  : in Interrupt_ID);
  31257.  
  31258.          6.
  31259.  
  31260.                         procedure Detach_Handler
  31261.                          (Interrupt : in Interrupt_ID);
  31262.  
  31263.          7.
  31264.  
  31265.                         function Reference(Interrupt : Interrupt_ID)
  31266.                          return System.Address;
  31267.  
  31268.          8.
  31269.  
  31270.                       private
  31271.                         ┬╖┬╖┬╖ -- not specified by the language
  31272.                       end Ada.Interrupts;
  31273.  
  31274.          9.
  31275.  
  31276.                       package Ada.Interrupts.Names is
  31277.                         implementation-defined : constant Interrupt_ID :=
  31278.                          implementation-defined;
  31279.                          . . .
  31280.                         implementation-defined : constant Interrupt_ID :=
  31281.                          implementation-defined;
  31282.                       end Ada.Interrupts.Names;
  31283.  
  31284.   Dynamic Semantics
  31285.  
  31286.   10. The Interrupt_ID type is an implementation-defined discrete type used to 
  31287.       identify interrupts. 
  31288.  
  31289.   11. The Is_Reserved function returns True if and only if the specified 
  31290.       interrupt is reserved. 
  31291.  
  31292.   12. The Is_Attached function returns True if and only if a user-specified 
  31293.       interrupt handler is attached to the interrupt. 
  31294.  
  31295.   13. The Current_Handler function returns a value that represents the attached 
  31296.       handler of the interrupt. If no user-defined handler is attached to the 
  31297.       interrupt, Current_Handler returns a value that designates the default 
  31298.       treatment; calling Attach_Handler or Exchange_Handler with this value 
  31299.       restores the default treatment. 
  31300.  
  31301.   14. The Attach_Handler procedure attaches the specified handler to the 
  31302.       interrupt, overriding any existing treatment (including a user handler) 
  31303.       in effect for that interrupt. If New_Handler is null, the default 
  31304.       treatment is restored. If New_Handler designates a protected procedure to 
  31305.       which the pragma Interrupt_Handler does not apply, Program_Error is 
  31306.       raised. In this case, the operation does not modify the existing 
  31307.       interrupt treatment. 
  31308.  
  31309.   15. The Exchange_Handler procedure operates in the same manner as 
  31310.       Attach_Handler with the addition that the value returned in Old_Handler 
  31311.       designates the previous treatment for the specified interrupt. 
  31312.  
  31313.   16. The Detach_Handler procedure restores the default treatment for the 
  31314.       specified interrupt. 
  31315.  
  31316.   17. For all operations defined in this package that take a parameter of type 
  31317.       Interrupt_ID, with the exception of Is_Reserved and Reference, a check is 
  31318.       made that the specified interrupt is not reserved. Program_Error is 
  31319.       raised if this check fails. 
  31320.  
  31321.   18. If, by using the Attach_Handler, Detach_Handler, or Exchange_Handler 
  31322.       procedures, an attempt is made to detach a handler that was attached 
  31323.       statically (using the pragma Attach_Handler), the handler is not detached 
  31324.       and Program_Error is raised. 
  31325.  
  31326.   19. The Reference function returns a value of type System.Address that can be 
  31327.       used to attach a task entry, via an address clause, see J.7.1, to 
  31328.       theinterrupt specified by Interrupt. This function raises Program_Error 
  31329.       if attaching task entries to interrupts (or to this particular interrupt) 
  31330.       is not supported. 
  31331.  
  31332.             Implementation Requirements
  31333.  
  31334.   20. At no time during attachment or exchange of handlers shall the current 
  31335.       handler of the corresponding interrupt be undefined. 
  31336.  
  31337.             Documentation Requirements
  31338.  
  31339.   21. If the Ceiling_Locking policy, see D.3, is in effect the implementation 
  31340.       shall document the default ceiling priority assigned to a protected 
  31341.       object that contains either the Attach_Handler or Interrupt_Handler 
  31342.       pragmas, but not the Interrupt_Priority pragma. This default need not be 
  31343.       the same for all interrupts. 
  31344.  
  31345.             Implementation Advice
  31346.  
  31347.   22. If implementation-defined forms of interrupt handler procedures are 
  31348.       supported, such as protected procedures with parameters, then for each 
  31349.       such form of a handler, a type analogous to Parameterless_Handler should 
  31350.       be specified in a child package of Interrupts, with the same operations 
  31351.       as in the predefined package Interrupts. 
  31352.  
  31353.       NOTES 
  31354.  
  31355.   23. (8) The package Interrupts.Names contains implementation-defined names 
  31356.       (and constant values) for the interrupts that are supported by the 
  31357.       implementation. 
  31358.  
  31359.             Examples
  31360.  
  31361.   24. Example of interrupt handlers: 
  31362.  
  31363.         25.
  31364.  
  31365.                       Device_Priority : constant
  31366.                        array (1┬╖┬╖5) of System.Interrupt_Priority := ( ┬╖┬╖┬╖ );
  31367.                       protected type Device_Interface
  31368.                        (Int_ID : Ada.Interrupts.Interrupt_ID) is
  31369.                        procedure Handler;
  31370.                        pragma Attach_Handler(Handler, Int_ID);
  31371.                        ┬╖┬╖┬╖
  31372.                        pragma Interrupt_Priority(Device_Priority(Int_ID));
  31373.                       end Device_Interface;
  31374.                        ┬╖┬╖┬╖
  31375.                       Device_1_Driver : Device_Interface(1);
  31376.                        ┬╖┬╖┬╖
  31377.                       Device_5_Driver : Device_Interface(5);
  31378.                        ┬╖┬╖┬╖
  31379.  
  31380.  
  31381. ΓòÉΓòÉΓòÉ 19.4. Preelaboration Requirements ΓòÉΓòÉΓòÉ
  31382.  
  31383.    1. This clause specifies additional implementation and documentation 
  31384.       requirements for the Preelaborate pragma, see 10.2.1. 
  31385.  
  31386.             Implementation Requirements
  31387.  
  31388.    2. The implementation shall not incur any run-time overhead for the 
  31389.       elaboration checks of subprograms and protected_bodies declared in 
  31390.       preelaborated library units. 
  31391.  
  31392.    3. The implementation shall not execute any memory write operations after 
  31393.       load time for the elaboration of constant objects declared immediately 
  31394.       within the declarative region of a preelaborated library package, so long 
  31395.       as the subtype and initial expression (or default initial expressions if 
  31396.       initialized by default) of the object_declaration satisfy the following 
  31397.       restrictions. The meaning of load time is implementation defined. 
  31398.  
  31399.         a. Any subtype_mark denotes a statically constrained subtype, with 
  31400.            statically constrained subcomponents, if any; 
  31401.  
  31402.         b. any constraint is a static constraint; 
  31403.  
  31404.         c. any allocator is for an access-to-constant type; 
  31405.  
  31406.         d. any uses of predefined operators appear only within static 
  31407.            expressions; 
  31408.  
  31409.         e. any primaries that are names, other than attribute_references for 
  31410.            the Access or Address attributes, appear only within static 
  31411.            expressions; 
  31412.  
  31413.         f. any name that is not part of a static expression is an expanded name 
  31414.            or direct_name that statically denotes some entity; 
  31415.  
  31416.         g. any discrete_choice of an array_aggregate is static; 
  31417.  
  31418.         h. no language-defined check associated with the elaboration of the 
  31419.            object_declaration can fail. 
  31420.  
  31421.   Documentation Requirements
  31422.  
  31423.    1. The implementation shall document any circumstances under which the 
  31424.       elaboration of a preelaborated package causes code to be executed at run 
  31425.       time. 
  31426.  
  31427.    2. The implementation shall document whether the method used for 
  31428.       initialization of preelaborated variables allows a partition to be 
  31429.       restarted without reloading. 
  31430.  
  31431.             Implementation Advice
  31432.  
  31433.    3. It is recommended that preelaborated packages be implemented in such a 
  31434.       way that there should be little or no code executed at run time for the 
  31435.       elaboration of entities not already covered by the Implementation 
  31436.       Requirements. 
  31437.  
  31438.  
  31439. ΓòÉΓòÉΓòÉ 19.5. Pragma Discard_Names ΓòÉΓòÉΓòÉ
  31440.  
  31441.    1. A pragma Discard_Names may be used to request a reduction in storage used 
  31442.       for the names of certain entities. 
  31443.  
  31444.             Syntax
  31445.  
  31446.    2. The form of a pragma Discard_Names is as follows: 
  31447.  
  31448.          3.
  31449.  
  31450.                       pragma Discard_Names[([On => ] local_name)];
  31451.  
  31452.         a. A pragma Discard_Names is allowed only immediately within a 
  31453.            declarative_part, immediately within a package_specification, or as 
  31454.            a configuration pragma. 
  31455.  
  31456.   Legality Rules
  31457.  
  31458.    1. The local_name (if present) shall denote a non-derived enumeration first 
  31459.       subtype, a tagged first subtype, or an exception. The pragma applies to 
  31460.       the type or exception. Without a local_name, the pragma applies to all 
  31461.       such entities declared after the pragma, within the same declarative 
  31462.       region. Alternatively, the pragma can be used as a configuration pragma. 
  31463.       If the pragma applies to a type, then it applies also to all descendants 
  31464.       of the type. 
  31465.  
  31466.             Static Semantics
  31467.  
  31468.    2. If a local_name is given, then a pragma Discard_Names is a representation 
  31469.       pragma. 
  31470.  
  31471.    3. If the pragma applies to an enumeration type, then the semantics of the 
  31472.       Wide_Image and Wide_Value attributes are implementation defined for that 
  31473.       type; the semantics of Image and Value are still defined in terms of 
  31474.       Wide_Image and Wide_Value. In addition, the semantics of 
  31475.       Text_IO.Enumeration_IO are implementation defined. If the pragma applies 
  31476.       to a tagged type, then the semantics of the Tags.Expanded_Name function 
  31477.       are implementation defined for that type. If the pragma applies to an 
  31478.       exception, then the semantics of the Exceptions.Exception_Name function 
  31479.       are implementation defined for that exception. 
  31480.  
  31481.             Implementation Advice
  31482.  
  31483.    4. If the pragma applies to an entity, then the implementation should reduce 
  31484.       the amount of storage used for storing names associated with that entity. 
  31485.  
  31486.  
  31487. ΓòÉΓòÉΓòÉ 19.6. Shared Variable Control ΓòÉΓòÉΓòÉ
  31488.  
  31489.    1. This clause specifies representation pragmas that control the use of 
  31490.       shared variables. 
  31491.  
  31492.             Syntax
  31493.  
  31494.    2. The form for pragmas Atomic, Volatile, Atomic_Components, and 
  31495.       Volatile_Components is as follows: 
  31496.  
  31497.          3.
  31498.  
  31499.                       pragma Atomic(local_name);
  31500.  
  31501.          4.
  31502.  
  31503.                       pragma Volatile(local_name);
  31504.  
  31505.          5.
  31506.  
  31507.                       pragma Atomic_Components(array_local_name);
  31508.  
  31509.          6.
  31510.  
  31511.                       pragma Volatile_Components(array_local_name);
  31512.  
  31513.    7. An atomic type is one to which a pragma Atomic applies. An atomic object 
  31514.       (including a component) is one to which a pragma Atomic applies, or a 
  31515.       component of an array to which a pragma Atomic_Components applies, or any 
  31516.       object of an atomic type. 
  31517.  
  31518.    8. A volatile type is one to which a pragma Volatile applies. A volatile 
  31519.       object (including a component) is one to which a pragma Volatile applies, 
  31520.       or a component of an array to which a pragma Volatile_Components applies, 
  31521.       or any object of a volatile type. In addition, every atomic type or 
  31522.       object is also defined to be volatile. Finally, if an object is volatile, 
  31523.       then so are all of its subcomponents (the same does not apply to atomic). 
  31524.  
  31525.             Name Resolution Rules
  31526.  
  31527.    9. The local_name in an Atomic or Volatile pragma shall resolve to denote 
  31528.       either an object_declaration, a non-inherited component_declaration, or a 
  31529.       full_type_declaration. The array_local_name in an Atomic_Components or 
  31530.       Volatile_Components pragma shall resolve to denote the declaration of an 
  31531.       array type or an array object of an anonymous type. 
  31532.  
  31533.             Legality Rules
  31534.  
  31535.   10. It is illegal to apply either an Atomic or Atomic_Components pragma to an 
  31536.       object or type if the implementation cannot support the indivisible reads 
  31537.       and updates required by the pragma (see below). 
  31538.  
  31539.   11. It is illegal to specify the Size attribute of an atomic object, the 
  31540.       Component_Size attribute for an array type with atomic components, or the 
  31541.       layout attributes of an atomic component, in a way that prevents the 
  31542.       implementation from performing the required indivisible reads and 
  31543.       updates. 
  31544.  
  31545.   12. If an atomic object is passed as a parameter, then the type of the formal 
  31546.       parameter shall either be atomic or allow pass by copy (that is, not be a 
  31547.       nonatomic by-reference type). If an atomic object is used as an actual 
  31548.       for a generic formal object of mode in out, then the type of the generic 
  31549.       formal object shall be atomic. If the prefix of an attribute_reference 
  31550.       for an Access attribute denotes an atomic object (including a component), 
  31551.       then the designated type of the resulting access type shall be atomic. If 
  31552.       an atomic type is used as an actual for a generic formal derived type, 
  31553.       then the ancestor of the formal type shall be atomic or allow pass by 
  31554.       copy. Corresponding rules apply to volatile objects and types. 
  31555.  
  31556.   13. If a pragma Volatile, Volatile_Components, Atomic, or Atomic_Components 
  31557.       applies to a stand-alone constant object, then a pragma Import shall also 
  31558.       apply to it. 
  31559.  
  31560.             Static Semantics
  31561.  
  31562.   14. These pragmas are representation pragmas, see 13.1. 
  31563.  
  31564.             Dynamic Semantics
  31565.  
  31566.   15. For an atomic object (including an atomic component) all reads and 
  31567.       updates of the object as a whole are indivisible. 
  31568.  
  31569.   16. For a volatile object all reads and updates of the object as a whole are 
  31570.       performed directly to memory. 
  31571.  
  31572.   17. Two actions are sequential, see 9.10, if each is the read or update of 
  31573.       the same atomic object. 
  31574.  
  31575.   18. If a type is atomic or volatile and it is not a by-copy type, then the 
  31576.       type is defined to be a by-reference type. If any subcomponent of a type 
  31577.       is atomic or volatile, then the type is defined to be a by-reference 
  31578.       type. 
  31579.  
  31580.   19. If an actual parameter is atomic or volatile, and the corresponding 
  31581.       formal parameter is not, then the parameter is passed by copy. 
  31582.  
  31583.             Implementation Requirements
  31584.  
  31585.   20. The external effect of a program, see 1.1.3, is defined to include each 
  31586.       read and update of a volatile or atomic object. The implementation shall 
  31587.       not generate any memory reads or updates of atomic or volatile objects 
  31588.       other than those specified by the program. 
  31589.  
  31590.   21. If a pragma Pack applies to a type any of whose subcomponents are atomic, 
  31591.       the implementation shall not pack the atomic subcomponents more tightly 
  31592.       than that for which it can support indivisible reads and updates. 
  31593.  
  31594.       NOTES 
  31595.  
  31596.   22. (9) An imported volatile or atomic constant behaves as a constant (i.e. 
  31597.       read-only) with respect to other parts of the Ada program, but can still 
  31598.       be modified by an ``external source.'' 
  31599.  
  31600.  
  31601. ΓòÉΓòÉΓòÉ 19.7. Task Identification and Attributes ΓòÉΓòÉΓòÉ
  31602.  
  31603.    1. This clause describes operations and attributes that can be used to 
  31604.       obtain the identity of a task. In addition, a package that associates 
  31605.       user-defined information with a task is defined. 
  31606.  
  31607.  C.7.1                         The Package Task_Identification 
  31608.  C.7.2                         The Package Task_Attributes 
  31609.  
  31610.  
  31611. ΓòÉΓòÉΓòÉ 19.7.1. The Package Task_Identification ΓòÉΓòÉΓòÉ
  31612.  
  31613.  
  31614.   Static Semantics
  31615.  
  31616.    1. The following language-defined library package exists: 
  31617.  
  31618.          2.
  31619.  
  31620.                       package Ada.Task_Identification is
  31621.                         type Task_ID is private;
  31622.                         Null_Task_ID : constant Task_ID;
  31623.                         function  "=" (Left, Right : Task_ID) return Boolean;
  31624.  
  31625.          3.
  31626.  
  31627.                         function  Image     (T : Task_ID) return String;
  31628.                         function  Current_Task return Task_ID;
  31629.                         procedure Abort_Task  (T : in out Task_ID);
  31630.  
  31631.          4.
  31632.  
  31633.                         function  Is_Terminated(T : Task_ID) return Boolean;
  31634.                         function  Is_Callable  (T : Task_ID) return Boolean;
  31635.                       private
  31636.                         ┬╖┬╖┬╖ -- not specified by the language
  31637.                       end Ada.Task_Identification;
  31638.  
  31639.   Dynamic Semantics
  31640.  
  31641.    5. A value of the type Task_ID identifies an existent task. The constant 
  31642.       Null_Task_ID does not identify any task. Each object of the type Task_ID 
  31643.       is default initialized to the value of Null_Task_ID. 
  31644.  
  31645.    6. The function "=" returns True if and only if Left and Right identify the 
  31646.       same task or both have the value Null_Task_ID. 
  31647.  
  31648.    7. The function Image returns an implementation-defined string that 
  31649.       identifies T. If T equals Null_Task_ID, Image returns an empty string. 
  31650.  
  31651.    8. The function Current_Task returns a value that identifies the calling 
  31652.       task. 
  31653.  
  31654.    9. The effect of Abort_Task is the same as the abort_statement for the task 
  31655.       identified by T. In addition, if T identifies the environment task, the 
  31656.       entire partition is aborted, see E.1. 
  31657.  
  31658.   10. The functions Is_Terminated and Is_Callable return the value of the 
  31659.       corresponding attribute of the task identified by T. 
  31660.  
  31661.   11. For a prefix T that is of a task type (after any implicit dereference), 
  31662.       the following attribute is defined: 
  31663.  
  31664.   12. T'Identity 
  31665.  
  31666.         13.
  31667.  
  31668.                       Yields a value of the type Task_ID that identifies the task
  31669.                       denoted by T.
  31670.  
  31671.   14. For a prefix E that denotes an entry_declaration, the following attribute 
  31672.       is defined: 
  31673.  
  31674.   15. E'Caller 
  31675.  
  31676.                       Yields a value of the type Task_ID that identifies the task
  31677.                       whose call is now being serviced. Use of this attribute is
  31678.                       allowed only inside an entry_body or accept_statement
  31679.                       corresponding to the entry_declaration denoted by E.
  31680.  
  31681.   16. Program_Error is raised if a value of Null_Task_ID is passed as a 
  31682.       parameter to Abort_Task, Is_Terminated, and Is_Callable. 
  31683.  
  31684.   17. Abort_Task is a potentially blocking operation, see 9.5.1. 
  31685.  
  31686.             Bounded (Run-Time) Errors
  31687.  
  31688.   18. It is a bounded error to call the Current_Task function from an entry 
  31689.       body or an interrupt handler. Program_Error is raised, or an 
  31690.       implementation-defined value of the type Task_ID is returned. 
  31691.  
  31692.             Erroneous Execution
  31693.  
  31694.   19. If a value of Task_ID is passed as a parameter to any of the operations 
  31695.       declared in this package (or any language-defined child of this package), 
  31696.       and the corresponding task object no longer exists, the execution of the 
  31697.       program is erroneous. 
  31698.  
  31699.             Documentation Requirements
  31700.  
  31701.   20. The implementation shall document the effect of calling Current_Task from 
  31702.       an entry body or interrupt handler. 
  31703.  
  31704.       NOTES 
  31705.  
  31706.   21. (10) This package is intended for use in writing user-defined task 
  31707.       scheduling packages and constructing server tasks. Current_Task can be 
  31708.       used in conjunction with other operations requiring a task as an argument 
  31709.       such as Set_Priority, see D.5. 
  31710.  
  31711.   22. (11) The function Current_Task and the attribute Caller can return a 
  31712.       Task_ID value that identifies the environment task. 
  31713.  
  31714.  
  31715. ΓòÉΓòÉΓòÉ 19.7.2. The Package Task_Attributes ΓòÉΓòÉΓòÉ
  31716.  
  31717.  
  31718.   Static Semantics
  31719.  
  31720.    1. The following language-defined generic library package exists: 
  31721.  
  31722.          2.
  31723.  
  31724.                       with Ada.Task_Identification; use Ada.Task_Identification;
  31725.                       generic
  31726.                         type Attribute is private;
  31727.                         Initial_Value : in Attribute;
  31728.                       package Ada.Task_Attributes is
  31729.  
  31730.          3.
  31731.  
  31732.                         type Attribute_Handle is access all Attribute;
  31733.  
  31734.          4.
  31735.  
  31736.                         function Value(T : Task_ID := Current_Task)
  31737.                          return Attribute;
  31738.  
  31739.          5.
  31740.  
  31741.                         function Reference(T : Task_ID := Current_Task)
  31742.                          return Attribute_Handle;
  31743.  
  31744.          6.
  31745.  
  31746.                         procedure Set_Value(Val : in Attribute;
  31747.                                   T  : in Task_ID := Current_Task);
  31748.                         procedure Reinitialize(T : in Task_ID := Current_Task);
  31749.  
  31750.          7.
  31751.  
  31752.                       end Ada.Task_Attributes;
  31753.  
  31754.   Dynamic Semantics
  31755.  
  31756.    8. When an instance of Task_Attributes is elaborated in a given active 
  31757.       partition, an object of the actual type corresponding to the formal type 
  31758.       Attribute is implicitly created for each task (of that partition) that 
  31759.       exists and is not yet terminated. This object acts as a user-defined 
  31760.       attribute of the task. A task created previously in the partition and not 
  31761.       yet terminated has this attribute from that point on. Each task 
  31762.       subsequently created in the partition will have this attribute when 
  31763.       created. In all these cases, the initial value of the given attribute is 
  31764.       Initial_Value. 
  31765.  
  31766.    9. The Value operation returns the value of the corresponding attribute of 
  31767.       T. 
  31768.  
  31769.   10. The Reference operation returns an access value that designates the 
  31770.       corresponding attribute of T. 
  31771.  
  31772.   11. The Set_Value operation performs any finalization on the old value of the 
  31773.       attribute of T and assigns Val to that attribute, see 5.2, and 7.6. 
  31774.  
  31775.   12. The effect of the Reinitialize operation is the same as Set_Value where 
  31776.       the Val parameter is replaced with Initial_Value. 
  31777.  
  31778.   13. For all the operations declared in this package, Tasking_Error is raised 
  31779.       if the task identified by T is terminated. Program_Error is raised if the 
  31780.       value of T is Null_Task_ID. 
  31781.  
  31782.             Erroneous Execution
  31783.  
  31784.   14. It is erroneous to dereference the access value returned by a given call 
  31785.       on Reference after a subsequent call on Reinitialize for the same task 
  31786.       attribute, or after the associated task terminates. 
  31787.  
  31788.   15. If a value of Task_ID is passed as a parameter to any of the operations 
  31789.       declared in this package and the corresponding task object no longer 
  31790.       exists, the execution of the program is erroneous. 
  31791.  
  31792.             Implementation Requirements
  31793.  
  31794.   16. The implementation shall perform each of the above operations for a given 
  31795.       attribute of a given task atomically with respect to any other of the 
  31796.       above operations for the same attribute of the same task. 
  31797.  
  31798.   17. When a task terminates, the implementation shall finalize all attributes 
  31799.       of the task, and reclaim any other storage associated with the 
  31800.       attributes. 
  31801.  
  31802.             Documentation Requirements
  31803.  
  31804.   18. The implementation shall document the limit on the number of attributes 
  31805.       per task, if any, and the limit on the total storage for attribute values 
  31806.       per task, if such a limit exists. 
  31807.  
  31808.   19. In addition, if these limits can be configured, the implementation shall 
  31809.       document how to configure them. 
  31810.  
  31811.             Metrics
  31812.  
  31813.   20. The implementation shall document the following metrics: A task calling 
  31814.       the following subprograms shall execute in a sufficiently high priority 
  31815.       as to not be preempted during the measurement period. This period shall 
  31816.       start just before issuing the call and end just after the call completes. 
  31817.       If the attributes of task T are accessed by the measurement tests, no 
  31818.       other task shall access attributes of that task during the measurement 
  31819.       period. For all measurements described here, the Attribute type shall be 
  31820.       a scalar whose size is equal to the size of the predefined integer size. 
  31821.       For each measurement, two cases shall be documented: one where the 
  31822.       accessed attributes are of the calling task (that is, the default value 
  31823.       for the T parameter is used), and the other, where T identifies another, 
  31824.       non-terminated, task. 
  31825.  
  31826.   21. The following calls (to subprograms in the Task_Attributes package) shall 
  31827.       be measured: 
  31828.  
  31829.         a. a call to Value, where the return value is Initial_Value; 
  31830.  
  31831.         b. a call to Value, where the return value is not equal to 
  31832.            Initial_Value; 
  31833.  
  31834.         c. a call to Reference, where the return value designates a value equal 
  31835.            to Initial_Value; 
  31836.  
  31837.         d. a call to Reference, where the return value designates a value not 
  31838.            equal to Initial_Value; 
  31839.  
  31840.         e. a call to Set_Value where the Val parameter is not equal to 
  31841.            Initial_Value and the old attribute value is equal to Initial_Value. 
  31842.  
  31843.         f. a call to Set_Value where the Val parameter is not equal to 
  31844.            Initial_Value and the old attribute value is not equal to 
  31845.            Initial_Value. 
  31846.  
  31847.   Implementation Permissions
  31848.  
  31849.    1. An implementation need not actually create the object corresponding to a 
  31850.       task attribute until its value is set to something other than that of 
  31851.       Initial_Value, or until Reference is called for the task attribute. 
  31852.       Similarly, when the value of the attribute is to be reinitialized to that 
  31853.       of Initial_Value, the object may instead be finalized and its storage 
  31854.       reclaimed, to be recreated when needed later. While the object does not 
  31855.       exist, the function Value may simply return Initial_Value, rather than 
  31856.       implicitly creating the object. 
  31857.  
  31858.    2. An implementation is allowed to place restrictions on the maximum number 
  31859.       of attributes a task may have, the maximum size of each attribute, and 
  31860.       the total storage size allocated for all the attributes of a task. 
  31861.  
  31862.             Implementation Advice
  31863.  
  31864.    3. Some implementations are targeted to domains in which memory use at run 
  31865.       time must be completely deterministic. For such implementations, it is 
  31866.       recommended that the storage for task attributes will be pre-allocated 
  31867.       statically and not from the heap. This can be accomplished by either 
  31868.       placing restrictions on the number and the size of the task's attributes, 
  31869.       or by using the pre-allocated storage for the first N attribute objects, 
  31870.       and the heap for the others. In the latter case, N should be documented. 
  31871.  
  31872.       NOTES 
  31873.  
  31874.    4. (12) An attribute always exists (after instantiation), and has the 
  31875.       initial value. It need not occupy memory until the first operation that 
  31876.       potentially changes the attribute value. The same holds true after 
  31877.       Reinitialize. 
  31878.  
  31879.    5. (13) The result of the Reference function should be used with care; it is 
  31880.       always safe to use that result in the task body whose attribute is being 
  31881.       accessed. However, when the result is being used by another task, the 
  31882.       programmer must make sure that the task whose attribute is being accessed 
  31883.       is not yet terminated. Failing to do so could make the program execution 
  31884.       erroneous. 
  31885.  
  31886.    6. (14) As specified in C.7.1, if the parameter T (in a call on a subprogram 
  31887.       of an instance of this package) identifies a nonexistent task, the 
  31888.       execution of the program is erroneous. 
  31889.  
  31890.  
  31891. ΓòÉΓòÉΓòÉ 20. Real-Time Systems (normative) ΓòÉΓòÉΓòÉ
  31892.  
  31893.    1. This Annex specifies additional characteristics of Ada implementations 
  31894.       intended for real-time systems software. To conform to this Annex, an 
  31895.       implementation shall also conform to the Systems Programming Annex. 
  31896.  
  31897.             Metrics
  31898.  
  31899.    2. The metrics are documentation requirements; an implementation shall 
  31900.       document the values of the language-defined metrics for at least one 
  31901.       configuration of hardware or an underlying system supported by the 
  31902.       implementation, and shall document the details of that configuration. 
  31903.  
  31904.    3. The metrics do not necessarily yield a simple number. For some, a range 
  31905.       is more suitable, for others a formula dependent on some parameter is 
  31906.       appropriate, and for others, it may be more suitable to break the metric 
  31907.       into several cases. Unless specified otherwise, the metrics in this annex 
  31908.       are expressed in processor clock cycles. For metrics that require 
  31909.       documentation of an upper bound, if there is no upper bound, the 
  31910.       implementation shall report that the metric is unbounded. 
  31911.  
  31912.       NOTES 
  31913.  
  31914.    4. (1) The specification of the metrics makes a distinction between upper 
  31915.       bounds and simple execution times. Where something is just specified as 
  31916.       ``the execution time of'' a piece of code, this leaves one the freedom to 
  31917.       choose a nonpathological case. This kind of metric is of the form ``there 
  31918.       exists a program such that the value of the metric is V''. Conversely, 
  31919.       the meaning of upper bounds is ``there is no program such that the value 
  31920.       of the metric is greater than V''. This kind of metric can only be 
  31921.       partially tested, by finding the value of V for one or more test 
  31922.       programs. 
  31923.  
  31924.    5. (2) The metrics do not cover the whole language; they are limited to 
  31925.       features that are specified in C: ``Systems Programming'', and in this 
  31926.       Annex. The metrics are intended to provide guidance to potential users as 
  31927.       to whether a particular implementation of such a feature is going to be 
  31928.       adequate for a particular real-time application. As such, the metrics are 
  31929.       aimed at known implementation choices that can result in significant 
  31930.       performance differences. 
  31931.  
  31932.    6. (3) The purpose of the metrics is not necessarily to provide fine-grained 
  31933.       quantitative results or to serve as a comparison between different 
  31934.       implementations on the same or different platforms. Instead, their goal 
  31935.       is rather qualitative; to define a standard set of approximate values 
  31936.       that can be measured and used to estimate the general suitability of an 
  31937.       implementation, or to evaluate the comparative utility of certain 
  31938.       features of an implementation for a particular real-time application. 
  31939.  
  31940.  D.1                           Task Priorities 
  31941.  D.2                           Priority Scheduling 
  31942.  D.3                           Priority Ceiling Locking 
  31943.  D.4                           Entry Queuing Policies 
  31944.  D.5                           Dynamic Priorities 
  31945.  D.6                           Preemptive Abort 
  31946.  D.7                           Tasking Restrictions 
  31947.  D.8                           Monotonic Time 
  31948.  D.9                           Delay Accuracy 
  31949.  D.10                          Synchronous Task Control 
  31950.  D.11                          Asynchronous Task Control 
  31951.  D.12                          Other Optimizations and Determinism Rules --- 
  31952.                                The Detailed Node Listing --- 
  31953.  D.1                           Task Priorities 
  31954.  D.2                           Priority Scheduling 
  31955.  D.2.1                         The Task Dispatching Model 
  31956.  D.2.2                         The Standard Task Dispatching Policy 
  31957.  D.3                           Priority Ceiling Locking 
  31958.  D.4                           Entry Queuing Policies 
  31959.  D.5                           Dynamic Priorities 
  31960.  D.6                           Preemptive Abort 
  31961.  D.7                           Tasking Restrictions 
  31962.  D.8                           Monotonic Time 
  31963.  D.9                           Delay Accuracy 
  31964.  D.10                          Synchronous Task Control 
  31965.  D.11                          Asynchronous Task Control 
  31966.  D.12                          Other Optimizations and Determinism Rules 
  31967.  
  31968.  
  31969. ΓòÉΓòÉΓòÉ 20.1. Task Priorities ΓòÉΓòÉΓòÉ
  31970.  
  31971.    1. This clause specifies the priority model for real-time systems. In 
  31972.       addition, the methods for specifying priorities are defined. 
  31973.  
  31974.             Syntax
  31975.  
  31976.    2. The form of a pragma Priority is as follows: 
  31977.  
  31978.          3.
  31979.  
  31980.                       pragma Priority(expression);
  31981.  
  31982.    4. The form of a pragma Interrupt_Priority is as follows: 
  31983.  
  31984.          5.
  31985.  
  31986.                       pragma Interrupt_Priority[(expression)];
  31987.  
  31988.   Name Resolution Rules
  31989.  
  31990.    6. The expected type for the expression in a Priority or Interrupt_Priority 
  31991.       pragma is Integer. 
  31992.  
  31993.             Legality Rules
  31994.  
  31995.    7. A Priority pragma is allowed only immediately within a task_definition, a 
  31996.       protected_definition, or the declarative_part of a subprogram_body. An 
  31997.       Interrupt_Priority pragma is allowed only immediately within a task_ 
  31998.       definition or a protected_definition. At most one such pragma shall 
  31999.       appear within a given construct. 
  32000.  
  32001.    8. For a Priority pragma that appears in the declarative_part of a 
  32002.       subprogram_body, the expression shall be static, and its value shall be 
  32003.       in the range of System.Priority. 
  32004.  
  32005.             Static Semantics
  32006.  
  32007.    9. The following declarations exist in package System: 
  32008.  
  32009.         10.
  32010.  
  32011.                       subtype Any_Priority is Integer range implementation-defined;
  32012.                       subtype Priority is Any_Priority range
  32013.                        Any_Priority'First ┬╖┬╖ implementation-defined;
  32014.                       subtype Interrupt_Priority is Any_Priority range
  32015.                        Priority'Last+1 ┬╖┬╖ Any_Priority'Last;
  32016.  
  32017.         11.
  32018.  
  32019.                       Default_Priority : constant Priority
  32020.                        := (Priority'First + Priority'Last)/2;
  32021.  
  32022.   12. The full range of priority values supported by an implementation is 
  32023.       specified by the subtype Any_Priority. The subrange of priority values 
  32024.       that are high enough to require the blocking of one or more interrupts is 
  32025.       specified by the subtype Interrupt_Priority. The subrange of priority 
  32026.       values below System.Interrupt_Priority'First is specified by the subtype 
  32027.       System.Priority. 
  32028.  
  32029.   13. The priority specified by a Priority or Interrupt_Priority pragma is the 
  32030.       value of the expression in the pragma, if any. If there is no expression 
  32031.       in an Interrupt_Priority pragma, the priority value is 
  32032.       Interrupt_Priority'Last. 
  32033.  
  32034.             Dynamic Semantics
  32035.  
  32036.   14. A Priority pragma has no effect if it occurs in the declarative_part of 
  32037.       the subprogram_body of a subprogram other than the main subprogram. 
  32038.  
  32039.   15. A task priority is an integer value that indicates a degree of urgency 
  32040.       and is the basis for resolving competing demands of tasks for resources. 
  32041.       Unless otherwise specified, whenever tasks compete for processors or 
  32042.       other implementation-defined resources, the resources are allocated to 
  32043.       the task with the highest priority value. The base priority of a task is 
  32044.       the priority with which it was created, or to which it was later set by 
  32045.       Dynamic_Priorities.Set_Priority, see D.5. At all times, a task also has 
  32046.       an active priority, which generally reflects its base priority as well as 
  32047.       any priority it inherits from other sources. Priority inheritance is the 
  32048.       process by which the priority of a task or other entity (e.g. a protected 
  32049.       object, see D.3) is used in the evaluation of another task's active 
  32050.       priority. 
  32051.  
  32052.   16. The effect of specifying such a pragma in a protected_definition is 
  32053.       discussed in D.3. 
  32054.  
  32055.   17. The expression in a Priority or Interrupt_Priority pragma that appears in 
  32056.       a task_definition is evaluated for each task object, see 9.1. For a 
  32057.       Priority pragma, the value of the expression is converted to the subtype 
  32058.       Priority; for an Interrupt_Priority pragma, this value is converted to 
  32059.       the subtype Any_Priority. The priority value is then associated with the 
  32060.       task object whose task_definition contains the pragma. 
  32061.  
  32062.   18. Likewise, the priority value is associated with the environment task if 
  32063.       the pragma appears in the declarative_part of the main subprogram. 
  32064.  
  32065.   19. The initial value of a task's base priority is specified by default or by 
  32066.       means of a Priority or Interrupt_Priority pragma. After a task is 
  32067.       created, its base priority can be changed only by a call to 
  32068.       Dynamic_Priorities.Set_Priority, see D.5. The initial base priority of a 
  32069.       task in the absence of a pragma is the base priority of the task that 
  32070.       creates it at the time of creation, see 9.1. If a pragma Priority does 
  32071.       not apply to the main subprogram, the initial base priority of the 
  32072.       environment task is System.Default_Priority. The task's active priority 
  32073.       is used when the task competes for processors. Similarly, the task's 
  32074.       active priority is used to determine the task's position in any queue 
  32075.       when Priority_Queuing is specified, see D.4. 
  32076.  
  32077.   20. At any time, the active priority of a task is the maximum of all the 
  32078.       priorities the task is inheriting at that instant. For a task that is not 
  32079.       held, see D.11, its base priority is always a source of priority 
  32080.       inheritance. Other sources of priority inheritance are specified under 
  32081.       the following conditions: 
  32082.  
  32083.         a. During activation, a task being activated inherits the active 
  32084.            priority of the its activator, see 9.2. 
  32085.  
  32086.         b. During rendezvous, the task accepting the entry call inherits the 
  32087.            active priority of the caller, see 9.5.3. 
  32088.  
  32089.         c. During a protected action on a protected object, a task inherits the 
  32090.            ceiling priority of the protected object, see 9.5, and D.3. 
  32091.  
  32092.    1. In all of these cases, the priority ceases to be inherited as soon as the 
  32093.       condition calling for the inheritance no longer exists. 
  32094.  
  32095.             Implementation Requirements
  32096.  
  32097.    2. The range of System.Interrupt_Priority shall include at least one value. 
  32098.  
  32099.    3. The range of System.Priority shall include at least 30 values. 
  32100.  
  32101.       NOTES 
  32102.  
  32103.    4. (4) The priority expression can include references to discriminants of 
  32104.       the enclosing type. 
  32105.  
  32106.    5. (5) It is a consequence of the active priority rules that at the point 
  32107.       when a task stops inheriting a priority from another source, its active 
  32108.       priority is re-evaluated. This is in addition to other instances 
  32109.       described in this Annex for such re-evaluation. 
  32110.  
  32111.    6. (6) An implementation may provide a non-standard mode in which tasks 
  32112.       inherit priorities under conditions other than those specified above. 
  32113.  
  32114.  
  32115. ΓòÉΓòÉΓòÉ 20.2. Priority Scheduling ΓòÉΓòÉΓòÉ
  32116.  
  32117.    1. This clause describes the rules that determine which task is selected for 
  32118.       execution when more than one task is ready, see 9.2. The rules have two 
  32119.       parts: the task dispatching model, see D.2.1, and a specific task 
  32120.       dispatching policy, see D.2.2. 
  32121.  
  32122.  D.2.1                         The Task Dispatching Model 
  32123.  D.2.2                         The Standard Task Dispatching Policy 
  32124.  
  32125.  
  32126. ΓòÉΓòÉΓòÉ 20.2.1. The Task Dispatching Model ΓòÉΓòÉΓòÉ
  32127.  
  32128.    1. The task dispatching model specifies preemptive scheduling, based on 
  32129.       conceptual priority-ordered ready queues. 
  32130.  
  32131.             Dynamic Semantics
  32132.  
  32133.    2. A task runs (that is, it becomes a running task) only when it is ready 
  32134.       (see 9.2) and the execution resources required by that task are 
  32135.       available. Processors are allocated to tasks based on each task's active 
  32136.       priority. 
  32137.  
  32138.    3. It is implementation defined whether, on a multiprocessor, a task that is 
  32139.       waiting for access to a protected object keeps its processor busy. 
  32140.  
  32141.    4. Task dispatching is the process by which one ready task is selected for 
  32142.       execution on a processor. This selection is done at certain points during 
  32143.       the execution of a task called task dispatching points. A task reaches a 
  32144.       task dispatching point whenever it becomes blocked, and whenever it 
  32145.       becomes ready. In addition, the completion of an accept_statement, see 
  32146.       9.5.2, and task termination are task dispatching points for the executing 
  32147.       task. Other task dispatching points are defined throughout this Annex. 
  32148.  
  32149.    5. Task dispatching policies are specified in terms of conceptual ready 
  32150.       queues, task states, and task preemption. A ready queue is an ordered 
  32151.       list of ready tasks. The first position in a queue is called the head of 
  32152.       the queue, and the last position is called the tail of the queue. A task 
  32153.       is ready if it is in a ready queue, or if it is running. Each processor 
  32154.       has one ready queue for each priority value. At any instant, each ready 
  32155.       queue of a processor contains exactly the set of tasks of that priority 
  32156.       that are ready for execution on that processor, but are not running on 
  32157.       any processor; that is, those tasks that are ready, are not running on 
  32158.       any processor, and can be executed using that processor and other 
  32159.       available resources. A task can be on the ready queues of more than one 
  32160.       processor. 
  32161.  
  32162.    6. Each processor also has one running task, which is the task currently 
  32163.       being executed by that processor. Whenever a task running on a processor 
  32164.       reaches a task dispatching point, one task is selected to run on that 
  32165.       processor. The task selected is the one at the head of the highest 
  32166.       priority nonempty ready queue; this task is then removed from all ready 
  32167.       queues to which it belongs. 
  32168.  
  32169.    7. A preemptible resource is a resource that while allocated to one task can 
  32170.       be allocated (temporarily) to another instead. Processors are preemptible 
  32171.       resources. Access to a protected object, see 9.5.1, is a nonpreemptible 
  32172.       resource. When a higher-priority task is dispatched to the processor, and 
  32173.       the previously running task is placed on the appropriate ready queue, the 
  32174.       latter task is said to be preempted. 
  32175.  
  32176.    8. A new running task is also selected whenever there is a nonempty ready 
  32177.       queue with a higher priority than the priority of the running task, or 
  32178.       when the task dispatching policy requires a running task to go back to a 
  32179.       ready queue. These are also task dispatching points. 
  32180.  
  32181.             Implementation Permissions
  32182.  
  32183.    9. An implementation is allowed to define additional resources as execution 
  32184.       resources, and to define the corresponding allocation policies for them. 
  32185.       Such resources may have an implementation defined effect on task 
  32186.       dispatching, see D.2.2. 
  32187.  
  32188.   10. An implementation may place implementation-defined restrictions on tasks 
  32189.       whose active priority is in the Interrupt_Priority range. 
  32190.  
  32191.       NOTES 
  32192.  
  32193.   11. (7) Section 9 specifies under which circumstances a task becomes ready. 
  32194.       The ready state is affected by the rules for task activation and 
  32195.       termination, delay statements, and entry calls. When a task is not ready, 
  32196.       it is said to be blocked. 
  32197.  
  32198.   12. (8) An example of a possible implementation-defined execution resource is 
  32199.       a page of physical memory, which needs to be loaded with a particular 
  32200.       page of virtual memory before a task can continue execution. 
  32201.  
  32202.   13. (9) The ready queues are purely conceptual; there is no requirement that 
  32203.       such lists physically exist in an implementation. 
  32204.  
  32205.   14. (10) While a task is running, it is not on any ready queue. Any time the 
  32206.       task that is running on a processor is added to a ready queue, a new 
  32207.       running task is selected for that processor. 
  32208.  
  32209.   15. (11) In a multiprocessor system, a task can be on the ready queues of 
  32210.       more than one processor. At the extreme, if several processors share the 
  32211.       same set of ready tasks, the contents of their ready queues is identical, 
  32212.       and so they can be viewed as sharing one ready queue, and can be 
  32213.       implemented that way. Thus, the dispatching model covers multiprocessors 
  32214.       where dispatching is implemented using a single ready queue, as well as 
  32215.       those with separate dispatching domains. 
  32216.  
  32217.   16. (12) The priority of a task is determined by rules specified in this 
  32218.       subclause, and under D.1: ``Task Priorities'', D.3: ``Priority Ceiling 
  32219.       Locking'', and D.5: ``Dynamic Priorities''. 
  32220.  
  32221.  
  32222. ΓòÉΓòÉΓòÉ 20.2.2. The Standard Task Dispatching Policy ΓòÉΓòÉΓòÉ
  32223.  
  32224.  
  32225.   Syntax
  32226.  
  32227.    1. The form of a pragma Task_Dispatching_Policy is as follows: 
  32228.  
  32229.          2.
  32230.  
  32231.                       pragma Task_Dispatching_Policy(policy_identifier );
  32232.  
  32233.   Legality Rules
  32234.  
  32235.    3. The policy_identifier shall either be FIFO_Within_Priorities or an 
  32236.       implementation-defined identifier. 
  32237.  
  32238.             Post-Compilation Rules
  32239.  
  32240.    4. A Task_Dispatching_Policy pragma is a configuration pragma. 
  32241.  
  32242.    5. If the FIFO_Within_Priorities policy is specified for a partition, then 
  32243.       the Ceiling_Locking policy, see D.3 shall also be specified for the 
  32244.       partition. 
  32245.  
  32246.             Dynamic Semantics
  32247.  
  32248.    6. A task dispatching policy specifies the details of task dispatching that 
  32249.       are not covered by the basic task dispatching model. These rules govern 
  32250.       when tasks are inserted into and deleted from the ready queues, and 
  32251.       whether a task is inserted at the head or the tail of the queue for its 
  32252.       active priority. The task dispatching policy is specified by a 
  32253.       Task_Dispatching_Policy configuration pragma. If no such pragma appears 
  32254.       in any of the program units comprising a partition, the task dispatching 
  32255.       policy for that partition is unspecified. 
  32256.  
  32257.    7. The language defines only one task dispatching policy, 
  32258.       FIFO_Within_Priorities; when this policy is in effect, modifications to 
  32259.       the ready queues occur only as follows: 
  32260.  
  32261.         a. When a blocked task becomes ready, it is added at the tail of the 
  32262.            ready queue for its active priority. 
  32263.  
  32264.         b. When the active priority of a ready task that is not running 
  32265.            changes, or the setting of its base priority takes effect, the task 
  32266.            is removed from the ready queue for its old active priority and is 
  32267.            added at the tail of the ready queue for its new active priority, 
  32268.            except in the case where the active priority is lowered due to the 
  32269.            loss of inherited priority, in which case the task is added at the 
  32270.            head of the ready queue for its new active priority. 
  32271.  
  32272.         c. When the setting of the base priority of a running task takes 
  32273.            effect, the task is added to the tail of the ready queue for its 
  32274.            active priority. 
  32275.  
  32276.         d. When a task executes a delay_statement that does not result in 
  32277.            blocking, it is added to the tail of the ready queue for its active 
  32278.            priority. 
  32279.  
  32280.    1. Each of the events specified above is a task dispatching point (see 
  32281.       D.2.1). 
  32282.  
  32283.    2. In addition, when a task is preempted, it is added at the head of the 
  32284.       ready queue for its active priority. 
  32285.  
  32286.             Documentation Requirements
  32287.  
  32288.    3. Priority inversion is the duration for which a task remains at the head 
  32289.       of the highest priority ready queue while the processor executes a lower 
  32290.       priority task. The implementation shall document: 
  32291.  
  32292.         a. The maximum priority inversion a user task can experience due to 
  32293.            activity of the implementation (on behalf of lower priority tasks), 
  32294.            and 
  32295.  
  32296.         b. whether execution of a task can be preempted by the implementation 
  32297.            processing of delay expirations for lower priority tasks, and if so, 
  32298.            for how long. 
  32299.  
  32300.   Implementation Permissions
  32301.  
  32302.    1. Implementations are allowed to define other task dispatching policies, 
  32303.       but need not support more than one such policy per partition. 
  32304.  
  32305.    2. For optimization purposes, an implementation may alter the points at 
  32306.       which task dispatching occurs, in an implementation defined manner. 
  32307.       However, a delay_statement always corresponds to at least one task 
  32308.       dispatching point. 
  32309.  
  32310.       NOTES 
  32311.  
  32312.    3. (13) If the active priority of a running task is lowered due to loss of 
  32313.       inherited priority (as it is on completion of a protected operation) and 
  32314.       there is a ready task of the same active priority that is not running, 
  32315.       the running task continues to run (provided that there is no higher 
  32316.       priority task). 
  32317.  
  32318.    4. (14) The setting of a task's base priority as a result of a call to 
  32319.       Set_Priority does not always take effect immediately when Set_Priority is 
  32320.       called. The effect of setting the task's base priority is deferred while 
  32321.       the affected task performs a protected action. 
  32322.  
  32323.    5. (15) Setting the base priority of a ready task causes the task to move to 
  32324.       the end of the queue for its active priority, regardless of whether the 
  32325.       active priority of the task actually changes. 
  32326.  
  32327.  
  32328. ΓòÉΓòÉΓòÉ 20.3. Priority Ceiling Locking ΓòÉΓòÉΓòÉ
  32329.  
  32330.    1. This clause specifies the interactions between priority task scheduling 
  32331.       and protected object ceilings. This interaction is based on the concept 
  32332.       of the ceiling priority of a protected object. 
  32333.  
  32334.             Syntax
  32335.  
  32336.    2. The form of a pragma Locking_Policy is as follows: 
  32337.  
  32338.          3.
  32339.  
  32340.                       pragma Locking_Policy(policy_identifier);
  32341.  
  32342.   Legality Rules
  32343.  
  32344.    4. The policy_identifier shall either be Ceiling_Locking or an 
  32345.       implementation-defined identifier. 
  32346.  
  32347.             Post-Compilation Rules
  32348.  
  32349.    5. A Locking_Policy pragma is a configuration pragma. 
  32350.  
  32351.             Dynamic Semantics
  32352.  
  32353.    6. A locking policy specifies the details of protected object locking. These 
  32354.       rules specify whether or not protected objects have priorities, and the 
  32355.       relationships between these priorities and task priorities. In addition, 
  32356.       the policy specifies the state of a task when it executes a protected 
  32357.       action, and how its active priority is affected by the locking. The 
  32358.       locking policy is specified by a Locking_Policy pragma. For 
  32359.       implementation-defined locking policies, the effect of a Priority or 
  32360.       Interrupt_Priority pragma on a protected object is implementation 
  32361.       defined. If no Locking_Policy pragma appears in any of the program units 
  32362.       comprising a partition, the locking policy for that partition, as well as 
  32363.       the effect of specifying either a Priority or Interrupt_Priority pragma 
  32364.       for a protected object, are implementation defined. 
  32365.  
  32366.    7. There is one predefined locking policy, Ceiling_Locking; this policy is 
  32367.       defined as follows: 
  32368.  
  32369.         a. Every protected object has a ceiling priority, which is determined 
  32370.            by either a Priority or Interrupt_Priority pragma as defined in D.1. 
  32371.            The ceiling priority of a protected object (or ceiling, for short) 
  32372.            is an upper bound on the active priority a task can have when it 
  32373.            calls protected operations of that protected object. 
  32374.  
  32375.         b. The expression of a Priority or Interrupt_Priority pragma is 
  32376.            evaluated as part of the creation of the corresponding protected 
  32377.            object and converted to the subtype System.Any_Priority or 
  32378.            System.Interrupt_Priority, respectively. The value of the expression 
  32379.            is the ceiling priority of the corresponding protected object. 
  32380.  
  32381.         c. If an Interrupt_Handler or Attach_Handler pragma, see C.3.1, appears 
  32382.            in a protected_definition without an Interrupt_Priority pragma, the 
  32383.            ceiling priority of protected objects of that type is implementation 
  32384.            defined, but in the range of the subtype System.Interrupt_Priority. 
  32385.  
  32386.         d. If no pragma Priority, Interrupt_Priority, Interrupt_Handler, or 
  32387.            Attach_Handler is specified in the protected_definition, then the 
  32388.            ceiling priority of the corresponding protected object is 
  32389.            System.Priority'Last. 
  32390.  
  32391.         e. While a task executes a protected action, it inherits the ceiling 
  32392.            priority of the corresponding protected object. 
  32393.  
  32394.         f. When a task calls a protected operation, a check is made that its 
  32395.            active priority is not higher than the ceiling of the corresponding 
  32396.            protected object; Program_Error is raised if this check fails. 
  32397.  
  32398.   Implementation Permissions
  32399.  
  32400.    1. The implementation is allowed to round all ceilings in a certain subrange 
  32401.       of System.Priority or System.Interrupt_Priority up to the top of that 
  32402.       subrange, uniformly. 
  32403.  
  32404.    2. Implementations are allowed to define other locking policies, but need 
  32405.       not support more than one such policy per partition. 
  32406.  
  32407.    3. Since implementations are allowed to place restrictions on code that runs 
  32408.       at an interrupt-level active priority, see C.3.1, and D.2.1, the 
  32409.       implementation may implement a language feature in terms of a protected 
  32410.       object with an implementation-defined ceiling, but the ceiling shall be 
  32411.       no less than Priority'Last. 
  32412.  
  32413.             Implementation Advice
  32414.  
  32415.    4. The implementation should use names that end with ``_Locking'' for 
  32416.       implementation-defined locking policies. 
  32417.  
  32418.       NOTES 
  32419.  
  32420.    5. (16) While a task executes in a protected action, it can be preempted 
  32421.       only by tasks whose active priorities are higher than the ceiling 
  32422.       priority of the protected object. 
  32423.  
  32424.    6. (17) If a protected object has a ceiling priority in the range of 
  32425.       Interrupt_Priority, certain interrupts are blocked while protected 
  32426.       actions of that object execute. In the extreme, if the ceiling is 
  32427.       Interrupt_Priority'Last, all blockable interrupts are blocked during that 
  32428.       time. 
  32429.  
  32430.    7. (18) The ceiling priority of a protected object has to be in the 
  32431.       Interrupt_Priority range if one of its procedures is to be used as an 
  32432.       interrupt handler, see C.3. 
  32433.  
  32434.    8. (19) When specifying the ceiling of a protected object, one should choose 
  32435.       a value that is at least as high as the highest active priority at which 
  32436.       tasks can be executing when they call protected operations of that 
  32437.       object. In determining this value the following factors, which can affect 
  32438.       active priority, should be considered: the effect of Set_Priority, nested 
  32439.       protected operations, entry calls, task activation, and other 
  32440.       implementation-defined factors. 
  32441.  
  32442.    9. (20) Attaching a protected procedure whose ceiling is below the interrupt 
  32443.       hardware priority to an interrupt causes the execution of the program to 
  32444.       be erroneous, see C.3.1. 
  32445.  
  32446.   10. (21) On a single processor implementation, the ceiling priority rules 
  32447.       guarantee that there is no possibility of deadlock involving only 
  32448.       protected subprograms (excluding the case where a protected operation 
  32449.       calls another protected operation on the same protected object). 
  32450.  
  32451.  
  32452. ΓòÉΓòÉΓòÉ 20.4. Entry Queuing Policies ΓòÉΓòÉΓòÉ
  32453.  
  32454.    1. This clause specifies a mechanism for a user to choose an entry queuing 
  32455.       policy. It also defines one such policy. Other policies are 
  32456.       implementation defined. 
  32457.  
  32458.             Syntax
  32459.  
  32460.    2. The form of a pragma Queuing_Policy is as follows: 
  32461.  
  32462.          3.
  32463.  
  32464.                       pragma Queuing_Policy(policy_identifier);
  32465.  
  32466.   Legality Rules
  32467.  
  32468.    4. The policy_identifier shall be either FIFO_Queuing, Priority_Queuing or 
  32469.       an implementation-defined identifier. 
  32470.  
  32471.             Post-Compilation Rules
  32472.  
  32473.    5. A Queuing_Policy pragma is a configuration pragma. 
  32474.  
  32475.             Dynamic Semantics
  32476.  
  32477.    6. A queuing policy governs the order in which tasks are queued for entry 
  32478.       service, and the order in which different entry queues are considered for 
  32479.       service. The queuing policy is specified by a Queuing_Policy pragma. 
  32480.  
  32481.    7. Two queuing policies, FIFO_Queuing and Priority_Queuing, are language 
  32482.       defined. If no Queuing_Policy pragma appears in any of the program units 
  32483.       comprising the partition, the queuing policy for that partition is 
  32484.       FIFO_Queuing. The rules for this policy are specified in 9.5.3, and 
  32485.       9.7.1. 
  32486.  
  32487.    8. The Priority_Queuing policy is defined as follows: 
  32488.  
  32489.         a. The calls to an entry (including a member of an entry family) are 
  32490.            queued in an order consistent with the priorities of the calls. The 
  32491.            priority of an entry call is initialized from the active priority of 
  32492.            the calling task at the time the call is made, but can change later. 
  32493.            Within the same priority, the order is consistent with the calling 
  32494.            (or requeuing, or priority setting) time (that is, a FIFO order). 
  32495.  
  32496.         b. After a call is first queued, changes to the active priority of a 
  32497.            task do not affect the priority of the call, unless the base 
  32498.            priority of the task is set. 
  32499.  
  32500.         c. When the base priority of a task is set, see D.5, if the task is 
  32501.            blocked on an entry call, and the call is queued, the priority of 
  32502.            the call is updated to the new active priority of the calling task. 
  32503.            This causes the call to be removed from and then reinserted in the 
  32504.            queue at the new active priority. 
  32505.  
  32506.         d. When more than one condition of an entry_barrier of a protected 
  32507.            object becomes True, and more than one of the respective queues is 
  32508.            nonempty, the call with the highest priority is selected. If more 
  32509.            than one such call has the same priority, the call that is queued on 
  32510.            the entry whose declaration is first in textual order in the 
  32511.            protected_definition is selected. For members of the same entry 
  32512.            family, the one with the lower family index is selected. 
  32513.  
  32514.         e. If the expiration time of two or more open delay_alternatives is the 
  32515.            same and no other accept_alternatives are open, the 
  32516.            sequence_of_statements of the delay_alternative that is first in 
  32517.            textual order in the selective_accept is executed. 
  32518.  
  32519.         f. When more than one alternative of a selective_accept is open and has 
  32520.            queued calls, an alternative whose queue has the highest-priority 
  32521.            call at its head is selected. If two or more open alternatives have 
  32522.            equal-priority queued calls, then a call on the entry in the 
  32523.            accept_alternative that is first in textual order in the 
  32524.            selective_accept is selected. 
  32525.  
  32526.   Implementation Permissions
  32527.  
  32528.    1. Implementations are allowed to define other queuing policies, but need 
  32529.       not support more than one such policy per partition. 
  32530.  
  32531.             Implementation Advice
  32532.  
  32533.    2. The implementation should use names that end with ``_Queuing'' for 
  32534.       implementation-defined queuing policies. 
  32535.  
  32536.  
  32537. ΓòÉΓòÉΓòÉ 20.5. Dynamic Priorities ΓòÉΓòÉΓòÉ
  32538.  
  32539.    1. This clause specifies how the base priority of a task can be modified or 
  32540.       queried at run time. 
  32541.  
  32542.             Static Semantics
  32543.  
  32544.    2. The following language-defined library package exists: 
  32545.  
  32546.          3.
  32547.  
  32548.                       with System;
  32549.                       with Ada.Task_Identification; --  see C.7.1.
  32550.                       package Ada.Dynamic_Priorities is
  32551.  
  32552.          4.
  32553.  
  32554.                         procedure Set_Priority
  32555.                          (Priority : in System.Any_Priority;
  32556.                          T     : in Ada.Task_Identification.Task_ID :=
  32557.                           Ada.Task_Identification.Current_Task);
  32558.  
  32559.          5.
  32560.  
  32561.                         function Get_Priority
  32562.                          (T : Ada.Task_Identification.Task_ID :=
  32563.                           Ada.Task_Identification.Current_Task)
  32564.                          return System.Any_Priority;
  32565.  
  32566.          6.
  32567.  
  32568.                       end Ada.Dynamic_Priorities;
  32569.  
  32570.   Dynamic Semantics
  32571.  
  32572.    7. The procedure Set_Priority sets the base priority of the specified task 
  32573.       to the specified Priority value. Set_Priority has no effect if the task 
  32574.       is terminated. 
  32575.  
  32576.    8. The function Get_Priority returns T's current base priority. 
  32577.       Tasking_Error is raised if the task is terminated. 
  32578.  
  32579.    9. Program_Error is raised by Set_Priority and Get_Priority if T is equal to 
  32580.       Null_Task_ID. 
  32581.  
  32582.   10. Setting the task's base priority to the new value takes place as soon as 
  32583.       is practical but not while the task is performing a protected action. 
  32584.       This setting occurs no later then the next abort completion point of the 
  32585.       task T, see 9.8. 
  32586.  
  32587.             Bounded (Run-Time) Errors
  32588.  
  32589.   11. If a task is blocked on a protected entry call, and the call is queued, 
  32590.       it is a bounded error to raise its base priority above the ceiling 
  32591.       priority of the corresponding protected object. When an entry call is 
  32592.       cancelled, it is a bounded error if the priority of the calling task is 
  32593.       higher than the ceiling priority of the corresponding protected object. 
  32594.       In either of these cases, either Program_Error is raised in the task that 
  32595.       called the entry, or its priority is temporarily lowered, or both, or 
  32596.       neither. 
  32597.  
  32598.             Erroneous Execution
  32599.  
  32600.   12. If any subprogram in this package is called with a parameter T that 
  32601.       specifies a task object that no longer exists, the execution of the 
  32602.       program is erroneous. 
  32603.  
  32604.             Metrics
  32605.  
  32606.   13. The implementation shall document the following metric: 
  32607.  
  32608.         a. The execution time of a call to Set_Priority, for the nonpreempting 
  32609.            case, in processor clock cycles. This is measured for a call that 
  32610.            modifies the priority of a ready task that is not running (which 
  32611.            cannot be the calling one), where the new base priority of the 
  32612.            affected task is lower than the active priority of the calling task, 
  32613.            and the affected task is not on any entry queue and is not executing 
  32614.            a protected operation. 
  32615.   NOTES 
  32616.  
  32617.    1. (22) Setting a task's base priority affects task dispatching. First, it 
  32618.       can change the task's active priority. Second, under the standard task 
  32619.       dispatching policy it always causes the task to move to the tail of the 
  32620.       ready queue corresponding to its active priority, even if the new base 
  32621.       priority is unchanged. 
  32622.  
  32623.    2. (23) Under the priority queuing policy, setting a task's base priority 
  32624.       has an effect on a queued entry call if the task is blocked waiting for 
  32625.       the call. That is, setting the base priority of a task causes the 
  32626.       priority of a queued entry call from that task to be updated and the call 
  32627.       to be removed and then reinserted in the entry queue at the new priority, 
  32628.       see D.4, unless the call originated from the triggering_statement of an 
  32629.       asynchronous_select. 
  32630.  
  32631.    3. (24) The effect of two or more Set_Priority calls executed in parallel on 
  32632.       the same task is defined as executing these calls in some serial order. 
  32633.  
  32634.    4. (25) The rule for when Tasking_Error is raised for Set_Priority or 
  32635.       Get_Priority is different from the rule for when Tasking_Error is raised 
  32636.       on an entry call, see 9.5.3. In particular, setting or querying the 
  32637.       priority of a completed or an abnormal task is allowed, so long as the 
  32638.       task is not yet terminated. 
  32639.  
  32640.    5. (26) Changing the priorities of a set of tasks can be performed by a 
  32641.       series of calls to Set_Priority for each task separately. For this to 
  32642.       work reliably, it should be done within a protected operation that has 
  32643.       high enough ceiling priority to guarantee that the operation completes 
  32644.       without being preempted by any of the affected tasks. 
  32645.  
  32646.  
  32647. ΓòÉΓòÉΓòÉ 20.6. Preemptive Abort ΓòÉΓòÉΓòÉ
  32648.  
  32649.    1. This clause specifies requirements on the immediacy with which an aborted 
  32650.       construct is completed. 
  32651.  
  32652.             Dynamic Semantics
  32653.  
  32654.    2. On a system with a single processor, an aborted construct is completed 
  32655.       immediately at the first point that is outside the execution of an 
  32656.       abort-deferred operation. 
  32657.  
  32658.             Documentation Requirements
  32659.  
  32660.    3. On a multiprocessor, the implementation shall document any conditions 
  32661.       that cause the completion of an aborted construct to be delayed later 
  32662.       than what is specified for a single processor. 
  32663.  
  32664.             Metrics
  32665.  
  32666.    4. The implementation shall document the following metrics: 
  32667.  
  32668.         a. The execution time, in processor clock cycles, that it takes for an 
  32669.            abort_statement to cause the completion of the aborted task. This is 
  32670.            measured in a situation where a task T2 preempts task T1 and aborts 
  32671.            T1. T1 does not have any finalization code. T2 shall verify that T1 
  32672.            has terminated, by means of the Terminated attribute. 
  32673.  
  32674.         b. On a multiprocessor, an upper bound in seconds, on the time that the 
  32675.            completion of an aborted task can be delayed beyond the point that 
  32676.            it is required for a single processor. 
  32677.  
  32678.         c. An upper bound on the execution time of an asynchronous_select, in 
  32679.            processor clock cycles. This is measured between a point immediately 
  32680.            before a task T1 executes a protected operation Pr.Set that makes 
  32681.            the condition of an entry_barrier Pr.Wait true, and the point where 
  32682.            task T2 resumes execution immediately after an entry call to Pr.Wait 
  32683.            in an asynchronous_select. T1 preempts T2 while T2 is executing the 
  32684.            abortable part, and then blocks itself so that T2 can execute. The 
  32685.            execution time of T1 is measured separately, and subtracted. 
  32686.  
  32687.         d. An upper bound on the execution time of an asynchronous_select, in 
  32688.            the case that no asynchronous transfer of control takes place. This 
  32689.            is measured between a point immediately before a task executes the 
  32690.            asynchronous_select with a nonnull abortable part, and the point 
  32691.            where the task continues execution immediately after it. The 
  32692.            execution time of the abortable part is subtracted. 
  32693.  
  32694.   Implementation Advice
  32695.  
  32696.    1. Even though the abort_statement is included in the list of potentially 
  32697.       blocking operations, see 9.5.1, it is recommended that this statement be 
  32698.       implemented in a way that never requires the task executing the 
  32699.       abort_statement to block. 
  32700.  
  32701.    2. On a multi-processor, the delay associated with aborting a task on 
  32702.       another processor should be bounded; the implementation should use 
  32703.       periodic polling, if necessary, to achieve this. 
  32704.  
  32705.       NOTES 
  32706.  
  32707.    3. (27) Abortion does not change the active or base priority of the aborted 
  32708.       task. 
  32709.  
  32710.    4. (28) Abortion cannot be more immediate than is allowed by the rules for 
  32711.       deferral of abortion during finalization and in protected actions. 
  32712.  
  32713.  
  32714. ΓòÉΓòÉΓòÉ 20.7. Tasking Restrictions ΓòÉΓòÉΓòÉ
  32715.  
  32716.    1. This clause defines restrictions that can be used with a pragma 
  32717.       Restrictions, see 13.12, to facilitate the construction of highly 
  32718.       efficient tasking run-time systems. 
  32719.  
  32720.             Static Semantics
  32721.  
  32722.    2. The following restriction_identifiers are language defined: 
  32723.  
  32724.    3. No_Task_Hierarchy 
  32725.  
  32726.                       All (nonenvironment) tasks depend directly on the environment
  32727.                       task of the partition.
  32728.  
  32729.    4. No_Nested_Finalization 
  32730.  
  32731.                       Objects with controlled parts and access types that designate
  32732.                       such objects shall be declared only at library level.
  32733.  
  32734.    5. No_Abort_Statements 
  32735.  
  32736.                       There are no abort_statements, and there are no calls on
  32737.                       Task_Identification.Abort_Task.
  32738.  
  32739.    6. No_Terminate_Alternatives 
  32740.  
  32741.                       There are no selective_accepts with terminate_alternatives.
  32742.  
  32743.    7. No_Task_Allocators 
  32744.  
  32745.                       There are no allocators for task types or types containing
  32746.                       task subcomponents.
  32747.  
  32748.    8. No_Implicit_Heap_Allocations 
  32749.  
  32750.                       There are no operations that implicitly require heap storage
  32751.                       allocation to be performed by the implementation. The
  32752.                       operations that implicitly require heap storage allocation
  32753.                       are implementation defined.
  32754.  
  32755.    9. No_Dynamic_Priorities 
  32756.  
  32757.                       There are no semantic dependences on the package
  32758.                       Dynamic_Priorities.
  32759.  
  32760.   10. No_Asynchronous_Control 
  32761.  
  32762.                       There are no semantic dependences on the package
  32763.                       Asynchronous_Task_Control.
  32764.  
  32765.   11. The following restriction_parameter_identifiers are language defined: 
  32766.  
  32767.   12. Max_Select_Alternatives 
  32768.  
  32769.                       Specifies the maximum number of alternatives in a
  32770.                       selective_accept.
  32771.  
  32772.   13. Max_Task_Entries 
  32773.  
  32774.                       Specifies the maximum number of entries per task. The bounds
  32775.                       of every entry family of a task unit shall be static, or
  32776.                       shall be defined by a discriminant of a subtype whose
  32777.                       corresponding bound is static. A value of zero indicates
  32778.                       that no rendezvous are possible.
  32779.  
  32780.   14. Max_Protected_Entries 
  32781.  
  32782.                       Specifies the maximum number of entries per protected type.
  32783.                       The bounds of every entry family of a protected unit shall be
  32784.                       static, or shall be defined by a discriminant of a subtype
  32785.                       whose corresponding bound is static.
  32786.  
  32787.   Dynamic Semantics
  32788.  
  32789.   15. If the following restrictions are violated, the behavior is 
  32790.       implementation defined. If an implementation chooses to detect such a 
  32791.       violation, Storage_Error should be raised. 
  32792.  
  32793.   16. The following restriction_parameter_identifiers are language defined: 
  32794.  
  32795.   17. Max_Storage_At_Blocking 
  32796.  
  32797.                       Specifies the maximum portion (in storage elements) of a
  32798.                       task's Storage_Size that can be retained by a blocked task.
  32799.  
  32800.   18. Max_Asynchronous_Select_Nesting 
  32801.  
  32802.                       Specifies the maximum dynamic nesting level of
  32803.                       asynchronous_selects. A value of zero prevents the use of any
  32804.                       asynchronous_select.
  32805.  
  32806.   19. Max_Tasks 
  32807.  
  32808.                       Specifies the maximum number of task creations that may be
  32809.                       executed over the lifetime of a partition, not counting the
  32810.                       creation of the environment task.
  32811.  
  32812.   20. It is implementation defined whether the use of pragma Restrictions 
  32813.       results in a reduction in executable program size, storage requirements, 
  32814.       or execution time. If possible, the implementation should provide 
  32815.       quantitative descriptions of such effects for each restriction. 
  32816.  
  32817.             Implementation Advice
  32818.  
  32819.   21. When feasible, the implementation should take advantage of the specified 
  32820.       restrictions to produce a more efficient implementation. 
  32821.  
  32822.       NOTES 
  32823.  
  32824.   22. (29) The above Storage_Checks can be suppressed with pragma Suppress. 
  32825.  
  32826.  
  32827. ΓòÉΓòÉΓòÉ 20.8. Monotonic Time ΓòÉΓòÉΓòÉ
  32828.  
  32829.    1. This clause specifies a high-resolution, monotonic clock package. 
  32830.  
  32831.             Static Semantics
  32832.  
  32833.    2. The following language-defined library package exists: 
  32834.  
  32835.          3.
  32836.  
  32837.                       package Ada.Real_Time is
  32838.  
  32839.          4.
  32840.  
  32841.                         type Time is private;
  32842.                        Time_First : constant Time;
  32843.                        Time_Last : constant Time;
  32844.                        Time_Unit : constant := implementation-defined-real-number;
  32845.  
  32846.          1.
  32847.  
  32848.                         type Time_Span is private;
  32849.                        Time_Span_First : constant Time_Span;
  32850.                        Time_Span_Last : constant Time_Span;
  32851.                        Time_Span_Zero : constant Time_Span;
  32852.                        Time_Span_Unit : constant Time_Span;
  32853.  
  32854.          2.
  32855.  
  32856.                         Tick : constant Time_Span;
  32857.                        function Clock return Time;
  32858.  
  32859.          3.
  32860.  
  32861.                         function "+" (Left : Time; Right : Time_Span) return Time;
  32862.                        function "+" (Left : Time_Span; Right : Time) return Time;
  32863.                        function "-" (Left : Time; Right : Time_Span) return Time;
  32864.                        function "-" (Left : Time; Right : Time) return Time_Span;
  32865.  
  32866.          4.
  32867.  
  32868.                         function "<" (Left, Right : Time) return Boolean;
  32869.                        function "<="(Left, Right : Time) return Boolean;
  32870.                        function ">" (Left, Right : Time) return Boolean;
  32871.                        function ">="(Left, Right : Time) return Boolean;
  32872.  
  32873.          5.
  32874.  
  32875.                         function "+" (Left, Right : Time_Span) return Time_Span;
  32876.                        function "-" (Left, Right : Time_Span) return Time_Span;
  32877.                        function "-" (Right : Time_Span) return Time_Span;
  32878.                        function "*" (Left : Time_Span; Right : Integer) return Time_Span;
  32879.                        function "*" (Left : Integer; Right : Time_Span) return Time_Span;
  32880.                        function "/" (Left, Right : Time_Span) return Integer;
  32881.                        function "/" (Left : Time_Span; Right : Integer) return Time_Span;
  32882.  
  32883.          6.
  32884.  
  32885.                         function "abs"(Right : Time_Span) return Time_Span;
  32886.  
  32887.          7.
  32888.  
  32889.                         function "<" (Left, Right : Time_Span) return Boolean;
  32890.                        function "<="(Left, Right : Time_Span) return Boolean;
  32891.                        function ">" (Left, Right : Time_Span) return Boolean;
  32892.                        function ">="(Left, Right : Time_Span) return Boolean;
  32893.  
  32894.          8.
  32895.  
  32896.                         function To_Duration (TS : Time_Span) return Duration;
  32897.                        function To_Time_Span (D : Duration) return Time_Span;
  32898.  
  32899.          9.
  32900.  
  32901.                         function Nanoseconds  (NS : Integer) return Time_Span;
  32902.                        function Microseconds (US : Integer) return Time_Span;
  32903.                        function Milliseconds (MS : Integer) return Time_Span;
  32904.  
  32905.         10.
  32906.  
  32907.                         type Seconds_Count is range implementation-defined;
  32908.  
  32909.         11.
  32910.  
  32911.                         procedure Split(T  : in   Time;
  32912.                                SC :   out Seconds_Count;
  32913.                                TS :   out Time_Span);
  32914.                        function Time_Of(SC : Seconds_Count; TS : Time_Span) return Time;
  32915.  
  32916.         12.
  32917.  
  32918.                       private
  32919.                         ┬╖┬╖┬╖ -- not specified by the language
  32920.                       end Ada.Real_Time;
  32921.  
  32922.   13. In this Annex, real time is defined to be the physical time as observed 
  32923.       in the external environment. The type Time is a time type as defined by 
  32924.       9.6, values of this type may be used in a delay_until_statement. Values 
  32925.       of this type represent segments of an ideal time line. The set of values 
  32926.       of the type Time corresponds one-to-one with an implementation-defined 
  32927.       range of mathematical integers. 
  32928.  
  32929.   14. The Time value I represents the half-open real time interval that starts 
  32930.       with E+I*Time_Unit and is limited by E+(I+1)*Time_Unit, where Time_Unit 
  32931.       is an implementation-defined real number and E is an unspecified origin 
  32932.       point, the epoch, that is the same for all values of the type Time. It is 
  32933.       not specified by the language whether the time values are synchronized 
  32934.       with any standard time reference. For example, E can correspond to the 
  32935.       time of system initialization or it can correspond to the epoch of some 
  32936.       time standard. 
  32937.  
  32938.   15. Values of the type Time_Span represent length of real time duration. The 
  32939.       set of values of this type corresponds one-to-one with an 
  32940.       implementation-defined range of mathematical integers. The Time_Span 
  32941.       value corresponding to the integer I represents the real-time duration 
  32942.       I*Time_Unit. 
  32943.  
  32944.   16. Time_First and Time_Last are the smallest and largest values of the Time 
  32945.       type, respectively. Similarly, Time_Span_First and Time_Span_Last are the 
  32946.       smallest and largest values of the Time_Span type, respectively. 
  32947.  
  32948.   17. A value of type Seconds_Count represents an elapsed time, measured in 
  32949.       seconds, since the epoch. 
  32950.  
  32951.             Dynamic Semantics
  32952.  
  32953.   18. Time_Unit is the smallest amount of real time representable by the Time 
  32954.       type; it is expressed in seconds. Time_Span_Unit is the difference 
  32955.       between two successive values of the Time type. It is also the smallest 
  32956.       positive value of type Time_Span. Time_Unit and Time_Span_Unit represent 
  32957.       the same real time duration. A clock tick is a real time interval during 
  32958.       which the clock value (as observed by calling the Clock function) remains 
  32959.       constant. Tick is the average length of such intervals. 
  32960.  
  32961.   19. The function To_Duration converts the value TS to a value of type 
  32962.       Duration. Similarly, the function To_Time_Span converts the value D to a 
  32963.       value of type Time_Span. For both operations, the result is rounded to 
  32964.       the nearest exactly representable value (away from zero if exactly 
  32965.       halfway between two exactly representable values). 
  32966.  
  32967.   20. To_Duration(Time_Span_Zero) returns 0.0, and To_Time_Span(0.0) returns 
  32968.       Time_Span_Zero. 
  32969.  
  32970.   21. The functions Nanoseconds, Microseconds, and Milliseconds convert the 
  32971.       input parameter to a value of the type Time_Span. NS, US, and MS are 
  32972.       interpreted as a number of nanoseconds, microseconds, and milliseconds 
  32973.       respectively. The result is rounded to the nearest exactly representable 
  32974.       value (away from zero if exactly halfway between two exactly 
  32975.       representable values). 
  32976.  
  32977.   22. The effects of the operators on Time and Time_Span are as for the 
  32978.       operators defined for integer types. 
  32979.  
  32980.   23. The function Clock returns the amount of time since the epoch. 
  32981.  
  32982.   24. The effects of the Split and Time_Of operations are defined as follows, 
  32983.       treating values of type Time, Time_Span, and Seconds_Count as 
  32984.       mathematical integers. The effect of Split(T,SC,TS) is to set SC and TS 
  32985.       to values such that T*Time_Unit = SC*1.0 + TS*Time_Unit, and 0.0 <= 
  32986.       TS*Time_Unit < 1.0. The value returned by Time_Of(SC,TS) is the value T 
  32987.       such that T*Time_Unit = SC*1.0 + TS*Time_Unit. 
  32988.  
  32989.             Implementation Requirements
  32990.  
  32991.   25. The range of Time values shall be sufficient to uniquely represent the 
  32992.       range of real times from program start-up to 50 years later. Tick shall 
  32993.       be no greater than 1 millisecond. Time_Unit shall be less than or equal 
  32994.       to 20 microseconds. 
  32995.  
  32996.   26. Time_Span_First shall be no greater than -3600 seconds, and 
  32997.       Time_Span_Last shall be no less than 3600 seconds. 
  32998.  
  32999.   27. A clock jump is the difference between two successive distinct values of 
  33000.       the clock (as observed by calling the Clock function). There shall be no 
  33001.       backward clock jumps. 
  33002.  
  33003.             Documentation Requirements
  33004.  
  33005.   28. The implementation shall document the values of Time_First, Time_Last, 
  33006.       Time_Span_First, Time_Span_Last, Time_Span_Unit, and Tick. 
  33007.  
  33008.   29. The implementation shall document the properties of the underlying time 
  33009.       base used for the clock and for type Time, such as the range of values 
  33010.       supported and any relevant aspects of the underlying hardware or 
  33011.       operating system facilities used. 
  33012.  
  33013.   30. The implementation shall document whether or not there is any 
  33014.       synchronization with external time references, and if such 
  33015.       synchronization exists, the sources of synchronization information, the 
  33016.       frequency of synchronization, and the synchronization method applied. 
  33017.  
  33018.   31. The implementation shall document any aspects of the the external 
  33019.       environment that could interfere with the clock behavior as defined in 
  33020.       this clause. 
  33021.  
  33022.             Metrics
  33023.  
  33024.   32. For the purpose of the metrics defined in this clause, real time is 
  33025.       defined to be the International Atomic Time (TAI). 
  33026.  
  33027.   33. The implementation shall document the following metrics: 
  33028.  
  33029.                    a.
  33030.  
  33031.                       An upper bound on the real-time duration of a clock tick. This is
  33032.                       a value D such that if t1 and t2 are any real times such that t1 <
  33033.                       t2 and Clock  = Clock  then t2 - t1 <= D.
  33034.                             t1     t2
  33035.  
  33036.         b. An upper bound on the size of a clock jump. 
  33037.  
  33038.         c. An upper bound on the drift rate of Clock with respect to real time. 
  33039.            This is a real number D such that 
  33040.  
  33041.                    d.
  33042.  
  33043.                       E*(1-D) <= (Clock   - Clock ) <= E*(1+D)
  33044.                                t+E     t
  33045.                       provided that: Clock  + E*(1+D) <= Time_Last.
  33046.                                 t
  33047.  
  33048.                    e.
  33049.  
  33050.                       where Clock  is the value of Clock at time t, and E is a real time
  33051.                             t
  33052.                       time duration not less than 24 hours. The value of E used for this
  33053.                       metric shall be reported.
  33054.  
  33055.         f. An upper bound on the execution time of a call to the Clock 
  33056.            function, in processor clock cycles. 
  33057.  
  33058.         g. Upper bounds on the execution times of the operators of the types 
  33059.            Time and Time_Span, in processor clock cycles. 
  33060.  
  33061.   Implementation Permissions
  33062.  
  33063.    1. Implementations targeted to machines with word size smaller than 32 bits 
  33064.       need not support the full range and granularity of the Time and Time_Span 
  33065.       types. 
  33066.  
  33067.             Implementation Advice
  33068.  
  33069.    2. When appropriate, implementations should provide configuration mechanisms 
  33070.       to change the value of Tick. 
  33071.  
  33072.    3. It is recommended that Calendar.Clock and Real_Time.Clock be implemented 
  33073.       as transformations of the same time base. 
  33074.  
  33075.    4. It is recommended that the ``best'' time base which exists in the 
  33076.       underlying system be available to the application through Clock. ``Best'' 
  33077.       may mean highest accuracy or largest range. 
  33078.  
  33079.       NOTES 
  33080.  
  33081.    5. (30) The rules in this clause do not imply that the implementation can 
  33082.       protect the user from operator or installation errors which could result 
  33083.       in the clock being set incorrectly. 
  33084.  
  33085.    6. (31) Time_Unit is the granularity of the Time type. In contrast, Tick 
  33086.       represents the granularity of Real_Time.Clock. There is no requirement 
  33087.       that these be the same. 
  33088.  
  33089.  
  33090. ΓòÉΓòÉΓòÉ 20.9. Delay Accuracy ΓòÉΓòÉΓòÉ
  33091.  
  33092.    1. This clause specifies performance requirements for the delay_statement. 
  33093.       The rules apply both to delay_relative_statement and to 
  33094.       delay_until_statement. Similarly, they apply equally to a simple 
  33095.       delay_statement and to one which appears in a delay_alternative. 
  33096.  
  33097.             Dynamic Semantics
  33098.  
  33099.    2. The effect of the delay_statement for Real_Time.Time is defined in terms 
  33100.       of Real_Time.Clock: 
  33101.  
  33102.                    a.
  33103.  
  33104.                       If C  is a value of Clock read before a task executes a
  33105.                         1
  33106.                       delay_relative_statement with duration D, and C  is a value of Clock
  33107.                                               2
  33108.                       read after the task resumes execution following that delay_statement,
  33109.                       then C  - C  >= D.
  33110.                          2   1
  33111.  
  33112.         b. If C is a value of Clock read after a task resumes execution 
  33113.            following a delay_until_statement with Real_Time.Time value T, then 
  33114.            C >= T. 
  33115.  
  33116.    1. A simple delay_statement with a negative or zero value for the expiration 
  33117.       time does not cause the calling task to be blocked; it is nevertheless a 
  33118.       potentially blocking operation, see 9.5.1. 
  33119.  
  33120.    2. When a delay_statement appears in a delay_alternative of a 
  33121.       timed_entry_call the selection of the entry call is attempted, regardless 
  33122.       of the specified expiration time. When a delay_statement appears in a 
  33123.       selective_accept_alternative, and a call is queued on one of the open 
  33124.       entries, the selection of that entry call proceeds, regardless of the 
  33125.       value of the delay expression. 
  33126.  
  33127.             Documentation Requirements
  33128.  
  33129.    3. The implementation shall document the minimum value of the delay 
  33130.       expression of a delay_relative_statement that causes the task to actually 
  33131.       be blocked. 
  33132.  
  33133.    4. The implementation shall document the minimum difference between the 
  33134.       value of the delay expression of a delay_until_statement and the value of 
  33135.       Real_Time.Clock, that causes the task to actually be blocked. 
  33136.  
  33137.             Metrics
  33138.  
  33139.    5. The implementation shall document the following metrics: 
  33140.  
  33141.         a. An upper bound on the execution time, in processor clock cycles, of 
  33142.            a delay_relative_statement whose requested value of the delay 
  33143.            expression is less than or equal to zero. 
  33144.  
  33145.         b. An upper bound on the execution time, in processor clock cycles, of 
  33146.            a delay_until_statement whose requested value of the delay 
  33147.            expression is less than or equal to the value of Real_Time.Clock at 
  33148.            the time of executing the statement. Similarly, for Calendar.Clock. 
  33149.  
  33150.         c. An upper bound on the lateness of a delay_relative_statement, for a 
  33151.            positive value of the delay expression, in a situation where the 
  33152.            task has sufficient priority to preempt the processor as soon as it 
  33153.            becomes ready, and does not need to wait for any other execution 
  33154.            resources. The upper bound is expressed as a function of the value 
  33155.            of the delay expression. The lateness is obtained by subtracting the 
  33156.            value of the delay expression from the actual duration. The actual 
  33157.            duration is measured from a point immediately before a task executes 
  33158.            the delay_statement to a point immediately after the task resumes 
  33159.            execution following this statement. 
  33160.  
  33161.         d. An upper bound on the lateness of a delay_until_statement, in a 
  33162.            situation where the value of the requested expiration time is after 
  33163.            the time the task begins executing the statement, the task has 
  33164.            sufficient priority to preempt the processor as soon as it becomes 
  33165.            ready, and it does not need to wait for any other execution 
  33166.            resources. The upper bound is expressed as a function of the 
  33167.            difference between the requested expiration time and the clock value 
  33168.            at the time the statement begins execution. The lateness of a 
  33169.            delay_until_statement is obtained by subtracting the requested 
  33170.            expiration time from the real time that the task resumes execution 
  33171.            following this statement. 
  33172.   NOTES 
  33173.  
  33174.    1. (32) The execution time of a delay_statement that does not cause the task 
  33175.       to be blocked (e.g. ``delay 0.0;'' ) is of interest in situations where 
  33176.       delays are used to achieve voluntary round-robin task dispatching among 
  33177.       equal-priority tasks. 
  33178.  
  33179.  
  33180. ΓòÉΓòÉΓòÉ 20.10. Synchronous Task Control ΓòÉΓòÉΓòÉ
  33181.  
  33182.    1. This clause describes a language-defined private semaphore (suspension 
  33183.       object), which can be used for two-stage suspend operations and as a 
  33184.       simple building block for implementing higher-level queues. 
  33185.  
  33186.             Static Semantics
  33187.  
  33188.    2. The following language-defined package exists: 
  33189.  
  33190.          3.
  33191.  
  33192.                       package Ada.Synchronous_Task_Control is
  33193.  
  33194.          4.
  33195.  
  33196.                         type Suspension_Object is limited private;
  33197.                        procedure Set_True(S : in out Suspension_Object);
  33198.                        procedure Set_False(S : in out Suspension_Object);
  33199.                        function Current_State(S : Suspension_Object) return Boolean;
  33200.                        procedure Suspend_Until_True(S : in out Suspension_Object);
  33201.                       private
  33202.                          ┬╖┬╖┬╖ -- not specified by the language
  33203.                       end Ada.Synchronous_Task_Control;
  33204.  
  33205.    5. The type Suspension_Object is a by-reference type. 
  33206.  
  33207.             Dynamic Semantics
  33208.  
  33209.    6. An object of the type Suspension_Object has two visible states: true and 
  33210.       false. Upon initialization, its value is set to false. 
  33211.  
  33212.    7. The operations Set_True and Set_False are atomic with respect to each 
  33213.       other and with respect to Suspend_Until_True; they set the state to true 
  33214.       and false respectively. 
  33215.  
  33216.    8. Current_State returns the current state of the object. 
  33217.  
  33218.    9. The procedure Suspend_Until_True blocks the calling task until the state 
  33219.       of the object S is true; at that point the task becomes ready and the 
  33220.       state of the object becomes false. 
  33221.  
  33222.   10. Program_Error is raised upon calling Suspend_Until_True if another task 
  33223.       is already waiting on that suspension object. Suspend_Until_True is a 
  33224.       potentially blocking operation, see 9.5.1. 
  33225.  
  33226.             Implementation Requirements
  33227.  
  33228.   11. The implementation is required to allow the calling of Set_False and 
  33229.       Set_True during any protected action, even one that has its ceiling 
  33230.       priority in the Interrupt_Priority range. 
  33231.  
  33232.  
  33233. ΓòÉΓòÉΓòÉ 20.11. Asynchronous Task Control ΓòÉΓòÉΓòÉ
  33234.  
  33235.    1. This clause introduces a language-defined package to do asynchronous 
  33236.       suspend/resume on tasks. It uses a conceptual held priority value to 
  33237.       represent the task's held state. 
  33238.  
  33239.             Static Semantics
  33240.  
  33241.    2. The following language-defined library package exists: 
  33242.  
  33243.          3.
  33244.  
  33245.                       with Ada.Task_Identification;
  33246.                       package Ada.Asynchronous_Task_Control is
  33247.                        procedure Hold(T : in Ada.Task_Identification.Task_ID);
  33248.                        procedure Continue(T : in Ada.Task_Identification.Task_ID);
  33249.                        function Is_Held(T : Ada.Task_Identification.Task_ID)
  33250.                         return Boolean;
  33251.                       end Ada.Asynchronous_Task_Control;
  33252.  
  33253.   Dynamic Semantics
  33254.  
  33255.    4. After the Hold operation has been applied to a task, the task becomes 
  33256.       held. For each processor there is a conceptual idle task, which is always 
  33257.       ready. The base priority of the idle task is below 
  33258.       System.Any_Priority'First. The held priority is a constant of the type 
  33259.       integer whose value is below the base priority of the idle task. 
  33260.  
  33261.    5. The Hold operation sets the state of T to held. For a held task:  the 
  33262.       task's own base priority does not constitute an inheritance source (see 
  33263.       D.1) and the value of the held priority is defined to be such a source 
  33264.       instead. 
  33265.  
  33266.    6. The Continue operation resets the state of T to not-held; T's active 
  33267.       priority is then reevaluated as described in D.1. This time, T's base 
  33268.       priority is taken into account. 
  33269.  
  33270.    7. The Is_Held function returns True if and only if T is in the held state. 
  33271.  
  33272.    8. As part of these operations, a check is made that the task identified by 
  33273.       T is not terminated. Tasking_Error is raised if the check fails. 
  33274.       Program_Error is raised if the value of T is Null_Task_ID. 
  33275.  
  33276.             Erroneous Execution
  33277.  
  33278.    9. If any operation in this package is called with a parameter T that 
  33279.       specifies a task object that no longer exists, the execution of the 
  33280.       program is erroneous. 
  33281.  
  33282.             Implementation Permissions
  33283.  
  33284.   10. An implementation need not support Asynchronous_Task_Control if it is 
  33285.       infeasible to support it in the target environment. 
  33286.  
  33287.       NOTES 
  33288.  
  33289.   11. (33) It is a consequence of the priority rules that held tasks cannot be 
  33290.       dispatched on any processor in a partition (unless they are inheriting 
  33291.       priorities) since their priorities are defined to be below the priority 
  33292.       of any idle task. 
  33293.  
  33294.   12. (34) The effect of calling Get_Priority and Set_Priority on a Held task 
  33295.       is the same as on any other task. 
  33296.  
  33297.   13. (35) Calling Hold on a held task or Continue on a non-held task has no 
  33298.       effect. 
  33299.  
  33300.   14. (36) The rules affecting queuing are derived from the above rules, in 
  33301.       addition to the normal priority rules: 
  33302.  
  33303.         a. When a held task is on the ready queue, its priority is so low as to 
  33304.            never reach the top of the queue as long as there are other tasks on 
  33305.            that queue. 
  33306.  
  33307.         b. If a task is executing in a protected action, inside a rendezvous, 
  33308.            or is inheriting priorities from other sources (e.g. when 
  33309.            activated), it continues to execute until it is no longer executing 
  33310.            the corresponding construct. 
  33311.  
  33312.         c. If a task becomes held while waiting (as a caller) for a rendezvous 
  33313.            to complete, the active priority of the accepting task is not 
  33314.            affected. 
  33315.  
  33316.         d. If a task becomes held while waiting in a selective_accept, and a 
  33317.            entry call is issued to one of the open entries, the corresponding 
  33318.            accept body executes. When the rendezvous completes, the active 
  33319.            priority of the accepting task is lowered to the held priority 
  33320.            (unless it is still inheriting from other sources), and the task 
  33321.            does not execute until another Continue. 
  33322.  
  33323.         e. The same holds if the held task is the only task on a protected 
  33324.            entry queue whose barrier becomes open. The corresponding entry body 
  33325.            executes. 
  33326.  
  33327.  
  33328. ΓòÉΓòÉΓòÉ 20.12. Other Optimizations and Determinism Rules ΓòÉΓòÉΓòÉ
  33329.  
  33330.    1. This clause describes various requirements for improving the response and 
  33331.       determinism in a real-time system. 
  33332.  
  33333.             Implementation Requirements
  33334.  
  33335.    2. If the implementation blocks interrupts, see C.3, not as a result of 
  33336.       direct user action (e.g. an execution of a protected action) there shall 
  33337.       be an upper bound on the duration of this blocking. 
  33338.  
  33339.    3. The implementation shall recognize entry-less protected types. The 
  33340.       overhead of acquiring the execution resource of an object of such a type, 
  33341.       see 9.5.1, shall be minimized. In particular, there should not be any 
  33342.       overhead due to evaluating entry_barrier conditions. 
  33343.  
  33344.    4. Unchecked_Deallocation shall be supported for terminated tasks that are 
  33345.       designated by access types, and shall have the effect of releasing all 
  33346.       the storage associated with the task. This includes any run-time system 
  33347.       or heap storage that has been implicitly allocated for the task by the 
  33348.       implementation. 
  33349.  
  33350.             Documentation Requirements
  33351.  
  33352.    5. The implementation shall document the upper bound on the duration of 
  33353.       interrupt blocking caused by the implementation. If this is different for 
  33354.       different interrupts or interrupt priority levels, it should be 
  33355.       documented for each case. 
  33356.  
  33357.             Metrics
  33358.  
  33359.    6. The implementation shall document the following metric: 
  33360.  
  33361.         a. The overhead associated with obtaining a mutual-exclusive access to 
  33362.            an entry-less protected object. This shall be measured in the 
  33363.            following way: 
  33364.  
  33365.              1. For a protected object of the form: 
  33366.  
  33367.                              2.
  33368.  
  33369.                       protected Lock is
  33370.                         procedure Set;
  33371.                         function Read return Boolean;
  33372.                       private
  33373.                         Flag : Boolean := False;
  33374.                       end Lock;
  33375.  
  33376.                              3.
  33377.  
  33378.                       protected body Lock is
  33379.                         procedure Set is
  33380.                         begin
  33381.                          Flag := True;
  33382.                         end Set;
  33383.                         function Read return Boolean
  33384.                         Begin
  33385.                          return Flag;
  33386.                         end Read;
  33387.                       end Lock;
  33388.  
  33389.              4. The execution time, in processor clock cycles, of a call to 
  33390.                 Set. This shall be measured between the point just before 
  33391.                 issuing the call, and the point just after the call completes. 
  33392.                 The function Read shall be called later to verify that Set was 
  33393.                 indeed called (and not optimized away). The calling task shall 
  33394.                 have sufficiently high priority as to not be preempted during 
  33395.                 the measurement period. The protected object shall have 
  33396.                 sufficiently high ceiling priority to allow the task to call 
  33397.                 Set. 
  33398.  
  33399.              5. For a multiprocessor, if supported, the metric shall be 
  33400.                 reported for the case where no contention (on the execution 
  33401.                 resource) exists from tasks executing on other processors. 
  33402.  
  33403.  
  33404. ΓòÉΓòÉΓòÉ 21. Distributed Systems (normative) ΓòÉΓòÉΓòÉ
  33405.  
  33406.    1. This Annex defines facilities for supporting the implementation of 
  33407.       distributed systems using multiple partitions working cooperatively as 
  33408.       part of a single Ada program. 
  33409.  
  33410.             Post-Compilation Rules
  33411.  
  33412.    2. A distributed system is an interconnection of one or more processing 
  33413.       nodes (a system resource that has both computational and storage 
  33414.       capabilities), and zero or more storage nodes (a system resource that has 
  33415.       only storage capabilities, with the storage addressable by one or more 
  33416.       processing nodes). 
  33417.  
  33418.    3. A distributed program comprises one or more partitions that execute 
  33419.       independently (except when they communicate) in a distributed system. 
  33420.  
  33421.    4. The process of mapping the partitions of a program to the nodes in a 
  33422.       distributed system is called configuring the partitions of the program. 
  33423.  
  33424.             Implementation Requirements
  33425.  
  33426.    5. The implementation shall provide means for explicitly assigning library 
  33427.       units to a partition and for the configuring and execution of a program 
  33428.       consisting of multiple partitions on a distributed system; the means are 
  33429.       implementation defined. 
  33430.  
  33431.             Implementation Permissions
  33432.  
  33433.    6. An implementation may require that the set of processing nodes of a 
  33434.       distributed system be homogeneous. 
  33435.  
  33436.       NOTES 
  33437.  
  33438.    7. (1) The partitions comprising a program may be executed on differently 
  33439.       configured distributed systems or on a non-distributed system without 
  33440.       requiring recompilation. A distributed program may be partitioned 
  33441.       differently from the same set of library units without recompilation. The 
  33442.       resulting execution is semantically equivalent. 
  33443.  
  33444.    8. (2) A distributed program retains the same type safety as the equivalent 
  33445.       single partition program. 
  33446.  
  33447.  E.1                           Partitions 
  33448.  E.2                           Categorization of Library Units 
  33449.  E.3                           Consistency of a Distributed System 
  33450.  E.4                           Remote Subprogram Calls 
  33451.  E.5                           Partition Communication Subsystem --- The 
  33452.                                Detailed Node Listing --- 
  33453.  E.1                           Partitions 
  33454.  E.2                           Categorization of Library Units 
  33455.  E.2.1                         Shared Passive Library Units 
  33456.  E.2.2                         Remote Types Library Units 
  33457.  E.2.3                         Remote Call Interface Library Units 
  33458.  E.3                           Consistency of a Distributed System 
  33459.  E.4                           Remote Subprogram Calls 
  33460.  E.4.1                         Pragma Asynchronous 
  33461.  E.4.2                         Example of Use of a Remote Access-to-Class-Wide 
  33462.                                Type 
  33463.  E.5                           Partition Communication Subsystem 
  33464.  
  33465.  
  33466. ΓòÉΓòÉΓòÉ 21.1. Partitions ΓòÉΓòÉΓòÉ
  33467.  
  33468.    1. The partitions of a distributed program are classified as either active 
  33469.       or passive. 
  33470.  
  33471.             Post-Compilation Rules
  33472.  
  33473.    2. An active partition is a partition as defined in 10.2. A passive 
  33474.       partition is a partition that has no thread of control of its own, whose 
  33475.       library units are all preelaborated, and whose data and subprograms are 
  33476.       accessible to one or more active partitions. 
  33477.  
  33478.    3. A passive partition shall include only library_items that either are 
  33479.       declared pure or are shared passive, see 10.2.1, and E.2.1. 
  33480.  
  33481.    4. An active partition shall be configured on a processing node. A passive 
  33482.       partition shall be configured either on a storage node or on a processing 
  33483.       node. 
  33484.  
  33485.    5. The configuration of the partitions of a program onto a distributed 
  33486.       system shall be consistent with the possibility for data references or 
  33487.       calls between the partitions implied by their semantic dependences. Any 
  33488.       reference to data or call of a subprogram across partitions is called a 
  33489.       remote access. 
  33490.  
  33491.             Dynamic Semantics
  33492.  
  33493.    6. A library_item is elaborated as part of the elaboration of each partition 
  33494.       that includes it. If a normal library unit, see E.2, has state, then a 
  33495.       separate copy of the state exists in each active partition that 
  33496.       elaborates it. The state evolves independently in each such partition. 
  33497.  
  33498.    7. An active partition terminates when its environment task terminates. A 
  33499.       partition becomes inaccessible if it terminates or if it is aborted. An 
  33500.       active partition is aborted when its environment task is aborted. In 
  33501.       addition, if a partition fails during its elaboration, it becomes 
  33502.       inaccessible to other partitions. Other implementation-defined events can 
  33503.       also result in a partition becoming inaccessible. 
  33504.  
  33505.    8. For a prefix D that denotes a library-level declaration, excepting a 
  33506.       declaration of or within a declared-pure library unit, the following 
  33507.       attribute is defined: 
  33508.  
  33509.    9. D'Partition_ID 
  33510.  
  33511.                       Denotes a value of the type universal_integer that
  33512.                       identifies the partition in which D was elaborated. If D
  33513.                       denotes the declaration of a remote call interface
  33514.                       library unit, see E.2.3, the given partition is the
  33515.                       one where the body of D was elaborated.
  33516.  
  33517.   Bounded (Run-Time) Errors
  33518.  
  33519.   10. It is a bounded error for there to be cyclic elaboration dependences 
  33520.       between the active partitions of a single distributed program. The 
  33521.       possible effects are deadlock during elaboration, or the raising of 
  33522.       Program_Error in one or all of the active partitions involved. 
  33523.  
  33524.             Implementation Permissions
  33525.  
  33526.   11. An implementation may allow multiple active or passive partitions to be 
  33527.       configured on a single processing node, and multiple passive partitions 
  33528.       to be configured on a single storage node. In these cases, the scheduling 
  33529.       policies, treatment of priorities, and management of shared resources 
  33530.       between these partitions are implementation defined. 
  33531.  
  33532.   12. An implementation may allow separate copies of an active partition to be 
  33533.       configured on different processing nodes, and to provide appropriate 
  33534.       interactions between the copies to present a consistent state of the 
  33535.       partition to other active partitions. 
  33536.  
  33537.   13. In an implementation, the partitions of a distributed program need not be 
  33538.       loaded and elaborated all at the same time; they may be loaded and 
  33539.       elaborated one at a time over an extended period of time. An 
  33540.       implementation may provide facilities to abort and reload a partition 
  33541.       during the execution of a distributed program. 
  33542.  
  33543.   14. An implementation may allow the state of some of the partitions of a 
  33544.       distributed program to persist while other partitions of the program 
  33545.       terminate and are later reinvoked. 
  33546.  
  33547.       NOTES 
  33548.  
  33549.   15. (3) Library units are grouped into partitions after compile time, but 
  33550.       before run time. At compile time, only the relevant library unit 
  33551.       properties are identified using categorization pragmas. 
  33552.  
  33553.   16. (4) The value returned by the Partition_ID attribute can be used as a 
  33554.       parameter to implementation-provided subprograms in order to query 
  33555.       information about the partition. 
  33556.  
  33557.  
  33558. ΓòÉΓòÉΓòÉ 21.2. Categorization of Library Units ΓòÉΓòÉΓòÉ
  33559.  
  33560.    1. Library units can be categorized according to the role they play in a 
  33561.       distributed program. Certain restrictions are associated with each 
  33562.       category to ensure that the semantics of a distributed program remain 
  33563.       close to the semantics for a nondistributed program. 
  33564.  
  33565.    2. A categorization pragma is a library unit pragma, see 10.1.5, that 
  33566.       restricts the declarations, child units, or semantic dependences of the 
  33567.       library unit to which it applies. A categorized library unit is a library 
  33568.       unit to which a categorization pragma applies. 
  33569.  
  33570.    3. The pragmas Shared_Passive, Remote_Types, and Remote_Call_Interface are 
  33571.       categorization pragmas. In addition, for the purposes of this Annex, the 
  33572.       pragma Pure, see 10.2.1 is considered a categorization pragma. 
  33573.  
  33574.    4. A library package or generic library package is called a shared passive 
  33575.       library unit if a Shared_Passive pragma applies to it. A library package 
  33576.       or generic library package is called a remote types library unit if a 
  33577.       Remote_Types pragma applies to it. A library package or generic library 
  33578.       package is called a remote call interface if a Remote_Call_Interface 
  33579.       pragma applies to it. A normal library unit is one to which no 
  33580.       categorization pragma applies. 
  33581.  
  33582.    5. The various categories of library units and the associated restrictions 
  33583.       are described in this clause and its subclauses. The categories are 
  33584.       related hierarchically in that the library units of one category can 
  33585.       depend semantically only on library units of that category or an earlier 
  33586.       one, except that the body of a remote types or remote call interface 
  33587.       library unit is unrestricted. 
  33588.  
  33589.    6. The overall hierarchy (including declared pure) is as follows: 
  33590.  
  33591.    7. Declared Pure 
  33592.  
  33593.                       Can depend only on other declared pure library units;
  33594.  
  33595.    8. Shared Passive 
  33596.  
  33597.                       Can depend only on other shared passive or declared pure
  33598.                       library units;
  33599.  
  33600.    9. Remote Types 
  33601.  
  33602.                       The declaration of the library unit can depend only on other
  33603.                       remote types library units, or one of the above; the body of
  33604.                       the library unit is unrestricted;
  33605.  
  33606.   10. Remote Call Interface 
  33607.  
  33608.                       The declaration of the library unit can depend only on other
  33609.                       remote call interfaces, or one of the above; the body of the
  33610.                       library unit is unrestricted;
  33611.  
  33612.   11. Normal 
  33613.  
  33614.                       Unrestricted.
  33615.  
  33616.   12. Declared pure and shared passive library units are preelaborated. The 
  33617.       declaration of a remote types or remote call interface library unit is 
  33618.       required to be preelaborable. 
  33619.  
  33620.             Implementation Requirements
  33621.  
  33622.   13. For a given library-level type declared in a preelaborated library unit 
  33623.       or in the declaration of a remote types or remote call interface library 
  33624.       unit, the implementation shall choose the same representation for the 
  33625.       type upon each elaboration of the type's declaration for different 
  33626.       partitions of the same program. 
  33627.  
  33628.             Implementation Permissions
  33629.  
  33630.   14. Implementations are allowed to define other categorization pragmas. 
  33631.  
  33632.  E.2.1                         Shared Passive Library Units 
  33633.  E.2.2                         Remote Types Library Units 
  33634.  E.2.3                         Remote Call Interface Library Units 
  33635.  
  33636.  
  33637. ΓòÉΓòÉΓòÉ 21.2.1. Shared Passive Library Units ΓòÉΓòÉΓòÉ
  33638.  
  33639.    1. A shared passive library unit is used for managing global data shared 
  33640.       between active partitions. The restrictions on shared passive library 
  33641.       units prevent the data or tasks of one active partition from being 
  33642.       accessible to another active partition through references implicit in 
  33643.       objects declared in the shared passive library unit. 
  33644.  
  33645.             Syntax
  33646.  
  33647.    2. The form of a pragma Shared_Passive is as follows: 
  33648.  
  33649.          3.
  33650.  
  33651.                       pragma Shared_Passive[(library_unit_name)];
  33652.  
  33653.   Legality Rules
  33654.  
  33655.    4. A shared passive library unit is a library unit to which a Shared_Passive 
  33656.       pragma applies. The following restrictions apply to such a library unit: 
  33657.  
  33658.         a. it shall be preelaborable, see 10.2.1, 
  33659.  
  33660.         b. it shall depend semantically only upon declared pure or shared 
  33661.            passive library units; 
  33662.  
  33663.         c. it shall not contain a library-level declaration of an access type 
  33664.            that designates a class-wide type, task type, or protected type with 
  33665.            entry_declarations; if the shared passive library unit is generic, 
  33666.            it shall not contain a declaration for such an access type unless 
  33667.            the declaration is nested within a body other than a package_body. 
  33668.  
  33669.    1. Notwithstanding the definition of accessibility given in 3.10.2, the 
  33670.       declaration of a library unit P1 is not accessible from within the 
  33671.       declarative region of a shared passive library unit P2, unless the shared 
  33672.       passive library unit P2 depends semantically on P1. 
  33673.  
  33674.             Static Semantics
  33675.  
  33676.    2. A shared passive library unit is preelaborated. 
  33677.  
  33678.             Compilation Rules
  33679.  
  33680.    3. A shared passive library unit shall be assigned to at most one partition 
  33681.       within a given program. 
  33682.  
  33683.    4. Notwithstanding the rule given in 10.2, a compilation unit in a given 
  33684.       partition does not need (in the sense of  10.2.) the shared passive 
  33685.       library units on which it depends semantically to be included in that 
  33686.       same partition; they will typically reside in separate passive 
  33687.       partitions. 
  33688.  
  33689.  
  33690. ΓòÉΓòÉΓòÉ 21.2.2. Remote Types Library Units ΓòÉΓòÉΓòÉ
  33691.  
  33692.    1. A remote types library unit supports the definition of types intended for 
  33693.       use in communication between active partitions. 
  33694.  
  33695.             Syntax
  33696.  
  33697.    2. The form of a pragma Remote_Types is as follows: 
  33698.  
  33699.          3.
  33700.  
  33701.                       pragma Remote_Types[(library_unit_name)];
  33702.  
  33703.   Legality Rules
  33704.  
  33705.    4. A remote types library unit is a library unit to which the pragma 
  33706.       Remote_Types applies. The following restrictions apply to the declaration 
  33707.       of such a library unit: 
  33708.  
  33709.         a. it shall be preelaborable; 
  33710.  
  33711.         b. it shall depend semantically only on declared pure, shared passive, 
  33712.            or other remote types library units; 
  33713.  
  33714.         c. it shall not contain the declaration of any variable within the 
  33715.            visible part of the library unit; 
  33716.  
  33717.         d. if the full view of a type declared in the visible part of the 
  33718.            library unit has a part that is of a non-remote access type, then 
  33719.            that access type, or the type of some part that includes the access 
  33720.            type subcomponent, shall have user-specified Read and Write 
  33721.            attributes. 
  33722.  
  33723.    1. An access type declared in the visible part of a remote types or remote 
  33724.       call interface library unit is called a remote access type. Such a type 
  33725.       shall be either an access-to-subprogram type or a general access type 
  33726.       that designates a class-wide limited private type. 
  33727.  
  33728.    2. The following restrictions apply to the use of a remote 
  33729.       access-to-subprogram type: 
  33730.  
  33731.         a. A value of a remote access-to-subprogram type shall be converted 
  33732.            only to another (subtype-conformant) remote access-to-subprogram 
  33733.            type; 
  33734.  
  33735.         b. The prefix of an Access attribute_reference that yields a value of a 
  33736.            remote access-to-subprogram type shall statically denote a 
  33737.            (subtype-conformant) remote subprogram. 
  33738.  
  33739.    1. The following restrictions apply to the use of a remote 
  33740.       access-to-class-wide type: 
  33741.  
  33742.         a. The primitive subprograms of the corresponding specific limited 
  33743.            private type shall only have access parameters if they are 
  33744.            controlling formal parameters; the types of all the non-controlling 
  33745.            formal parameters shall have Read and Write attributes. 
  33746.  
  33747.         b. A value of a remote access-to-class-wide type shall be explicitly 
  33748.            converted only to another remote access-to-class-wide type; 
  33749.  
  33750.         c. A value of a remote access-to-class-wide type shall be dereferenced 
  33751.            (or implicitly converted to an anonymous access type) only as part 
  33752.            of a dispatching call where the value designates a controlling 
  33753.            operand of the call, see E.4: ``Remote Subprogram Calls'', 
  33754.  
  33755.         d. The Storage_Pool and Storage_Size attributes are not defined for 
  33756.            remote access-to-class-wide types; the expected type for an 
  33757.            allocator shall not be a remote access-to-class-wide type; a remote 
  33758.            access-to-class-wide type shall not be an actual parameter for a 
  33759.            generic formal access type; 
  33760.   NOTES 
  33761.  
  33762.    1. (5) A remote types library unit need not be pure, and the types it 
  33763.       defines may include levels of indirection implemented by using access 
  33764.       types. User-specified Read and Write attributes, see 13.13.2 provide for 
  33765.       sending values of such a type between active partitions, with Write 
  33766.       marshalling the representation, and Read unmarshalling any levels of 
  33767.       indirection. 
  33768.  
  33769.  
  33770. ΓòÉΓòÉΓòÉ 21.2.3. Remote Call Interface Library Units ΓòÉΓòÉΓòÉ
  33771.  
  33772.    1. A remote call interface library unit can be used as an interface for 
  33773.       remote procedure calls (RPCs) (or remote function calls) between active 
  33774.       partitions. 
  33775.  
  33776.             Syntax
  33777.  
  33778.    2. The form of a pragma Remote_Call_Interface is as follows: 
  33779.  
  33780.          3.
  33781.  
  33782.                       pragma Remote_Call_Interface[(library_unit_name)];
  33783.  
  33784.    4. The form of a pragma All_Calls_Remote is as follows: 
  33785.  
  33786.          5.
  33787.  
  33788.                       pragma All_Calls_Remote[(library_unit_name)];
  33789.  
  33790.         a. A pragma All_Calls_Remote is a library unit pragma. 
  33791.  
  33792.   Legality Rules
  33793.  
  33794.    1. A remote call interface (RCI) is a library unit to which the pragma 
  33795.       Remote_Call_Interface applies. A subprogram declared in the visible part 
  33796.       of such a library unit is called a remote subprogram. 
  33797.  
  33798.    2. The declaration of an RCI library unit shall be preelaborable (see 
  33799.       10.2.1) and shall depend semantically only upon declared pure, shared 
  33800.       passive, remote types, or other remote call interface library units. 
  33801.  
  33802.    3. In addition, the following restrictions apply to the visible part of an 
  33803.       RCI library unit: 
  33804.  
  33805.         a. it shall not contain the declaration of a variable; 
  33806.  
  33807.         b. it shall not contain the declaration of a limited type; 
  33808.  
  33809.         c. it shall not contain a nested generic_declaration; 
  33810.  
  33811.         d. it shall not contain the declaration of a subprogram to which a 
  33812.            pragma Inline applies; 
  33813.  
  33814.         e. it shall not contain a subprogram (or access-to-subprogram) 
  33815.            declaration whose profile has an access parameter, or a formal 
  33816.            parameter of a limited type unless that limited type has 
  33817.            user-specified Read and Write attributes; 
  33818.  
  33819.         f. any public child of the library unit shall be a remote call 
  33820.            interface library unit. 
  33821.  
  33822.    1. If a pragma All_Calls_Remote applies to a library unit, the library unit 
  33823.       shall be a remote call interface. 
  33824.  
  33825.             Post-Compilation Rules
  33826.  
  33827.    2. A remote call interface library unit shall be assigned to at most one 
  33828.       partition of a given program. A remote call interface library unit whose 
  33829.       parent is also an RCI library unit shall be assigned only to the same 
  33830.       partition as its parent. 
  33831.  
  33832.    3. Notwithstanding the rule given in 10.2, a compilation unit in a given 
  33833.       partition that semantically depends on the declaration of an RCI library 
  33834.       unit, needs (in the sense of 10.2.) only the declaration of the RCI 
  33835.       library unit, not the body, to be included in that same partition. 
  33836.       Therefore, the body of an RCI library unit is included only in the 
  33837.       partition to which the RCI library unit is explicitly assigned. 
  33838.  
  33839.             Implementation Requirements
  33840.  
  33841.    4. If a pragma All_Calls_Remote applies to a given RCI library package, then 
  33842.       the implementation shall route any call to a subprogram of the RCI 
  33843.       package from outside the declarative region of the package through the 
  33844.       Partition Communication Subsystem (PCS); see E.5. Calls to such 
  33845.       subprograms from within the declarative region of the package are defined 
  33846.       to be local and shall not go through the PCS. 
  33847.  
  33848.             Implementation Permissions
  33849.  
  33850.    5. An implementation need not support the Remote_Call_Interface pragma nor 
  33851.       the All_Calls_Remote pragma. Explicit message-based communication between 
  33852.       active partitions can be supported as an alternative to RPC. 
  33853.  
  33854.  
  33855. ΓòÉΓòÉΓòÉ 21.3. Consistency of a Distributed System ΓòÉΓòÉΓòÉ
  33856.  
  33857.    1. This clause defines attributes and rules associated with verifying the 
  33858.       consistency of a distributed program. 
  33859.  
  33860.             Static Semantics
  33861.  
  33862.    2. For a prefix P that statically denotes a program unit, the following 
  33863.       attributes are defined: 
  33864.  
  33865.    3. P'Version 
  33866.  
  33867.                       Yields a value of the predefined type String that identifies
  33868.                       the version of the compilation unit that contains the
  33869.                       declaration of the program unit.
  33870.  
  33871.    4. P'Body_Version 
  33872.  
  33873.                       Yields a value of the predefined type String that identifies
  33874.                       the version of the compilation unit that contains the body
  33875.                       (but not any subunits) of the program unit.
  33876.  
  33877.    5. The version of a compilation unit changes whenever the version changes 
  33878.       for any compilation unit on which it depends semantically. The version 
  33879.       also changes whenever the compilation unit itself changes in a 
  33880.       semantically significant way. It is implementation defined whether there 
  33881.       are other events (such as recompilation) that result in the version of a 
  33882.       compilation unit changing. 
  33883.  
  33884.             Bounded (Run-Time) Errors
  33885.  
  33886.    6. In a distributed program, a library unit is consistent if the same 
  33887.       version of its declaration is used throughout. It is a bounded error to 
  33888.       elaborate a partition of a distributed program that contains a 
  33889.       compilation unit that depends on a different version of the declaration 
  33890.       of a shared passive or RCI library unit than that included in the 
  33891.       partition to which the shared passive or RCI library unit was assigned. 
  33892.       As a result of this error, Program_Error can be raised in one or both 
  33893.       partitions during elaboration; in any case, the partitions become 
  33894.       inaccessible to one another. 
  33895.  
  33896.  
  33897. ΓòÉΓòÉΓòÉ 21.4. Remote Subprogram Calls ΓòÉΓòÉΓòÉ
  33898.  
  33899.    1. A remote subprogram call is a subprogram call that invokes the execution 
  33900.       of a subprogram in another partition. The partition that originates the 
  33901.       remote subprogram call is the calling partition, and the partition that 
  33902.       executes the corresponding subprogram body is the called partition. Some 
  33903.       remote procedure calls are allowed to return prior to the completion of 
  33904.       subprogram execution. These are called asynchronous remote procedure 
  33905.       calls. 
  33906.  
  33907.    2. There are three different ways of performing a remote subprogram call: 
  33908.  
  33909.         a. As a direct call on a (remote) subprogram explicitly declared in a 
  33910.            remote call interface; 
  33911.  
  33912.         b. As an indirect call through a value of a remote access-to-subprogram 
  33913.            type; 
  33914.  
  33915.         c. As a dispatching call with a controlling operand designated by a 
  33916.            value of a remote access-to-class-wide type. 
  33917.  
  33918.    1. The first way of calling corresponds to a static binding between the 
  33919.       calling and the called partition. The latter two ways correspond to a 
  33920.       dynamic binding between the calling and the called partition. 
  33921.  
  33922.    2. A remote call interface library unit, see E.2.3, defines the remote 
  33923.       subprograms or remote access types used for remote subprogram calls. 
  33924.  
  33925.             Legality Rules
  33926.  
  33927.    3. In a dispatching call with two or more controlling operands, if one 
  33928.       controlling operand is designated by a value of a remote 
  33929.       access-to-class-wide type, then all shall be. 
  33930.  
  33931.             Dynamic Semantics
  33932.  
  33933.    4. For the execution of a remote subprogram call, subprogram parameters (and 
  33934.       later the results, if any) are passed using a stream-oriented 
  33935.       representation, see 13.13.1, which is suitable for transmission between 
  33936.       partitions. This action is called marshalling. Unmarshalling is the 
  33937.       reverse action of reconstructing the parameters or results from the 
  33938.       stream-oriented representation. Marshalling is performed initially as 
  33939.       part of the remote subprogram call in the calling partition; 
  33940.       unmarshalling is done in the called partition. After the remote 
  33941.       subprogram completes, marshalling is performed in the called partition, 
  33942.       and finally unmarshalling is done in the calling partition. 
  33943.  
  33944.    5. A calling stub is the sequence of code that replaces the subprogram body 
  33945.       of a remotely called subprogram in the calling partition. A receiving 
  33946.       stub is the sequence of code (the ``wrapper'') that receives a remote 
  33947.       subprogram call on the called partition and invokes the appropriate 
  33948.       subprogram body. 
  33949.  
  33950.    6. Remote subprogram calls are executed at most once, that is, if the 
  33951.       subprogram call returns normally, then the called subprogram's body was 
  33952.       executed exactly once. 
  33953.  
  33954.    7. The task executing a remote subprogram call blocks until the subprogram 
  33955.       in the called partition returns, unless the call is asynchronous. For an 
  33956.       asynchronous remote procedure call, the calling task can become ready 
  33957.       before the procedure in the called partition returns. 
  33958.  
  33959.    8. If a construct containing a remote call is aborted, the remote subprogram 
  33960.       call is cancelled. Whether the execution of the remote subprogram is 
  33961.       immediately aborted as a result of the cancellation is implementation 
  33962.       defined. 
  33963.  
  33964.    9. If a remote subprogram call is received by a called partition before the 
  33965.       partition has completed its elaboration, the call is kept pending until 
  33966.       the called partition completes its elaboration (unless the call is 
  33967.       cancelled by the calling partition prior to that). 
  33968.  
  33969.   10. If an exception is propagated by a remotely called subprogram, and the 
  33970.       call is not an asynchronous call, the corresponding exception is reraised 
  33971.       at the point of the remote subprogram call. For an asynchronous call, if 
  33972.       the remote procedure call returns prior to the completion of the remotely 
  33973.       called subprogram, any exception is lost. 
  33974.  
  33975.   11. The exception Communication_Error, see E.5 is raised if a remote call 
  33976.       cannot be completed due to difficulties in communicating with the called 
  33977.       partition. 
  33978.  
  33979.   12. All forms of remote subprogram calls are potentially blocking operations, 
  33980.       see 9.5.1. 
  33981.  
  33982.   13. In a remote subprogram call with a formal parameter of a class-wide type, 
  33983.       a check is made that the tag of the actual parameter identifies a tagged 
  33984.       type declared in a declared-pure or shared passive library unit, or in 
  33985.       the visible part of a remote types or remote call interface library unit. 
  33986.       Program_Error is raised if this check fails. 
  33987.  
  33988.   14. In a dispatching call with two or more controlling operands that are 
  33989.       designated by values of a remote access-to-class-wide type, a check is 
  33990.       made (in addition to the normal Tag_Check --  see 11.5.) that all the 
  33991.       remote access-to-class-wide values originated from Access 
  33992.       attribute_references that were evaluated by tasks of the same active 
  33993.       partition. Constraint_Error is raised if this check fails. 
  33994.  
  33995.             Implementation Requirements
  33996.  
  33997.   15. The implementation of remote subprogram calls shall conform to the PCS 
  33998.       interface as defined by the specification of the language-defined package 
  33999.       System.RPC, see E.5. The calling stub shall use the Do_RPC procedure 
  34000.       unless the remote procedure call is asynchronous in which case Do_APC 
  34001.       shall be used. On the receiving side, the corresponding receiving stub 
  34002.       shall be invoked by the RPC-receiver. 
  34003.  
  34004.       NOTES 
  34005.  
  34006.   16. (6) A given active partition can both make and receive remote subprogram 
  34007.       calls. Thus, an active partition can act as both a client and a server. 
  34008.  
  34009.   17. (7) If a given exception is propagated by a remote subprogram call, but 
  34010.       the exception does not exist in the calling partition, the exception can 
  34011.       be handled by an others choice or be propagated to and handled by a third 
  34012.       partition. 
  34013.  
  34014.  E.4.1                         Pragma Asynchronous 
  34015.  E.4.2                         Example of Use of a Remote Access-to-Class-Wide 
  34016.                                Type 
  34017.  
  34018.  
  34019. ΓòÉΓòÉΓòÉ 21.4.1. Pragma Asynchronous ΓòÉΓòÉΓòÉ
  34020.  
  34021.    1. This subclause introduces the pragma Asynchronous which allows a remote 
  34022.       subprogram call to return prior to completion of the execution of the 
  34023.       corresponding remote subprogram body. 
  34024.  
  34025.             Syntax
  34026.  
  34027.    2. The form of a pragma Asynchronous is as follows: 
  34028.  
  34029.          3.
  34030.  
  34031.                       pragma Asynchronous(local_name);
  34032.  
  34033.   Legality Rules
  34034.  
  34035.    4. The local_name of a pragma Asynchronous shall denote either: 
  34036.  
  34037.         a. One or more remote procedures; the formal parameters of the 
  34038.            procedure(s) shall all be of mode in; 
  34039.  
  34040.         b. The first subtype of a remote access-to-procedure type; the formal 
  34041.            parameters of the designated profile of the type shall all be of 
  34042.            mode in; 
  34043.  
  34044.         c. The first subtype of a remote access-to-class-wide type. 
  34045.  
  34046.   Static Semantics
  34047.  
  34048.    1. A pragma Asynchronous is a representation pragma. When applied to a type, 
  34049.       it specifies the type-related asynchronous aspect of the type. 
  34050.  
  34051.             Dynamic Semantics
  34052.  
  34053.    2. A remote call is asynchronous if it is a call to a procedure, or a call 
  34054.       through a value of an access-to-procedure type, to which a pragma 
  34055.       Asynchronous applies. In addition, if a pragma Asynchronous applies to a 
  34056.       remote access-to-class-wide type, then a dispatching call on a procedure 
  34057.       with a controlling operand designated by a value of the type is 
  34058.       asynchronous if the formal parameters of the procedure are all of mode 
  34059.       in. 
  34060.  
  34061.             Implementation Requirements
  34062.  
  34063.    3. Asynchronous remote procedure calls shall be implemented such that the 
  34064.       corresponding body executes at most once as a result of the call. 
  34065.  
  34066.  
  34067. ΓòÉΓòÉΓòÉ 21.4.2. Example of Use of a Remote Access-to-Class-Wide Type ΓòÉΓòÉΓòÉ
  34068.  
  34069.  
  34070.   Examples
  34071.  
  34072.    1. Example of using a remote access-to-class-wide type to achieve dynamic 
  34073.       binding across active partitions: 
  34074.  
  34075.          2.
  34076.  
  34077.                       package Tapes is
  34078.                         pragma Pure(Tapes);
  34079.                         type Tape is abstract tagged limited private;
  34080.                         -- Primitive dispatching operations where
  34081.                         -- Tape is controlling operand
  34082.                         procedure Copy (From, To : access Tape;
  34083.                                 Num_Recs : in Natural) is abstract;
  34084.                         procedure Rewind (T : access Tape) is abstract;
  34085.                         -- More operations
  34086.                       private
  34087.                         type Tape is ┬╖┬╖┬╖
  34088.                       end Tapes;
  34089.  
  34090.          3.
  34091.  
  34092.                       with Tapes;
  34093.                       package Name_Server is
  34094.                         pragma Remote_Call_Interface;
  34095.                         -- Dynamic binding to remote operations is achieved
  34096.                         -- using the access-to-limited-class-wide type Tape_Ptr
  34097.                         type Tape_Ptr is access all Tapes.Tape'Class;
  34098.                         -- The following statically bound remote operations
  34099.                         -- allow for a name-server capability in this example
  34100.                         function  Find   (Name : String) return Tape_Ptr;
  34101.                         procedure Register (Name : in String; T : in Tape_Ptr);
  34102.                         procedure Remove  (T : in Tape_Ptr);
  34103.                         -- More operations
  34104.                       end Name_Server;
  34105.  
  34106.          4.
  34107.  
  34108.                       package Tape_Driver is
  34109.                        -- Declarations are not shown, they are irrelevant here
  34110.                       end Tape_Driver;
  34111.  
  34112.          5.
  34113.  
  34114.                       with Tapes, Name_Server;
  34115.                       package body Tape_Driver is
  34116.                         type New_Tape is new Tapes.Tape with ┬╖┬╖┬╖
  34117.                         procedure Copy
  34118.                         (From, To : access New_Tape; Num_Recs: in Natural) is
  34119.                         begin
  34120.                          . . .
  34121.                         end Copy;
  34122.                         procedure Rewind (T : access New_Tape) is
  34123.                         begin
  34124.                          . . .
  34125.                         end Rewind;
  34126.                         -- Objects remotely accessible through use
  34127.                         -- of Name_Server operations
  34128.                         Tape1, Tape2 : aliased New_Tape;
  34129.                       begin
  34130.                         Name_Server.Register ("NINE-TRACK",  Tape1'Access);
  34131.                         Name_Server.Register ("SEVEN-TRACK", Tape2'Access);
  34132.                       end Tape_Driver;
  34133.  
  34134.          6.
  34135.  
  34136.                       with Tapes, Name_Server;
  34137.                       -- Tape_Driver is not needed
  34138.                       -- and thus not mentioned in the with_clause
  34139.                       procedure Tape_Client is
  34140.                         T1, T2 : Name_Server.Tape_Ptr;
  34141.                       begin
  34142.                         T1 := Name_Server.Find ("NINE-TRACK");
  34143.                         T2 := Name_Server.Find ("SEVEN-TRACK");
  34144.                         Tapes.Rewind (T1);
  34145.                         Tapes.Rewind (T2);
  34146.                         Tapes.Copy (T1, T2, 3);
  34147.                       end Tape_Client;
  34148.  
  34149.    7. Notes on the example: 
  34150.  
  34151.         a. The package Tapes provides the necessary declarations of the type 
  34152.            and its primitive operations. 
  34153.  
  34154.         b. Name_Server is a remote call interface package and is elaborated in 
  34155.            a separate active partition to provide the necessary naming services 
  34156.            (such as Register and Find) to the entire distributed program 
  34157.            through remote subprogram calls. 
  34158.  
  34159.         c. Tape_Driver is a normal package that is elaborated in a partition 
  34160.            configured on the processing node that is connected to the tape 
  34161.            device(s). The abstract operations are overridden to support the 
  34162.            locally declared tape devices (Tape1, Tape2). The package is not 
  34163.            visible to its clients, but it exports the tape devices (as remote 
  34164.            objects) through the services of the Name_Server. This allows for 
  34165.            tape devices to be dynamically added, removed or replaced without 
  34166.            requiring the modification of the clients' code. 
  34167.  
  34168.         d. The Tape_Client procedure references only declarations in the Tapes 
  34169.            and Name_Server packages. Before using a tape for the first time, it 
  34170.            needs to query the Name_Server for a system-wide identity for that 
  34171.            tape. From then on, it can use that identity to access the tape 
  34172.            device. 
  34173.  
  34174.         e. Values of remote access type Tape_Ptr include the necessary 
  34175.            information to complete the remote dispatching operations that 
  34176.            result from dereferencing the controlling operands T1 and T2. 
  34177.  
  34178.  
  34179. ΓòÉΓòÉΓòÉ 21.5. Partition Communication Subsystem ΓòÉΓòÉΓòÉ
  34180.  
  34181.    1. The Partition Communication Subsystem (PCS) provides facilities for 
  34182.       supporting communication between the active partitions of a distributed 
  34183.       program. The package System.RPC is a language-defined interface to the 
  34184.       PCS. An implementation conforming to this Annex shall use the RPC 
  34185.       interface to implement remote subprogram calls. 
  34186.  
  34187.             Static Semantics
  34188.  
  34189.    2. The following language-defined library package exists: 
  34190.  
  34191.          3.
  34192.  
  34193.                       with Ada.Streams; --  see 13.13.1.
  34194.                       package System.RPC is
  34195.  
  34196.          4.
  34197.  
  34198.                         type Partition_ID is range 0 ┬╖┬╖ implementation-defined;
  34199.  
  34200.          5.
  34201.  
  34202.                         Communication_Error : exception;
  34203.  
  34204.          6.
  34205.  
  34206.                         type Params_Stream_Type(
  34207.                          Initial_Size : Ada.Streams.Stream_Element_Count) is new
  34208.                          Ada.Streams.Root_Stream_Type with private;
  34209.  
  34210.          7.
  34211.  
  34212.                         procedure Read(
  34213.                          Stream : in out Params_Stream_Type;
  34214.                          Item : out Ada.Streams.Stream_Element_Array;
  34215.                          Last : out Ada.Streams.Stream_Element_Offset);
  34216.  
  34217.          8.
  34218.  
  34219.                         procedure Write(
  34220.                          Stream : in out Params_Stream_Type;
  34221.                          Item : in Ada.Streams.Stream_Element_Array);
  34222.  
  34223.          9.
  34224.  
  34225.                         -- Synchronous call
  34226.                         procedure Do_RPC(
  34227.                          Partition  : in Partition_ID;
  34228.                          Params   : access Params_Stream_Type;
  34229.                          Result   : access Params_Stream_Type);
  34230.  
  34231.         10.
  34232.  
  34233.                         -- Asynchronous call
  34234.                         procedure Do_APC(
  34235.                          Partition  : in Partition_ID;
  34236.                          Params   : access Params_Stream_Type);
  34237.  
  34238.         11.
  34239.  
  34240.                         -- The handler for incoming RPCs
  34241.                         type RPC_Receiver is access procedure(
  34242.                          Params   : access Params_Stream_Type;
  34243.                          Result   : access Params_Stream_Type);
  34244.  
  34245.         12.
  34246.  
  34247.                         procedure Establish_RPC_Receiver(
  34248.                          Partition : in Partition_ID;
  34249.                          Receiver  : in RPC_Receiver);
  34250.  
  34251.         13.
  34252.  
  34253.                       private
  34254.                         ┬╖┬╖┬╖ -- not specified by the language
  34255.                       end System.RPC;
  34256.  
  34257.   14. A value of the type Partition_ID is used to identify a partition. 
  34258.  
  34259.   15. An object of the type Params_Stream_Type is used for identifying the 
  34260.       particular remote subprogram that is being called, as well as marshalling 
  34261.       and unmarshalling the parameters or result of a remote subprogram call, 
  34262.       as part of sending them between partitions. 
  34263.  
  34264.   16. The Read and Write procedures override the corresponding abstract 
  34265.       operations for the type Params_Stream_Type. 
  34266.  
  34267.             Dynamic Semantics
  34268.  
  34269.   17. The Do_RPC and Do_APC procedures send a message to the active partition 
  34270.       identified by the Partition parameter. 
  34271.  
  34272.   18. After sending the message, Do_RPC blocks the calling task until a reply 
  34273.       message comes back from the called partition or some error is detected by 
  34274.       the underlying communication system in which case Communication_Error is 
  34275.       raised at the point of the call to Do_RPC. 
  34276.  
  34277.   19. Do_APC operates in the same way as Do_RPC except that it is allowed to 
  34278.       return immediately after sending the message. 
  34279.  
  34280.   20. Upon normal return, the stream designated by the Result parameter of 
  34281.       Do_RPC contains the reply message. 
  34282.  
  34283.   21. The procedure System.RPC.Establish_RPC_Receiver is called once, 
  34284.       immediately after elaborating the library units of an active partition 
  34285.       (that is, right after the elaboration of the partition) if the partition 
  34286.       includes an RCI library unit, but prior to invoking the main subprogram, 
  34287.       if any. The Partition parameter is the Partition_ID of the active 
  34288.       partition being elaborated. The Receiver parameter designates an 
  34289.       implementation-provided procedure called the RPC-receiver which will 
  34290.       handle all RPCs received by the partition from the PCS. 
  34291.       Establish_RPC_Receiver saves a reference to the RPC-receiver; when a 
  34292.       message is received at the called partition, the RPC-receiver is called 
  34293.       with the Params stream containing the message. When the RPC-receiver 
  34294.       returns, the contents of the stream designated by Result is placed in a 
  34295.       message and sent back to the calling partition. 
  34296.  
  34297.   22. If a call on Do_RPC is aborted, a cancellation message is sent to the 
  34298.       called partition, to request that the execution of the remotely called 
  34299.       subprogram be aborted. 
  34300.  
  34301.   23. The subprograms declared in System.RPC are potentially blocking 
  34302.       operations. 
  34303.  
  34304.             Implementation Requirements
  34305.  
  34306.   24. The implementation of the RPC-receiver shall be reentrant, thereby 
  34307.       allowing concurrent calls on it from the PCS to service concurrent remote 
  34308.       subprogram calls into the partition. 
  34309.  
  34310.             Documentation Requirements
  34311.  
  34312.   25. The implementation of the PCS shall document whether the RPC-receiver is 
  34313.       invoked from concurrent tasks. If there is an upper limit on the number 
  34314.       of such tasks, this limit shall be documented as well, together with the 
  34315.       mechanisms to configure it (if this is supported). 
  34316.  
  34317.             Implementation Permissions
  34318.  
  34319.   26. The PCS is allowed to contain implementation-defined interfaces for 
  34320.       explicit message passing, broadcasting, etc. Similarly, it is allowed to 
  34321.       provide additional interfaces to query the state of some remote partition 
  34322.       (given its partition ID) or of the PCS itself, to set timeouts and retry 
  34323.       parameters, to get more detailed error status, etc. These additional 
  34324.       interfaces should be provided in child packages of System.RPC. 
  34325.  
  34326.   27. A body for the package System.RPC need not be supplied by the 
  34327.       implementation. 
  34328.  
  34329.             Implementation Advice
  34330.  
  34331.   28. Whenever possible, the PCS on the called partition should allow for 
  34332.       multiple tasks to call the RPC-receiver with different messages and 
  34333.       should allow them to block until the corresponding subprogram body 
  34334.       returns. 
  34335.  
  34336.   29. The Write operation on a stream of type Params_Stream_Type should raise 
  34337.       Storage_Error if it runs out of space trying to write the Item into the 
  34338.       stream. 
  34339.  
  34340.       NOTES 
  34341.  
  34342.   30. (8) The package System.RPC is not designed for direct calls by user 
  34343.       programs. It is instead designed for use in the implementation of remote 
  34344.       subprograms calls, being called by the calling stubs generated for a 
  34345.       remote call interface library unit to initiate a remote call, and in turn 
  34346.       calling back to an RPC-receiver that dispatches to the receiving stubs 
  34347.       generated for the body of a remote call interface, to handle a remote 
  34348.       call received from elsewhere. 
  34349.  
  34350.  
  34351. ΓòÉΓòÉΓòÉ 22. Information Systems (normative) ΓòÉΓòÉΓòÉ
  34352.  
  34353.    1. This Annex provides a set of facilities relevant to Information Systems 
  34354.       programming. These fall into several categories: 
  34355.  
  34356.         a. an attribute definition clause specifying Machine_Radix for a 
  34357.            decimal subtype; 
  34358.  
  34359.         b. the package Decimal, which declares a set of constants defining the 
  34360.            implementation's capacity for decimal types, and a generic procedure 
  34361.            for decimal division; and 
  34362.  
  34363.         c. the child packages Text_IO.Editing and Wide_Text_IO.Editing, which 
  34364.            support formatted and localized output of decimal data, based on 
  34365.            ``picture String'' values. 
  34366.  
  34367.    1. See also:  3.5.9: ``Fixed Point Types'', 3.5.10: ``Operations of Fixed 
  34368.       Point Types'', 4.6: ``Type Conversions'', See 13.3: ``Representation 
  34369.       Attributes'', A.10.9: ``Input-Output for Real Types'', B.4: ``Interfacing 
  34370.       with COBOL'', B.3: ``Interfacing with C'', and G: ``Numerics''. 
  34371.  
  34372.    2. The character and string handling packages in A: ``Predefined Language 
  34373.       Environment'', are also relevant for Information Systems. 
  34374.  
  34375.             Implementation Advice
  34376.  
  34377.    3. If COBOL (respectively, C) is widely supported in the target environment, 
  34378.       implementations supporting the Information Systems Annex should provide 
  34379.       the child package Interfaces.COBOL (respectively, Interfaces.C) specified 
  34380.       in Annex B and should support a convention_identifier of COBOL 
  34381.       (respectively, C) in the interfacing pragmas, see B, thus allowing Ada 
  34382.       programs to interface with programs written in that language. 
  34383.  
  34384.  F.1                           Machine_Radix Attribute Definition Clause 
  34385.  F.2                           The Package Decimal 
  34386.  F.3                           Edited Output for Decimal Types --- The Detailed 
  34387.                                Node Listing --- 
  34388.  F.1                           Machine_Radix Attribute Definition Clause 
  34389.  F.2                           The Package Decimal 
  34390.  F.3                           Edited Output for Decimal Types 
  34391.  F.3.1                         Picture String Formation 
  34392.  F.3.2                         Edited Output Generation 
  34393.  F.3.3                         The Package Text_IO.Editing 
  34394.  F.3.4                         The Package Wide_Text_IO.Editing 
  34395.  
  34396.  
  34397. ΓòÉΓòÉΓòÉ 22.1. Machine_Radix Attribute Definition Clause ΓòÉΓòÉΓòÉ
  34398.  
  34399.  
  34400.   Static Semantics
  34401.  
  34402.    1. Machine_Radix may be specified for a decimal first subtype (see 3.5.9) 
  34403.       via an attribute_definition_clause; the expression of such a clause shall 
  34404.       be static, and its value shall be 2 or 10. A value of 2 implies a binary 
  34405.       base range; a value of 10 implies a decimal base range. 
  34406.  
  34407.             Implementation Advice
  34408.  
  34409.    2. Packed decimal should be used as the internal representation for objects 
  34410.       of subtype S when S'Machine_Radix = 10. 
  34411.  
  34412.             Examples
  34413.  
  34414.    3. Example of Machine_Radix attribute definition clause: 
  34415.  
  34416.          4.
  34417.  
  34418.                       type Money is delta 0.01 digits 15;
  34419.                       for Money'Machine_Radix use 10;
  34420.  
  34421.  
  34422. ΓòÉΓòÉΓòÉ 22.2. The Package Decimal ΓòÉΓòÉΓòÉ
  34423.  
  34424.  
  34425.   Static Semantics
  34426.  
  34427.    1. The library package Decimal has the following declaration: 
  34428.  
  34429.          2.
  34430.  
  34431.                       package Ada.Decimal is
  34432.                         pragma Pure(Decimal);
  34433.  
  34434.          3.
  34435.  
  34436.                         Max_Scale : constant := implementation-defined;
  34437.                         Min_Scale : constant := implementation-defined;
  34438.  
  34439.          4.
  34440.  
  34441.                         Min_Delta : constant := 10.0**(-Max_Scale);
  34442.                         Max_Delta : constant := 10.0**(-Min_Scale);
  34443.  
  34444.          5.
  34445.  
  34446.                         Max_Decimal_Digits : constant := implementation-defined;
  34447.  
  34448.          6.
  34449.  
  34450.                         generic
  34451.                          type Dividend_Type  is delta <> digits <>;
  34452.                          type Divisor_Type  is delta <> digits <>;
  34453.                          type Quotient_Type  is delta <> digits <>;
  34454.                          type Remainder_Type is delta <> digits <>;
  34455.                         procedure Divide (Dividend  : in Dividend_Type;
  34456.                                  Divisor  : in Divisor_Type;
  34457.                                  Quotient  : out Quotient_Type;
  34458.                                  Remainder : out Remainder_Type);
  34459.                         pragma Convention(Intrinsic, Divide);
  34460.  
  34461.          7.
  34462.  
  34463.                       end Ada.Decimal;
  34464.  
  34465.    8. Max_Scale is the largest N such that 10.0**(-N) is allowed as a decimal 
  34466.       type's delta. Its type is universal_integer. 
  34467.  
  34468.    9. Min_Scale is the smallest N such that 10.0**(-N) is allowed as a decimal 
  34469.       type's delta. Its type is universal_integer. 
  34470.  
  34471.   10. Min_Delta is the smallest value allowed for delta in a 
  34472.       decimal_fixed_point_definition. Its type is universal_real. 
  34473.  
  34474.   11. Max_Delta is the largest value allowed for delta in a 
  34475.       decimal_fixed_point_definition. Its type is universal_real. 
  34476.  
  34477.   12. Max_Decimal_Digits is the largest value allowed for digits in a 
  34478.       decimal_fixed_point_definition. Its type is universal_integer. 
  34479.  
  34480.             Static Semantics
  34481.  
  34482.   13. The effect of Divide is as follows. The value of Quotient is 
  34483.       Quotient_Type(Dividend/Divisor). The value of Remainder is 
  34484.       Remainder_Type(Intermediate), where Intermediate is the difference 
  34485.       between Dividend and the product of Divisor and Quotient; this result is 
  34486.       computed exactly. 
  34487.  
  34488.             Implementation Requirements
  34489.  
  34490.   14. Decimal.Max_Decimal_Digits shall be at least 18. 
  34491.  
  34492.   15. Decimal.Max_Scale shall be at least 18. 
  34493.  
  34494.   16. Decimal.Min_Scale shall be at most 0. 
  34495.  
  34496.       NOTES 
  34497.  
  34498.   17. (1) The effect of division yielding a quotient with control over rounding 
  34499.       versus truncation is obtained by applying either the function attribute 
  34500.       Quotient_Type'Round or the conversion Quotient_Type to the expression 
  34501.       Dividend/Divisor. 
  34502.  
  34503.  
  34504. ΓòÉΓòÉΓòÉ 22.3. Edited Output for Decimal Types ΓòÉΓòÉΓòÉ
  34505.  
  34506.    1. The child packages Text_IO.Editing and Wide_Text_IO.Editing provide 
  34507.       localizable formatted text output, known as edited output , for decimal 
  34508.       types. An edited output string is a function of a numeric value, 
  34509.       program-specifiable locale elements, and a format control value. The 
  34510.       numeric value is of some decimal type. The locale elements are: 
  34511.  
  34512.         a. the currency string; 
  34513.  
  34514.         b. the digits group separator character; 
  34515.  
  34516.         c. the radix mark character; and 
  34517.  
  34518.         d. the fill character that replaces leading zeros of the numeric value. 
  34519.  
  34520.    1. For Text_IO.Editing the edited output and currency strings are of type 
  34521.       String, and the locale characters are of type Character. For 
  34522.       Wide_Text_IO.Editing their types are Wide_String and Wide_Character, 
  34523.       respectively. 
  34524.  
  34525.    2. Each of the locale elements has a default value that can be replaced or 
  34526.       explicitly overridden. 
  34527.  
  34528.    3. A format-control value is of the private type Picture; it determines the 
  34529.       composition of the edited output string and controls the form and 
  34530.       placement of the sign, the position of the locale elements and the 
  34531.       decimal digits, the presence or absence of a radix mark, suppression of 
  34532.       leading zeros, and insertion of particular character values. 
  34533.  
  34534.    4. A Picture object is composed from a String value, known as a picture 
  34535.       String, that serves as a template for the edited output string, and a 
  34536.       Boolean value that controls whether a string of all space characters is 
  34537.       produced when the number's value is zero. A picture String comprises a 
  34538.       sequence of one- or two-Character symbols, each serving as a placeholder 
  34539.       for a character or string at a corresponding position in the edited 
  34540.       output string. The picture String symbols fall into several categories 
  34541.       based on their effect on the edited output string: 
  34542.  
  34543.          5.
  34544.  
  34545.                       Decimal Digit:    '9'
  34546.                       Radix Control:    '.'  'V'
  34547.                       Sign Control:    '+'  '-'  '<'  '>'  "CR"  "DB"
  34548.                       Currency Control:  '$'  '#'
  34549.                       Zero Suppression:  'Z'  '*'
  34550.                       Simple Insertion:  '_'  'B'  '0'  '/'
  34551.  
  34552.    6. The entries are not case-sensitive. Mixed- or lower-case forms for "CR" 
  34553.       and "DB", and lower-case forms for 'V', 'Z', and 'B', have the same 
  34554.       effect as the upper-case symbols shown. 
  34555.  
  34556.    7. An occurrence of a '9' Character in the picture String represents a 
  34557.       decimal digit position in the edited output string. 
  34558.  
  34559.    8. A radix control Character in the picture String indicates the position of 
  34560.       the radix mark in the edited output string: an actual character position 
  34561.       for '.', or an assumed position for 'V'. 
  34562.  
  34563.    9. A sign control Character in the picture String affects the form of the 
  34564.       sign in the edited output string. The '<' and '>' Character values 
  34565.       indicate parentheses for negative values. A Character '+', '-', or '<' 
  34566.       appears either singly, signifying a fixed-position sign in the edited 
  34567.       output, or repeated, signifying a floating-position sign that is preceded 
  34568.       by zero or more space characters and that replaces a leading 0. 
  34569.  
  34570.   10. A currency control Character in the picture String indicates an 
  34571.       occurrence of the currency string in the edited output string. The '$' 
  34572.       Character represents the complete currency string; the '#' Character 
  34573.       represents one character of the currency string. A '$' Character appears 
  34574.       either singly, indicating a fixed-position currency string in the edited 
  34575.       output, or repeated, indicating a floating-position currency string that 
  34576.       occurs in place of a leading 0. A sequence of '#' Character values 
  34577.       indicates either a fixed- or floating-position currency string, depending 
  34578.       on context. 
  34579.  
  34580.   11. A zero suppression Character in the picture String allows a leading zero 
  34581.       to be replaced by either the space character (for 'Z') or the fill 
  34582.       character (for '*'). 
  34583.  
  34584.   12. A simple insertion Character in the picture String represents, in 
  34585.       general, either itself (if '/' or '0'), the space character (if 'B'), or 
  34586.       the digits group separator character (if '_'). In some contexts it is 
  34587.       treated as part of a floating sign, floating currency, or zero 
  34588.       suppression string. 
  34589.  
  34590.   13. An example of a picture String is "<###Z_ZZ9.99>". If the currency string 
  34591.       is "FF", the separator character is ',', and the radix mark is '.' then 
  34592.       the edited output string values for the decimal values 32.10 and -5432.10 
  34593.       are "bbFFbbb32.10b" and "(bFF5,432.10)", respectively, where 'b' 
  34594.       indicates the space character. 
  34595.  
  34596.   14. The generic packages Text_IO.Decimal_IO and Wide_Text_IO.Decimal_IO (see 
  34597.       A.10.9: ``Input-Output for Real Types'') provide text input and 
  34598.       non-edited text output for decimal types. 
  34599.  
  34600.       NOTES 
  34601.  
  34602.   15. (2) A picture String is of type Standard.String, both for Text_IO.Editing 
  34603.       and Wide_Text_IO.Editing. 
  34604.  
  34605.  F.3.1                         Picture String Formation 
  34606.  F.3.2                         Edited Output Generation 
  34607.  F.3.3                         The Package Text_IO.Editing 
  34608.  F.3.4                         The Package Wide_Text_IO.Editing 
  34609.  
  34610.  
  34611. ΓòÉΓòÉΓòÉ 22.3.1. Picture String Formation ΓòÉΓòÉΓòÉ
  34612.  
  34613.    1. A well-formed picture String, or simply picture String, is a String value 
  34614.       that conforms to the syntactic rules, composition constraints, and 
  34615.       character replication conventions specified in this clause. 
  34616.  
  34617.   Dynamic Semantics
  34618.  
  34619.          1.
  34620.  
  34621.                       picture_string ::=
  34622.                         fixed_$_picture_string
  34623.                        | fixed_#_picture_string
  34624.                        | floating_currency_picture_string
  34625.                        | non_currency_picture_string
  34626.  
  34627.          2.
  34628.  
  34629.                       fixed_$_picture_string ::=
  34630.                         [fixed_LHS_sign] fixed_$_char {direct_insertion}
  34631.                          [zero_suppression] number [RHS_sign]
  34632.                        | [fixed_LHS_sign {direct_insertion}] [zero_suppression]
  34633.                          number fixed_$_char {direct_insertion} [RHS_sign]
  34634.                        | floating_LHS_sign number fixed_$_char {direct_insertion}
  34635.                          [RHS_sign]
  34636.                        | [fixed_LHS_sign] fixed_$_char {direct_insertion}
  34637.                          all_zero_suppression_number {direct_insertion}  [RHS_sign]
  34638.                        | [fixed_LHS_sign {direct_insertion}] all_zero_suppression_number
  34639.                          {direct_insertion} fixed_$_char {direct_insertion}
  34640.                          [RHS_sign]
  34641.                        | all_sign_number {direct_insertion} fixed_$_char
  34642.                          {direct_insertion} [RHS_sign]
  34643.  
  34644.          3.
  34645.  
  34646.                       fixed_#_picture_string ::=
  34647.                         [fixed_LHS_sign] single_#_currency {direct_insertion}
  34648.                          [zero_suppression] number [RHS_sign]
  34649.                        | [fixed_LHS_sign] multiple_#_currency {direct_insertion}
  34650.                          zero_suppression number [RHS_sign]
  34651.                        | [fixed_LHS_sign {direct_insertion}] [zero_suppression]
  34652.                          number fixed_#_currency {direct_insertion} [RHS_sign]
  34653.                        | floating_LHS_sign number fixed_#_currency {direct_insertion}
  34654.                          [RHS_sign]
  34655.                        | [fixed_LHS_sign] single_#_currency {direct_insertion}
  34656.                          all_zero_suppression_number {direct_insertion} [RHS_sign]
  34657.                        | [fixed_LHS_sign] multiple_#_currency {direct_insertion}
  34658.                          all_zero_suppression_number {direct_insertion} [RHS_sign]
  34659.                        | [fixed_LHS_sign {direct_insertion}] all_zero_suppression_number
  34660.                          {direct_insertion} fixed_#_currency {direct_insertion}
  34661.                          [RHS_sign]
  34662.                        | all_sign_number {direct_insertion} fixed_#_currency
  34663.                          {direct_insertion} [RHS_sign]
  34664.  
  34665.          4.
  34666.  
  34667.                       floating_currency_picture_string ::=
  34668.                         [fixed_LHS_sign] {direct_insertion} floating_$_currency
  34669.                          number [RHS_sign]
  34670.                        | [fixed_LHS_sign] {direct_insertion} floating_#_currency
  34671.                          number [RHS_sign]
  34672.                        | [fixed_LHS_sign] {direct_insertion} all_currency_number
  34673.                          {direct_insertion} [RHS_sign]
  34674.  
  34675.          5.
  34676.  
  34677.                       non_currency_picture_string ::=
  34678.                         [fixed_LHS_sign {direct_insertion}] zero_suppression
  34679.                          number [RHS_sign]
  34680.                        | [floating_LHS_sign]
  34681.                          number [RHS_sign]
  34682.                        | [fixed_LHS_sign {direct_insertion}]
  34683.                         all_zero_suppression_number {direct_insertion} [RHS_sign]
  34684.                        | all_sign_number {direct_insertion}
  34685.                        | fixed_LHS_sign direct_insertion {direct_insertion}
  34686.                          number [RHS_sign]
  34687.  
  34688.          6.
  34689.  
  34690.                       fixed_LHS_sign ::=  LHS_Sign
  34691.  
  34692.          7.
  34693.  
  34694.                       LHS_Sign ::=  + | - | <
  34695.  
  34696.          8.
  34697.  
  34698.                       fixed_$_char ::= $
  34699.  
  34700.          9.
  34701.  
  34702.                       direct_insertion ::=  simple_insertion
  34703.  
  34704.         10.
  34705.  
  34706.                       simple_insertion ::=  _ | B | 0 | /
  34707.  
  34708.         11.
  34709.  
  34710.                       zero_suppression ::=  Z {Z
  34711.                                  | context_sensitive_insertion}
  34712.                                  | fill_string
  34713.  
  34714.         12.
  34715.  
  34716.                       context_sensitive_insertion ::=  simple_insertion
  34717.  
  34718.         13.
  34719.  
  34720.                       fill_string ::=  * {* | context_sensitive_insertion}
  34721.  
  34722.         14.
  34723.  
  34724.                       number ::=
  34725.                         fore_digits [radix [aft_digits] {direct_insertion}]
  34726.                        | radix aft_digits {direct_insertion}
  34727.  
  34728.         15.
  34729.  
  34730.                       fore_digits ::= 9 {9 | direct_insertion}
  34731.  
  34732.         16.
  34733.  
  34734.                       aft_digits ::=  {9 | direct_insertion} 9
  34735.  
  34736.         17.
  34737.  
  34738.                       radix ::= . | V
  34739.  
  34740.         18.
  34741.  
  34742.                       RHS_sign ::= + | - | > | CR | DB
  34743.  
  34744.         19.
  34745.  
  34746.                       floating_LHS_sign ::=
  34747.                         LHS_Sign {context_sensitive_insertion} LHS_Sign
  34748.                          {LHS_Sign | context_sensitive_insertion}
  34749.  
  34750.         20.
  34751.  
  34752.                       single_#_currency ::= #
  34753.  
  34754.         21.
  34755.  
  34756.                       multiple_#_currency ::= ## {#}
  34757.  
  34758.         22.
  34759.  
  34760.                       fixed_#_currency ::= single_#_currency | multiple_#_currency
  34761.  
  34762.         23.
  34763.  
  34764.                       floating_$_currency ::=
  34765.                         $ {context_sensitive_insertion} $ {$
  34766.                         | context_sensitive_insertion}
  34767.  
  34768.         24.
  34769.  
  34770.                       floating_#_currency ::=
  34771.                         # {context_sensitive_insertion} # {#
  34772.                         | context_sensitive_insertion}
  34773.  
  34774.         25.
  34775.  
  34776.                       all_sign_number ::=  all_sign_fore [radix [all_sign_aft]] [>]
  34777.  
  34778.         26.
  34779.  
  34780.                       all_sign_fore ::=
  34781.                         sign_char {context_sensitive_insertion} sign_char {sign_char
  34782.                         | context_sensitive_insertion}
  34783.  
  34784.         27.
  34785.  
  34786.                       all_sign_aft ::= {all_sign_aft_char} sign_char
  34787.                       all_sign_aft_char ::=  sign_char | context_sensitive_insertion
  34788.  
  34789.         28.
  34790.  
  34791.                       sign_char ::= + | - | <
  34792.  
  34793.         29.
  34794.  
  34795.                       all_currency_number ::=  all_currency_fore
  34796.                        [radix [all_currency_aft]]
  34797.  
  34798.         30.
  34799.  
  34800.                       all_currency_fore ::=
  34801.                         currency_char {context_sensitive_insertion}
  34802.                          currency_char {currency_char | context_sensitive_insertion}
  34803.  
  34804.         31.
  34805.  
  34806.                       all_currency_aft ::= {all_currency_aft_char} currency_char
  34807.                       all_currency_aft_char ::= currency_char
  34808.                                    | context_sensitive_insertion
  34809.  
  34810.         32.
  34811.  
  34812.                       currency_char ::= $ | #
  34813.  
  34814.         33.
  34815.  
  34816.                       all_zero_suppression_number ::=  all_zero_suppression_fore
  34817.                        [ radix [all_zero_suppression_aft]]
  34818.  
  34819.         34.
  34820.  
  34821.                       all_zero_suppression_fore ::=
  34822.                         zero_suppression_char {zero_suppression_char
  34823.                         | context_sensitive_insertion}
  34824.  
  34825.         35.
  34826.  
  34827.                       all_zero_suppression_aft ::= {all_zero_suppression_aft_char}
  34828.                        zero_suppression_char
  34829.                       all_zero_suppression_aft_char ::=  zero_suppression_char
  34830.                                         | context_sensitive_insertion
  34831.  
  34832.         36.
  34833.  
  34834.                       zero_suppression_char ::= Z | *
  34835.  
  34836.   37. The following composition constraints apply to a picture String: 
  34837.  
  34838.         a. A floating_LHS_sign does not have occurrences of different LHS_Sign 
  34839.            Character values. 
  34840.  
  34841.         b. If a picture String has '<' as fixed_LHS_sign, then it has '>' as 
  34842.            RHS_sign. 
  34843.  
  34844.         c. If a picture String has '<' in a floating_LHS_sign or in an 
  34845.            all_sign_number, then it has an occurrence of '>'. 
  34846.  
  34847.         d. If a picture String has '+' or '-' as fixed_LHS_sign, in a 
  34848.            floating_LHS_sign, or in an all_sign_number, then it has no 
  34849.            RHS_sign. 
  34850.  
  34851.         e. An instance of all_sign_number does not have occurrences of 
  34852.            different sign_char Character values. 
  34853.  
  34854.         f. An instance of all_currency_number does not have occurrences of 
  34855.            different currency_char Character values. 
  34856.  
  34857.         g. An instance of all_zero_suppression_number does not have occurrences 
  34858.            of different zero_suppression_char Character values, except for 
  34859.            possible case differences between 'Z' and 'z'. 
  34860.  
  34861.    1. A replicable Character is a Character that, by the above rules, can occur 
  34862.       in two consecutive positions in a picture String. 
  34863.  
  34864.    2. A Character replication is a String 
  34865.  
  34866.          3.
  34867.  
  34868.                       char & '(' & spaces & count_string & ')'
  34869.  
  34870.    4. where char is a replicable Character, spaces is a String (possibly empty) 
  34871.       comprising only space Character values, and count_string is a String of 
  34872.       one or more decimal digit Character values. A Character replication in a 
  34873.       picture String has the same effect as (and is said to be equivalent to) a 
  34874.       String comprising n consecutive occurrences of char, where 
  34875.       n=Integer'Value(count_string). 
  34876.  
  34877.    5. An expanded picture String is a picture String containing no Character 
  34878.       replications. 
  34879.  
  34880.       NOTES 
  34881.  
  34882.    6. (3) Although a sign to the left of the number can float, a sign to the 
  34883.       right of the number is in a fixed position. 
  34884.  
  34885.  
  34886. ΓòÉΓòÉΓòÉ 22.3.2. Edited Output Generation ΓòÉΓòÉΓòÉ
  34887.  
  34888.  
  34889.   Dynamic Semantics
  34890.  
  34891.    1. The contents of an edited output string are based on: 
  34892.  
  34893.         a. A value, Item, of some decimal type Num, 
  34894.  
  34895.         b. An expanded picture String Pic_String, 
  34896.  
  34897.         c. A Boolean value, Blank_When_Zero, 
  34898.  
  34899.         d. A Currency string, 
  34900.  
  34901.         e. A Fill character, 
  34902.  
  34903.         f. A Separator character, and 
  34904.  
  34905.         g. A Radix_Mark character. 
  34906.  
  34907.    1. The combination of a True value for Blank_When_Zero and a '*' character 
  34908.       in Pic_String is inconsistent; no edited output string is defined. 
  34909.  
  34910.    2. A layout error is identified in the rules below if leading non-zero 
  34911.       digits of Item, character values of the Currency string, or a negative 
  34912.       sign would be truncated; in such cases no edited output string is 
  34913.       defined. 
  34914.  
  34915.    3. The edited output string has lower bound 1 and upper bound N where N = 
  34916.       Pic_String'Length + Currency_Length_Adjustment - Radix_Adjustment, and 
  34917.  
  34918.         a. Currency_Length_Adjustment = Currency'Length - 1 if there is some 
  34919.            occurrence of '$' in Pic_String, and 0 otherwise. 
  34920.  
  34921.         b. Radix_Adjustment = 1 if there is an occurrence of 'V' or 'v' in 
  34922.            Pic_Str, and 0 otherwise. 
  34923.  
  34924.                    c.
  34925.  
  34926.                       Let the magnitude of Item be expressed as a base-10 number
  34927.                       I ***I .F ***F , called the displayed magnitude of Item, where:
  34928.                        p   1  1   q
  34929.  
  34930.         d. q = Min(Max(Num'Scale, 0), n) where n is 0 if Pic_String has no 
  34931.            radix and is otherwise the number of digit positions following radix 
  34932.            in Pic_String, where a digit position corresponds to an occurrence 
  34933.            of '9', a zero_suppression_char (for an 
  34934.            all_zero_suppression_number), a currency_char (for an 
  34935.            all_currency_number), or a sign_char (for an all_sign_number). 
  34936.  
  34937.                    e.
  34938.  
  34939.                       I /= 0 if p>0.
  34940.                        p
  34941.  
  34942.    1. If n < Num'Scale, then the above number is the result of rounding (away 
  34943.       from 0 if exactly midway between values). 
  34944.  
  34945.    2. If Blank_When_Zero = True and the displayed magnitude of Item is zero, 
  34946.       then the edited output string comprises all space character values. 
  34947.       Otherwise, the picture String is treated as a sequence of instances of 
  34948.       syntactic categories based on the rules in F.3.1, and the edited output 
  34949.       string is the concatenation of string values derived from these 
  34950.       categories according to the following mapping rules. 
  34951.  
  34952.    3. Table F-1 shows the mapping from a sign control symbol to a corresponding 
  34953.       character or string in the edited output. In the columns showing the 
  34954.       edited output, a lower-case 'b' represents the space character. If there 
  34955.       is no sign control symbol but the value of Item is negative, a layout 
  34956.       error occurs and no edited output string is produced. 
  34957.  
  34958.                +---------------------------------------------------+
  34959.               |                          |
  34960.               | Table F-1: Edited Output for Sign Control Symbols |
  34961.               |                          |
  34962.               +----------------+------------------+---------------+
  34963.               |         |          |        |
  34964.               | Sign Control  | Edited Output   | Edited Output |
  34965.               | Symbol     | for Non-Negative | for Negative  |
  34966.               |         | Number      | Number     |
  34967.               |         |          |        |
  34968.               +----------------+------------------+---------------+
  34969.               |         |          |        |
  34970.               |    '+'    |     '+'    |    '-'    |
  34971.               |         |          |        |
  34972.               |    '-'    |     'b'    |    '-'    |
  34973.               |         |          |        |
  34974.               |    '<'    |     'b'    |    '('    |
  34975.               |         |          |        |
  34976.               |    '>'    |     'b'    |    ')'    |
  34977.               |         |          |        |
  34978.               |   "CR"    |    "bb"    |   "CR"    |
  34979.               |         |          |        |
  34980.               |   "DB"    |    "bb"    |   "DB"    |
  34981.               |         |          |        |
  34982.               +----------------+------------------+---------------+
  34983.  
  34984.    4. An instance of fixed_LHS_sign maps to a character as shown in Table F-1. 
  34985.  
  34986.    5. An instance of fixed_$_char maps to Currency. 
  34987.  
  34988.    6. An instance of direct_insertion maps to Separator if direct_insertion = 
  34989.       '_', and to the direct_insertion Character otherwise. 
  34990.  
  34991.    7. An instance of number maps to a string integer_part & radix_part & 
  34992.       fraction_part where: 
  34993.  
  34994.         a. The string for integer_part is obtained as follows: 
  34995.  
  34996.                              1.
  34997.  
  34998.                                 Occurrences of '9' in fore_digits of number are replaced
  34999.                                 from right to left with the decimal digit character values
  35000.                                 for I , ┬╖┬╖┬╖, I , respectively.
  35001.                                    1     p
  35002.  
  35003.              2. Each occurrence of '9' in fore_digits to the left of the 
  35004.                 leftmost '9' replaced according to rule 1 is replaced with '0'. 
  35005.  
  35006.              3. If p exceeds the number of occurrences of '9' in fore_digits of 
  35007.                 number, then the excess leftmost digits are eligible for use in 
  35008.                 the mapping of an instance of zero_suppression, 
  35009.                 floating_LHS_sign, floating_$_currency, or floating_#_currency 
  35010.                 to the left of number; if there is no such instance, then a 
  35011.                 layout error occurs and no edited output string is produced. 
  35012.  
  35013.         a. The radix_part is: 
  35014.  
  35015.              1. "" if number does not include a radix, if radix = 'V', or if 
  35016.                 radix = 'v' 
  35017.  
  35018.              2. Radix_Mark if number includes '.' as radix 
  35019.  
  35020.         a. The string for fraction_part is obtained as follows: 
  35021.  
  35022.                              1.
  35023.  
  35024.                                 Occurrences of '9' in aft_digits of number are replaced
  35025.                                 from left to right with the decimal digit character values
  35026.                                 for F , ┬╖┬╖┬╖ F .
  35027.                                    1    q
  35028.  
  35029.              2. Each occurrence of '9' in aft_digits to the right of the 
  35030.                 rightmost '9' replaced according to rule 1 is replaced by '0'. 
  35031.  
  35032.    1. An instance of zero_suppression maps to the string obtained as follows: 
  35033.  
  35034.         a. The rightmost 'Z', 'z', or '*' Character values are replaced with 
  35035.            the excess digits (if any) from the integer_part of the mapping of 
  35036.            the number to the right of the zero_suppression instance, 
  35037.  
  35038.         b. A context_sensitive_insertion Character is replaced as though it 
  35039.            were a direct_insertion Character, if it occurs to the right of some 
  35040.            'Z', 'z', or '*' in zero_suppression that has been mapped to an 
  35041.            excess digit, 
  35042.  
  35043.         c. Each Character to the left of the leftmost Character replaced 
  35044.            according to rule 1 above is replaced by: 
  35045.  
  35046.              1. the space character if the zero suppression Character is 'Z' or 
  35047.                 'z', or 
  35048.  
  35049.              2. the Fill character if the zero suppression Character is '*'. 
  35050.  
  35051.         a. A layout error occurs if some excess digits remain after all 'Z', 
  35052.            'z', and '*' Character values in zero_suppression have been replaced 
  35053.            via rule 1; no edited output string is produced. 
  35054.  
  35055.    1. An instance of RHS_sign maps to a character or string as shown in Table 
  35056.       F-1. 
  35057.  
  35058.    2. An instance of floating_LHS_sign maps to the string obtained as follows. 
  35059.  
  35060.         a. Up to all but one of the rightmost LHS_Sign Character values are 
  35061.            replaced by the excess digits (if any) from the integer_part of the 
  35062.            mapping of the number to the right of the floating_LHS_sign 
  35063.            instance. 
  35064.  
  35065.         b. The next Character to the left is replaced with the character given 
  35066.            by the entry in Table F-1 corresponding to the LHS_Sign Character. 
  35067.  
  35068.         c. A context_sensitive_insertion Character is replaced as though it 
  35069.            were a direct_insertion Character, if it occurs to the right of the 
  35070.            leftmost LHS_Sign character replaced according to rule 1. 
  35071.  
  35072.         d. Any other Character is replaced by the space character┬╖┬╖ 
  35073.  
  35074.         e. A layout error occurs if some excess digits remain after replacement 
  35075.            via rule 1; no edited output string is produced. 
  35076.  
  35077.    1. An instance of fixed_#_currency maps to the Currency string with n space 
  35078.       character values concatenated on the left (if the instance does not 
  35079.       follow a radix) or on the right (if the instance does follow a radix), 
  35080.       where n is the difference between the length of the fixed_#_currency 
  35081.       instance and Currency'Length. A layout error occurs if Currency'Length 
  35082.       exceeds the length of the fixed_#_currency instance; no edited output 
  35083.       string is produced. 
  35084.  
  35085.    2. An instance of floating_$_currency maps to the string obtained as 
  35086.       follows: 
  35087.  
  35088.         a. Up to all but one of the rightmost '$' Character values are replaced 
  35089.            with the excess digits (if any) from the integer_part of the mapping 
  35090.            of the number to the right of the floating_$_currency instance. 
  35091.  
  35092.         b. The next Character to the left is replaced by the Currency string. 
  35093.  
  35094.         c. A context_sensitive_insertion Character is replaced as though it 
  35095.            were a direct_insertion Character, if it occurs to the right of the 
  35096.            leftmost '$' Character replaced via rule 1. 
  35097.  
  35098.         d. Each other Character is replaced by the space character. 
  35099.  
  35100.         e. A layout error occurs if some excess digits remain after replacement 
  35101.            by rule 1; no edited output string is produced. 
  35102.  
  35103.    1. An instance of floating_#_currency maps to the string obtained as 
  35104.       follows: 
  35105.  
  35106.         a. Up to all but one of the rightmost '#' Character values are replaced 
  35107.            with the excess digits (if any) from the integer_part of the mapping 
  35108.            of the number to the right of the floating_#_currency instance. 
  35109.  
  35110.         b. The substring whose last Character occurs at the position 
  35111.            immediately preceding the leftmost Character replaced via rule 1, 
  35112.            and whose length is Currency'Length, is replaced by the Currency 
  35113.            string. 
  35114.  
  35115.         c. A context_sensitive_insertion Character is replaced as though it 
  35116.            were a direct_insertion Character, if it occurs to the right of the 
  35117.            leftmost '#' replaced via rule 1. 
  35118.  
  35119.         d. Any other Character is replaced by the space character. 
  35120.  
  35121.         e. A layout error occurs if some excess digits remain after replacement 
  35122.            rule 1, or if there is no substring with the required length for 
  35123.            replacement rule 2; no edited output string is produced. 
  35124.  
  35125.    1. An instance of all_zero_suppression_number maps to: 
  35126.  
  35127.         a. a string of all spaces if the displayed magnitude of Item is zero, 
  35128.            the zero_suppression_char is 'Z' or 'z', and the instance of 
  35129.            all_zero_suppression_number does not have a radix at its last 
  35130.            character position; 
  35131.  
  35132.         b. a string containing the Fill character in each position except for 
  35133.            the character (if any) corresponding to radix, if 
  35134.            zero_suppression_char = '*' and the displayed magnitude of Item is 
  35135.            zero; 
  35136.  
  35137.         c. otherwise, the same result as if each zero_suppression_char in 
  35138.            all_zero_suppression_aft were '9', interpreting the instance of 
  35139.            all_zero_suppression_number as either zero_suppression number (if a 
  35140.            radix and all_zero_suppression_aft are present), or as 
  35141.            zero_suppression otherwise. 
  35142.  
  35143.    1. An instance of all_sign_number maps to: 
  35144.  
  35145.         a. a string of all spaces if the displayed magnitude of Item is zero 
  35146.            and the instance of all_sign_number does not have a radix at its 
  35147.            last character position; 
  35148.  
  35149.         b. otherwise, the same result as if each sign_char in 
  35150.            all_sign_number_aft were '9', interpreting the instance of 
  35151.            all_sign_number as either floating_LHS_sign number (if a radix and 
  35152.            all_sign_number_aft are present), or as floating_LHS_sign otherwise. 
  35153.  
  35154.    1. An instance of all_currency_number maps to: 
  35155.  
  35156.         a. a string of all spaces if the displayed magnitude of Item is zero 
  35157.            and the instance of all_currency_number does not have a radix at its 
  35158.            last character position; 
  35159.  
  35160.         b. otherwise, the same result as if each currency_char in 
  35161.            all_currency_number_aft were '9', interpreting the instance of 
  35162.            all_currency_number as floating_$_currency number or 
  35163.            floating_#_currency number (if a radix and all_currency_number_aft 
  35164.            are present), or as floating_$_currency or floating_#_currency 
  35165.            otherwise. 
  35166.  
  35167.   Examples
  35168.  
  35169.    1. In the result string values shown below, 'b' represents the space 
  35170.       character. 
  35171.  
  35172.          2.
  35173.  
  35174.                       Item:     Picture and Result Strings:
  35175.  
  35176.          3.
  35177.  
  35178.                       123456.78   Picture:  "-###**_***_**9.99"
  35179.                                   "bbb$***123,456.78"
  35180.                                   "bbFF***123.456,78" (currency = "FF",
  35181.                                              separator = '.',
  35182.                                              radix mark = ',')
  35183.  
  35184.          4.
  35185.  
  35186.                       123456.78   Picture:  "-$$$**_***_**9.99"
  35187.                              Result:  "bbb$***123,456.78"
  35188.                                   "bbbFF***123.456,78" (currency = "FF",
  35189.                                              separator = '.',
  35190.                                              radix mark = ',')
  35191.  
  35192.          5.
  35193.  
  35194.                       0.0      Picture: "-$$$$$$.$$"
  35195.                              Result:  "bbbbbbbbbb"
  35196.  
  35197.          6.
  35198.  
  35199.                       0.20     Picture: "-$$$$$$.$$"
  35200.                              Result:  "bbbbbb$.20"
  35201.  
  35202.          7.
  35203.  
  35204.                       -1234.565   Picture: "<<<<_<<<.<<###>"
  35205.                              Result:  "bb(1,234.57DMb)"  (currency = "DM")
  35206.  
  35207.          8.
  35208.  
  35209.                       12345.67   Picture: "###_###_##9.99"
  35210.                              Result:  "bbCHF12,345.67"  (currency = "CHF")
  35211.  
  35212.  
  35213. ΓòÉΓòÉΓòÉ 22.3.3. The Package Text_IO.Editing ΓòÉΓòÉΓòÉ
  35214.  
  35215.    1. The package Text_IO.Editing provides a private type Picture with 
  35216.       associated operations, and a generic package Decimal_Output. An object of 
  35217.       type Picture is composed from a well-formed picture String (see F.3.1) 
  35218.       and a Boolean item indicating whether a zero numeric value will result in 
  35219.       an edited output string of all space characters. The package 
  35220.       Decimal_Output contains edited output subprograms implementing the 
  35221.       effects defined in F.3.2. 
  35222.  
  35223.             Static Semantics
  35224.  
  35225.    2. The library package Text_IO.Editing has the following declaration: 
  35226.  
  35227.          3.
  35228.  
  35229.                       package Ada.Text_IO.Editing is
  35230.  
  35231.          4.
  35232.  
  35233.                         type Picture is private;
  35234.  
  35235.          5.
  35236.  
  35237.                         function Valid (Pic_String    : in String;
  35238.                                 Blank_When_Zero : in Boolean := False)
  35239.                          return Boolean;
  35240.  
  35241.          6.
  35242.  
  35243.                         function To_Picture (Pic_String    : in String;
  35244.                                   Blank_When_Zero : in Boolean := False)
  35245.                          return Picture;
  35246.  
  35247.          7.
  35248.  
  35249.                         function Pic_String    (Pic : in Picture) return String;
  35250.                         function Blank_When_Zero (Pic : in Picture) return Boolean;
  35251.  
  35252.          8.
  35253.  
  35254.                         Max_Picture_Length  : constant := implementation_defined;
  35255.  
  35256.          9.
  35257.  
  35258.                         Picture_Error    : exception;
  35259.  
  35260.         10.
  35261.  
  35262.                         Default_Currency   : constant String   := "$";
  35263.                         Default_Fill     : constant Character := '*';
  35264.                         Default_Separator  : constant Character := ',';
  35265.                         Default_Radix_Mark  : constant Character := '.';
  35266.  
  35267.         11.
  35268.  
  35269.                         generic
  35270.                          type Num is delta <> digits <>;
  35271.                          Default_Currency  : in String
  35272.                           :=  Text_IO.Editing.Default_Currency;
  35273.                          Default_Fill    : in Character
  35274.                           :=  Text_IO.Editing.Default_Fill;
  35275.                          Default_Separator  : in Character
  35276.                           :=  Text_IO.Editing.Default_Separator;
  35277.                          Default_Radix_Mark : in Character
  35278.                           :=  Text_IO.Editing.Default_Radix_Mark;
  35279.                         package Decimal_Output is
  35280.                          function Length (Pic    : in Picture;
  35281.                                   Currency : in String := Default_Currency)
  35282.                            return Natural;
  35283.  
  35284.         12.
  35285.  
  35286.                           function Valid (Item   : in Num;
  35287.                                  Pic    : in Picture;
  35288.                                  Currency : in String := Default_Currency)
  35289.                            return Boolean;
  35290.  
  35291.         13.
  35292.  
  35293.                           function Image
  35294.                           (Item    : in Num;
  35295.                            Pic     : in Picture;
  35296.                            Currency  : in String   := Default_Currency;
  35297.                            Fill    : in Character := Default_Fill;
  35298.                            Separator  : in Character := Default_Separator;
  35299.                            Radix_Mark : in Character := Default_Radix_Mark)
  35300.                            return String;
  35301.  
  35302.         14.
  35303.  
  35304.                           procedure Put
  35305.                           (File    : in File_Type;
  35306.                            Item    : in Num;
  35307.                            Pic     : in Picture;
  35308.                            Currency  : in String   := Default_Currency;
  35309.                            Fill    : in Character := Default_Fill;
  35310.                            Separator  : in Character := Default_Separator;
  35311.                            Radix_Mark : in Character := Default_Radix_Mark);
  35312.  
  35313.         15.
  35314.  
  35315.                           procedure Put
  35316.                           (Item    : in Num;
  35317.                            Pic     : in Picture;
  35318.                            Currency  : in String   := Default_Currency;
  35319.                            Fill    : in Character := Default_Fill;
  35320.                            Separator  : in Character := Default_Separator;
  35321.                            Radix_Mark : in Character := Default_Radix_Mark);
  35322.  
  35323.         16.
  35324.  
  35325.                           procedure Put
  35326.                           (To     : out String;
  35327.                            Item    : in Num;
  35328.                            Pic     : in Picture;
  35329.                            Currency  : in String   := Default_Currency;
  35330.                            Fill    : in Character := Default_Fill;
  35331.                            Separator  : in Character := Default_Separator;
  35332.                            Radix_Mark : in Character := Default_Radix_Mark);
  35333.                         end Decimal_Output;
  35334.                       private
  35335.                         ┬╖┬╖┬╖ -- not specified by the language
  35336.                       end Ada.Text_IO.Editing;
  35337.  
  35338.   17. The exception Constraint_Error is raised if the Image function or any of 
  35339.       the Put procedures is invoked with a null string for Currency. 
  35340.  
  35341.         18.
  35342.  
  35343.             function Valid (Pic_String    : in String;
  35344.                     Blank_When_Zero : in Boolean := False)
  35345.              return Boolean;
  35346.  
  35347.         a. Valid returns True if Pic_String is a well-formed picture String 
  35348.            (see F.3.1) the length of whose expansion does not exceed 
  35349.            Max_Picture_Length, and if either Blank_When_Zero is False or 
  35350.            Pic_String contains no '*'. 
  35351.  
  35352.          1.
  35353.  
  35354.             function To_Picture (Pic_String    : in String;
  35355.                        Blank_When_Zero : in Boolean := False)
  35356.               return Picture;
  35357.  
  35358.         a. To_Picture returns a result Picture such that the application of the 
  35359.            function Pic_String to this result yields an expanded picture String 
  35360.            equivalent to Pic_String, and such that Blank_When_Zero applied to 
  35361.            the result Picture is the same value as the parameter 
  35362.            Blank_When_Zero. Picture_Error is raised if not Valid(Pic_String, 
  35363.            Blank_When_Zero). 
  35364.  
  35365.          1.
  35366.  
  35367.             function Pic_String    (Pic : in Picture) return String;
  35368.  
  35369.             function Blank_When_Zero (Pic : in Picture) return Boolean;
  35370.  
  35371.         a. If Pic is To_Picture(String_Item, Boolean_Item) for some String_Item 
  35372.            and Boolean_Item, then: 
  35373.  
  35374.              1. Pic_String(Pic) returns an expanded picture String equivalent 
  35375.                 to String_Item and with any lower-case letter replaced with its 
  35376.                 corresponding upper-case form, and 
  35377.  
  35378.              2. Blank_When_Zero(Pic) returns Boolean_Item. 
  35379.  
  35380.         a. If Pic_1 and Pic_2 are objects of type Picture, then "="(Pic_1, 
  35381.            Pic_2) is True when 
  35382.  
  35383.              1. Pic_String(Pic_1) = Pic_String(Pic_2), and 
  35384.  
  35385.              2. Blank_When_Zero(Pic_1) = Blank_When_Zero(Pic_2). 
  35386.  
  35387.          1.
  35388.  
  35389.             function Length (Pic    : in Picture;
  35390.                      Currency : in String := Default_Currency)
  35391.               return Natural;
  35392.  
  35393.         a. Length returns Pic_String(Pic)'Length + Currency_Length_Adjustment - 
  35394.            Radix_Adjustment where 
  35395.  
  35396.              1. Currency_Length_Adjustment = 
  35397.  
  35398.                   a. Currency'Length - 1 if there is some occurrence of '$' in 
  35399.                      Pic_String(Pic), and 
  35400.  
  35401.                   b. 0 otherwise. 
  35402.  
  35403.              1. Radix_Adjustment = 
  35404.  
  35405.                   a. 1 if there is an occurrence of 'V' or 'v' in Pic_Str(Pic), 
  35406.                      and 
  35407.  
  35408.                   b. 0 otherwise. 
  35409.  
  35410.          1.
  35411.  
  35412.             function Valid (Item   : in Num;
  35413.                     Pic    : in Picture;
  35414.                     Currency : in String := Default_Currency)
  35415.               return Boolean;
  35416.  
  35417.         a. Valid returns True if Image(Item, Pic, Currency) does not raise 
  35418.            Layout_Error, and returns False otherwise. 
  35419.  
  35420.          1.
  35421.  
  35422.             function Image (Item    : in Num;
  35423.                     Pic     : in Picture;
  35424.                     Currency  : in String   := Default_Currency;
  35425.                     Fill    : in Character := Default_Fill;
  35426.                     Separator  : in Character := Default_Separator;
  35427.                     Radix_Mark : in Character := Default_Radix_Mark)
  35428.               return String;
  35429.  
  35430.         a. Image returns the edited output String as defined in F.3.2, for 
  35431.            Item, Pic_String(Pic), Blank_When_Zero(Pic), Currency, Fill, 
  35432.            Separator, and Radix_Mark. If these rules identify a layout error, 
  35433.            then Image raises the exception Layout_Error. 
  35434.  
  35435.          1.
  35436.  
  35437.             procedure Put (File    : in File_Type;
  35438.                     Item    : in Num;
  35439.                     Pic     : in Picture;
  35440.                     Currency  : in String   := Default_Currency;
  35441.                     Fill    : in Character := Default_Fill;
  35442.                     Separator  : in Character := Default_Separator;
  35443.                     Radix_Mark : in Character := Default_Radix_Mark);
  35444.  
  35445.             procedure Put (Item    : in Num;
  35446.                     Pic     : in Picture;
  35447.                     Currency  : in String   := Default_Currency;
  35448.                     Fill    : in Character := Default_Fill;
  35449.                     Separator  : in Character := Default_Separator;
  35450.                     Radix_Mark : in Character := Default_Radix_Mark);
  35451.  
  35452.         a. Each of these Put procedures outputs Image(Item, Pic, Currency, 
  35453.            Fill, Separator, Radix_Mark) consistent with the conventions for Put 
  35454.            for other real types in case of bounded line length, see A.10.6: 
  35455.            ``Get and Put Procedures''. 
  35456.  
  35457.          1.
  35458.  
  35459.             procedure Put (To     : out String;
  35460.                     Item    : in Num;
  35461.                     Pic     : in Picture;
  35462.                     Currency  : in String   := Default_Currency;
  35463.                     Fill    : in Character := Default_Fill;
  35464.                     Separator  : in Character := Default_Separator;
  35465.                     Radix_Mark : in Character := Default_Radix_Mark);
  35466.  
  35467.         a. Put copies Image(Item, Pic, Currency, Fill, Separator, Radix_Mark) 
  35468.            to the given string, right justified. Otherwise unassigned Character 
  35469.            values in To are assigned the space character. If To'Length is less 
  35470.            than the length of the string resulting from Image, then 
  35471.            Layout_Error is raised. 
  35472.  
  35473.   Implementation Requirements
  35474.  
  35475.    1. Max_Picture_Length shall be at least 30. The implementation shall support 
  35476.       currency strings of length up to at least 10, both for Default_Currency 
  35477.       in an instantiation of Decimal_Output, and for Currency in an invocation 
  35478.       of Image or any of the Put procedures. 
  35479.  
  35480.       NOTES 
  35481.  
  35482.    2. (4) The rules for edited output are based on COBOL (ANSI X3.23:1985, 
  35483.       endorsed by ISO as ISO 1989-1985), with the following differences: 
  35484.  
  35485.         a. The COBOL provisions for picture string localization and for 'P' 
  35486.            format are absent from Ada. 
  35487.  
  35488.         b. The following Ada facilities are not in COBOL: 
  35489.  
  35490.              1. currency symbol placement after the number, 
  35491.  
  35492.              2. localization of edited output string for multi-character 
  35493.                 currency string values, including support for both 
  35494.                 length-preserving and length-expanding currency symbols in 
  35495.                 picture strings 
  35496.  
  35497.              3. localization of the radix mark, digits separator, and fill 
  35498.                 character, and 
  35499.  
  35500.              4. parenthesization of negative values. 
  35501.   The value of 30 for Max_Picture_Length is the same limit as in COBOL. 
  35502.  
  35503.  
  35504. ΓòÉΓòÉΓòÉ 22.3.4. The Package Wide_Text_IO.Editing ΓòÉΓòÉΓòÉ
  35505.  
  35506.  
  35507.   Static Semantics
  35508.  
  35509.    1. The child package Wide_Text_IO.Editing has the same contents as 
  35510.       Text_IO.Editing, except that: 
  35511.  
  35512.         a. each occurrence of Character is replaced by Wide_Character, 
  35513.  
  35514.         b. each occurrence of Text_IO is replaced by Wide_Text_IO, 
  35515.  
  35516.         c. the subtype of Default_Currency is Wide_String rather than String, 
  35517.            and 
  35518.  
  35519.         d. each occurrence of String in the generic package Decimal_Output is 
  35520.            replaced by Wide_String. 
  35521.   NOTES 
  35522.  
  35523.    1. (5) Each of the functions Wide_Text_IO.Editing.Valid, To_Picture, and 
  35524.       Pic_String has String (versus Wide_String) as its parameter or result 
  35525.       subtype, since a picture String is not localizable. 
  35526.  
  35527.  
  35528. ΓòÉΓòÉΓòÉ 23. Numerics (normative) ΓòÉΓòÉΓòÉ
  35529.  
  35530.    1. The Numerics Annex specifies 
  35531.  
  35532.         a. features for complex arithmetic, including complex I/O; 
  35533.  
  35534.         b. a mode (``strict mode''), in which the predefined arithmetic 
  35535.            operations of floating point and fixed point types and the functions 
  35536.            and operations of various predefined packages have to provide 
  35537.            guaranteed accuracy or conform to other numeric performance 
  35538.            requirements, which the Numerics Annex also specifies; 
  35539.  
  35540.         c. a mode (``relaxed mode''), in which no accuracy or other numeric 
  35541.            performance requirements need be satisfied, as for implementations 
  35542.            not conforming to the Numerics Annex; 
  35543.  
  35544.         d. models of floating point and fixed point arithmetic on which the 
  35545.            accuracy requirements of strict mode are based; and 
  35546.  
  35547.         e. the definitions of the model-oriented attributes of floating point 
  35548.            types that apply in the strict mode. 
  35549.  
  35550.   Implementation Advice
  35551.  
  35552.    1. If Fortran (respectively, C) is widely supported in the target 
  35553.       environment, implementations supporting the Numerics Annex should provide 
  35554.       the child package Interfaces.Fortran (respectively, Interfaces.C) 
  35555.       specified in Annex B and should support a convention_identifier of 
  35556.       Fortran (respectively, C) in the interfacing pragmas, see B: ``Annex B'', 
  35557.       thus allowing Ada programs to interface with programs written in that 
  35558.       language. 
  35559.  
  35560.  G.1                           Complex Arithmetic 
  35561.  G.2                           Numeric Performance Requirements --- The 
  35562.                                Detailed Node Listing --- 
  35563.  G.1                           Complex Arithmetic 
  35564.  G.1.1                         Complex Types 
  35565.  G.1.2                         Complex Elementary Functions 
  35566.  G.1.3                         Complex Input-Output 
  35567.  G.1.4                         The Package Wide_Text_IO.Complex_IO 
  35568.  G.2                           Numeric Performance Requirements 
  35569.  G.2.1                         Model of Floating Point Arithmetic 
  35570.  G.2.2                         Model-Oriented Attributes of Floating Point 
  35571.                                Types 
  35572.  G.2.3                         Model of Fixed Point Arithmetic 
  35573.  G.2.4                         Accuracy Requirements for the Elementary 
  35574.                                Functions 
  35575.  G.2.5                         Performance Requirements for Random Number 
  35576.                                Generation 
  35577.  G.2.6                         Accuracy Requirements for Complex Arithmetic 
  35578.  
  35579.  
  35580. ΓòÉΓòÉΓòÉ 23.1. Complex Arithmetic ΓòÉΓòÉΓòÉ
  35581.  
  35582.    1. Types and arithmetic operations for complex arithmetic are provided in 
  35583.       Generic_Complex_Types, which is defined in G.1.1. Implementation-defined 
  35584.       approximations to the complex analogs of the mathematical functions known 
  35585.       as the ``elementary functions'' are provided by the subprograms in 
  35586.       Generic_Complex_Elementary_Functions, which is defined in G.1.2. Both of 
  35587.       these library units are generic children of the predefined package 
  35588.       Numerics, see A.5. Nongeneric equivalents of these generic packages for 
  35589.       each of the predefined floating point types are also provided as children 
  35590.       of Numerics. 
  35591.  
  35592.  G.1.1                         Complex Types 
  35593.  G.1.2                         Complex Elementary Functions 
  35594.  G.1.3                         Complex Input-Output 
  35595.  G.1.4                         The Package Wide_Text_IO.Complex_IO 
  35596.  
  35597.  
  35598. ΓòÉΓòÉΓòÉ 23.1.1. Complex Types ΓòÉΓòÉΓòÉ
  35599.  
  35600.  
  35601.   Static Semantics
  35602.  
  35603.    1. The generic library package Numerics.Generic_Complex_Types has the 
  35604.       following declaration: 
  35605.  
  35606.          2.
  35607.  
  35608.                       generic
  35609.                         type Real is digits <>;
  35610.                       package Ada.Numerics.Generic_Complex_Types is
  35611.                         pragma Pure(Generic_Complex_Types);
  35612.  
  35613.          3.
  35614.  
  35615.                         type Complex is
  35616.                          record
  35617.                            Re, Im : Real'Base;
  35618.                          end record;
  35619.  
  35620.          4.
  35621.  
  35622.                         type Imaginary is private;
  35623.  
  35624.          5.
  35625.  
  35626.                         i : constant Imaginary;
  35627.                         j : constant Imaginary;
  35628.  
  35629.          6.
  35630.  
  35631.                         function Re (X : Complex)  return Real'Base;
  35632.                         function Im (X : Complex)  return Real'Base;
  35633.                         function Im (X : Imaginary) return Real'Base;
  35634.  
  35635.          7.
  35636.  
  35637.                         procedure Set_Re (X  : in out Complex;
  35638.                                  Re : in   Real'Base);
  35639.                         procedure Set_Im (X  : in out Complex;
  35640.                                  Im : in   Real'Base);
  35641.                         procedure Set_Im (X  :   out Imaginary;
  35642.                                  Im : in   Real'Base);
  35643.  
  35644.          8.
  35645.  
  35646.                         function Compose_From_Cartesian (Re, Im : Real'Base)
  35647.                          return Complex;
  35648.                         function Compose_From_Cartesian (Re   : Real'Base)
  35649.                          return Complex;
  35650.                         function Compose_From_Cartesian (Im   : Imaginary)
  35651.                          return Complex;
  35652.  
  35653.          9.
  35654.  
  35655.                         function Modulus (X   : Complex) return Real'Base;
  35656.                         function "abs"  (Right : Complex) return Real'Base
  35657.                          renames Modulus;
  35658.  
  35659.         10.
  35660.  
  35661.                         function Argument (X   : Complex)  return Real'Base;
  35662.                         function Argument (X   : Complex;
  35663.                                  Cycle : Real'Base) return Real'Base;
  35664.  
  35665.         11.
  35666.  
  35667.                         function Compose_From_Polar
  35668.                          (Modulus, Argument     : Real'Base)
  35669.                          return Complex;
  35670.                         function Compose_From_Polar
  35671.                          (Modulus, Argument, Cycle : Real'Base)
  35672.                          return Complex;
  35673.  
  35674.         12.
  35675.  
  35676.                         function "+"    (Right : Complex) return Complex;
  35677.                         function "-"    (Right : Complex) return Complex;
  35678.                         function Conjugate (X   : Complex) return Complex;
  35679.  
  35680.         13.
  35681.  
  35682.                         function "+" (Left, Right : Complex) return Complex;
  35683.                         function "-" (Left, Right : Complex) return Complex;
  35684.                         function "*" (Left, Right : Complex) return Complex;
  35685.                         function "/" (Left, Right : Complex) return Complex;
  35686.  
  35687.         14.
  35688.  
  35689.                         function "**" (Left : Complex; Right : Integer) return Complex;
  35690.  
  35691.         15.
  35692.  
  35693.                         function "+"    (Right : Imaginary) return Imaginary;
  35694.                         function "-"    (Right : Imaginary) return Imaginary;
  35695.                         function Conjugate (X   : Imaginary) return Imaginary
  35696.                          renames "-";
  35697.                         function "abs"   (Right : Imaginary) return Real'Base;
  35698.  
  35699.         16.
  35700.  
  35701.                         function "+" (Left, Right : Imaginary) return Imaginary;
  35702.                         function "-" (Left, Right : Imaginary) return Imaginary;
  35703.                         function "*" (Left, Right : Imaginary) return Real'Base;
  35704.                         function "/" (Left, Right : Imaginary) return Real'Base;
  35705.  
  35706.         17.
  35707.  
  35708.                         function "**" (Left : Imaginary; Right : Integer) return Complex;
  35709.  
  35710.         18.
  35711.  
  35712.                         function "<"  (Left, Right : Imaginary) return Boolean;
  35713.                         function "<=" (Left, Right : Imaginary) return Boolean;
  35714.                         function ">"  (Left, Right : Imaginary) return Boolean;
  35715.                         function ">=" (Left, Right : Imaginary) return Boolean;
  35716.  
  35717.         19.
  35718.  
  35719.                         function "+" (Left  : Complex;
  35720.                                Right : Real'Base) return Complex;
  35721.                         function "+" (Left  : Real'Base;
  35722.                                Right : Complex)  return Complex;
  35723.                         function "-" (Left  : Complex;
  35724.                                Right : Real'Base) return Complex;
  35725.                         function "-" (Left  : Real'Base;
  35726.                                Right : Complex)  return Complex;
  35727.                         function "*" (Left  : Complex;
  35728.                                Right : Real'Base) return Complex;
  35729.                         function "*" (Left  : Real'Base;
  35730.                                Right : Complex)  return Complex;
  35731.                         function "/" (Left  : Complex;
  35732.                                Right : Real'Base) return Complex;
  35733.                         function "/" (Left  : Real'Base;
  35734.                                Right : Complex)  return Complex;
  35735.  
  35736.         20.
  35737.  
  35738.                         function "+" (Left  : Complex;
  35739.                                Right : Imaginary) return Complex;
  35740.                         function "+" (Left  : Imaginary;
  35741.                                Right : Complex)  return Complex;
  35742.                         function "-" (Left  : Complex;
  35743.                                Right : Imaginary) return Complex;
  35744.                         function "-" (Left  : Imaginary;
  35745.                                Right : Complex)  return Complex;
  35746.                         function "*" (Left  : Complex;
  35747.                                Right : Imaginary) return Complex;
  35748.                         function "*" (Left  : Imaginary;
  35749.                                Right : Complex)  return Complex;
  35750.                         function "/" (Left  : Complex;
  35751.                                Right : Imaginary) return Complex;
  35752.                         function "/" (Left  : Imaginary;
  35753.                                Right : Complex)  return Complex;
  35754.  
  35755.         21.
  35756.  
  35757.                         function "+" (Left  : Imaginary;
  35758.                                Right : Real'Base) return Complex;
  35759.                         function "+" (Left  : Real'Base;
  35760.                                Right : Imaginary) return Complex;
  35761.                         function "-" (Left  : Imaginary;
  35762.                                Right : Real'Base) return Complex;
  35763.                         function "-" (Left  : Real'Base;
  35764.                                Right : Imaginary) return Complex;
  35765.                         function "*" (Left  : Imaginary;
  35766.                                Right : Real'Base) return Imaginary;
  35767.                         function "*" (Left  : Real'Base;
  35768.                                Right : Imaginary) return Imaginary;
  35769.                         function "/" (Left  : Imaginary;
  35770.                                Right : Real'Base) return Imaginary;
  35771.                         function "/" (Left  : Real'Base;
  35772.                                Right : Imaginary) return Imaginary;
  35773.  
  35774.         22.
  35775.  
  35776.                       private
  35777.  
  35778.         23.
  35779.  
  35780.                         type Imaginary is new Real'Base;
  35781.                         i : constant Imaginary := 1.0;
  35782.                         j : constant Imaginary := 1.0;
  35783.  
  35784.         24.
  35785.  
  35786.                       end Ada.Numerics.Generic_Complex_Types;
  35787.  
  35788.   25. The library package Numerics.Complex_Types defines the same types, 
  35789.       constants, and subprograms as Numerics.Generic_Complex_Types, except that 
  35790.       the predefined type Float is systematically substituted for Real'Base 
  35791.       throughout. Nongeneric equivalents of Numerics.Generic_Complex_Types for 
  35792.       each of the other predefined floating point types are defined similarly, 
  35793.       with the names Numerics.Short_Complex_Types, Numerics.Long_Complex_Types, 
  35794.       etc. 
  35795.  
  35796.   26. Complex is a visible type with cartesian components. 
  35797.  
  35798.   27. Imaginary is a private type; its full type is derived from Real'Base. 
  35799.  
  35800.   28. The arithmetic operations and the Re, Im, Modulus, Argument, and 
  35801.       Conjugate functions have their usual mathematical meanings. When applied 
  35802.       to a parameter of pure-imaginary type, the ``imaginary-part'' function Im 
  35803.       yields the value of its parameter, as the corresponding real value. The 
  35804.       remaining subprograms have the following meanings: 
  35805.  
  35806.         a. The Set_Re and Set_Im procedures replace the designated component of 
  35807.            a complex parameter with the given real value; applied to a 
  35808.            parameter of pure-imaginary type, the Set_Im procedure replaces the 
  35809.            value of that parameter with the imaginary value corresponding to 
  35810.            the given real value. 
  35811.  
  35812.         b. The Compose_From_Cartesian function constructs a complex value from 
  35813.            the given real and imaginary components. If only one component is 
  35814.            given, the other component is implicitly zero. 
  35815.  
  35816.         c. The Compose_From_Polar function constructs a complex value from the 
  35817.            given modulus (radius) and argument (angle). When the value of the 
  35818.            parameter Modulus is positive (resp., negative), the result is the 
  35819.            complex value represented by the point in the complex plane lying at 
  35820.            a distance from the origin given by the absolute value of Modulus 
  35821.            and forming an angle measured counterclockwise from the positive 
  35822.            (resp., negative) real axis given by the value of the parameter 
  35823.            Argument. 
  35824.  
  35825.    1. When the Cycle parameter is specified, the result of the Argument 
  35826.       function and the parameter Argument of the Compose_From_Polar function 
  35827.       are measured in units such that a full cycle of revolution has the given 
  35828.       value; otherwise, they are measured in radians. 
  35829.  
  35830.    2. The computed results of the mathematically multivalued functions are 
  35831.       rendered single-valued by the following conventions, which are meant to 
  35832.       imply the principal branch: 
  35833.  
  35834.         a. The result of the Modulus function is nonnegative. 
  35835.  
  35836.         b. The result of the Argument function is in the quadrant containing 
  35837.            the point in the complex plane represented by the parameter X. This 
  35838.            may be any quadrant (I through IV); thus, the range of the Argument 
  35839.            function is approximately -Pi to Pi (-Cycle/2.0 to Cycle/2.0, if the 
  35840.            parameter Cycle is specified). When the point represented by the 
  35841.            parameter X lies on the negative real axis, the result approximates 
  35842.  
  35843.              1. Pi (resp., -Pi) when the sign of the imaginary component of X 
  35844.                 is positive (resp., negative), if Real'Signed_Zeros is True; 
  35845.  
  35846.              2. Pi, if Real'Signed_Zeros is False. 
  35847.  
  35848.         a. Because a result lying on or near one of the axes may not be exactly 
  35849.            representable, the approximation inherent in computing the result 
  35850.            may place it in an adjacent quadrant, close to but on the wrong side 
  35851.            of the axis. 
  35852.  
  35853.   Dynamic Semantics
  35854.  
  35855.    1. The exception Numerics.Argument_Error is raised by the Argument and 
  35856.       Compose_From_Polar functions with specified cycle, signaling a parameter 
  35857.       value outside the domain of the corresponding mathematical function, when 
  35858.       the value of the parameter Cycle is zero or negative. 
  35859.  
  35860.    2. The exception Constraint_Error is raised by the division operator when 
  35861.       the value of the right operand is zero, and by the exponentiation 
  35862.       operator when the value of the left operand is zero and the value of the 
  35863.       exponent is negative, provided that Real'Machine_Overflows is True; when 
  35864.       Real'Machine_Overflows is False, the result is unspecified. 
  35865.       Constraint_Error can also be raised when a finite result overflows (see 
  35866.       G.2.6). 
  35867.  
  35868.             Implementation Requirements
  35869.  
  35870.    3. In the implementation of Numerics.Generic_Complex_Types, the range of 
  35871.       intermediate values allowed during the calculation of a final result 
  35872.       shall not be affected by any range constraint of the subtype Real. 
  35873.  
  35874.    4. In the following cases, evaluation of a complex arithmetic operation 
  35875.       shall yield the prescribed result, provided that the preceding rules do 
  35876.       not call for an exception to be raised: 
  35877.  
  35878.         a. The results of the Re, Im, and Compose_From_Cartesian functions are 
  35879.            exact. 
  35880.  
  35881.         b. The real (resp., imaginary) component of the result of a binary 
  35882.            addition operator that yields a result of complex type is exact when 
  35883.            either of its operands is of pure-imaginary (resp., real) type. 
  35884.  
  35885.         c. The real (resp., imaginary) component of the result of a binary 
  35886.            subtraction operator that yields a result of complex type is exact 
  35887.            when its right operand is of pure-imaginary (resp., real) type. 
  35888.  
  35889.         d. The real component of the result of the Conjugate function for the 
  35890.            complex type is exact. 
  35891.  
  35892.         e. When the point in the complex plane represented by the parameter X 
  35893.            lies on the nonnegative real axis, the Argument function yields a 
  35894.            result of zero. 
  35895.  
  35896.         f. When the value of the parameter Modulus is zero, the 
  35897.            Compose_From_Polar function yields a result of zero. 
  35898.  
  35899.         g. When the value of the parameter Argument is equal to a multiple of 
  35900.            the quarter cycle, the result of the Compose_From_Polar function 
  35901.            with specified cycle lies on one of the axes. In this case, one of 
  35902.            its components is zero, and the other has the magnitude of the 
  35903.            parameter Modulus. 
  35904.  
  35905.         h. Exponentiation by a zero exponent yields the value one. 
  35906.            Exponentiation by a unit exponent yields the value of the left 
  35907.            operand. Exponentiation of the value one yields the value one. 
  35908.            Exponentiation of the value zero yields the value zero, provided 
  35909.            that the exponent is nonzero. When the left operand is of 
  35910.            pure-imaginary type, one component of the result of the 
  35911.            exponentiation operator is zero. 
  35912.  
  35913.    1. When the result, or a result component, of any operator of 
  35914.       Numerics.Generic_Complex_Types has a mathematical definition in terms of 
  35915.       a single arithmetic or relational operation, that result or result 
  35916.       component exhibits the accuracy of the corresponding operation of the 
  35917.       type Real. 
  35918.  
  35919.    2. Other accuracy requirements for the Modulus, Argument, and 
  35920.       Compose_From_Polar functions, and accuracy requirements for the 
  35921.       multiplication of a pair of complex operands or for division by a complex 
  35922.       operand, all of which apply only in the strict mode, are given in G.2.6. 
  35923.  
  35924.    3. The sign of a zero result or zero result component yielded by a complex 
  35925.       arithmetic operation or function is implementation defined when 
  35926.       Real'Signed_Zeros is True. 
  35927.  
  35928.             Implementation Permissions
  35929.  
  35930.    4. The nongeneric equivalent packages may, but need not, be actual 
  35931.       instantiations of the generic package for the appropriate predefined 
  35932.       type. 
  35933.  
  35934.    5. Implementations may obtain the result of exponentiation of a complex or 
  35935.       pure-imaginary operand by repeated complex multiplication, with arbitrary 
  35936.       association of the factors and with a possible final complex 
  35937.       reciprocation (when the exponent is negative). Implementations are also 
  35938.       permitted to obtain the result of exponentiation of a complex operand, 
  35939.       but not of a pure-imaginary operand, by converting the left operand to a 
  35940.       polar representation; exponentiating the modulus by the given exponent; 
  35941.       multiplying the argument by the given exponent, when the exponent is 
  35942.       positive, or dividing the argument by the absolute value of the given 
  35943.       exponent, when the exponent is negative; and reconverting to a cartesian 
  35944.       representation. Because of this implementation freedom, no accuracy 
  35945.       requirement is imposed on complex exponentiation (except for the 
  35946.       prescribed results given above, which apply regardless of the 
  35947.       implementation method chosen). 
  35948.  
  35949.             Implementation Advice
  35950.  
  35951.    6. Because the usual mathematical meaning of multiplication of a complex 
  35952.       operand and a real operand is that of the scaling of both components of 
  35953.       the former by the latter, an implementation should not perform this 
  35954.       operation by first promoting the real operand to complex type and then 
  35955.       performing a full complex multiplication. In systems that, in the future, 
  35956.       support an Ada binding to IEC 559:1989, the latter technique will not 
  35957.       generate the required result when one of the components of the complex 
  35958.       operand is infinite. (Explicit multiplication of the infinite component 
  35959.       by the zero component obtained during promotion yields a NaN that 
  35960.       propagates into the final result.)  Analogous advice applies in the case 
  35961.       of multiplication of a complex operand and a pure-imaginary operand, and 
  35962.       in the case of division of a complex operand by a real or pure-imaginary 
  35963.       operand. 
  35964.  
  35965.    7. Likewise, because the usual mathematical meaning of addition of a complex 
  35966.       operand and a real operand is that the imaginary operand remains 
  35967.       unchanged, an implementation should not perform this operation by first 
  35968.       promoting the real operand to complex type and then performing a full 
  35969.       complex addition. In implementations in which the Signed_Zeros attribute 
  35970.       of the component type is True (and which therefore conform to IEC 
  35971.       559:1989 in regard to the handling of the sign of zero in predefined 
  35972.       arithmetic operations), the latter technique will not generate the 
  35973.       required result when the imaginary component of the complex operand is a 
  35974.       negatively signed zero. (Explicit addition of the negative zero to the 
  35975.       zero obtained during promotion yields a positive zero.)  Analogous advice 
  35976.       applies in the case of addition of a complex operand and a pure-imaginary 
  35977.       operand, and in the case of subtraction of a complex operand and a real 
  35978.       or pure-imaginary operand. 
  35979.  
  35980.    8. Implementations in which Real'Signed_Zeros is True should attempt to 
  35981.       provide a rational treatment of the signs of zero results and result 
  35982.       components. As one example, the result of the Argument function should 
  35983.       have the sign of the imaginary component of the parameter X when the 
  35984.       point represented by that parameter lies on the positive real axis; as 
  35985.       another, the sign of the imaginary component of the Compose_From_Polar 
  35986.       function should be the same as (resp., the opposite of) that of the 
  35987.       Argument parameter when that parameter has a value of zero and the 
  35988.       Modulus parameter has a nonnegative (resp., negative) value. 
  35989.  
  35990.  
  35991. ΓòÉΓòÉΓòÉ 23.1.2. Complex Elementary Functions ΓòÉΓòÉΓòÉ
  35992.  
  35993.  
  35994.   Static Semantics
  35995.  
  35996.    1. The generic library package Numerics.Generic_Complex_Elementary_Functions 
  35997.       has the following declaration: 
  35998.  
  35999.          2.
  36000.  
  36001.                       with Ada.Numerics.Generic_Complex_Types;
  36002.                       generic
  36003.                         with package Complex_Types is new
  36004.                          Ada.Numerics.Generic_Complex_Types (<>);
  36005.                         use Complex_Types;
  36006.                       package Ada.Numerics.Generic_Complex_Elementary_Functions is
  36007.                         pragma Pure(Generic_Complex_Elementary_Functions);
  36008.  
  36009.          3.
  36010.  
  36011.                         function Sqrt (X : Complex)  return Complex;
  36012.                         function Log  (X : Complex)  return Complex;
  36013.                         function Exp  (X : Complex)  return Complex;
  36014.                         function Exp  (X : Imaginary) return Complex;
  36015.                         function "**" (Left  : Complex;
  36016.                                Right : Complex)  return Complex;
  36017.                         function "**" (Left  : Complex;
  36018.                                Right : Real'Base) return Complex;
  36019.                         function "**" (Left  : Real'Base;
  36020.                                Right : Complex)  return Complex;
  36021.  
  36022.          4.
  36023.  
  36024.                         function Sin (X : Complex) return Complex;
  36025.                         function Cos (X : Complex) return Complex;
  36026.                         function Tan (X : Complex) return Complex;
  36027.                         function Cot (X : Complex) return Complex;
  36028.  
  36029.          5.
  36030.  
  36031.                         function Arcsin (X : Complex) return Complex;
  36032.                         function Arccos (X : Complex) return Complex;
  36033.                         function Arctan (X : Complex) return Complex;
  36034.                         function Arccot (X : Complex) return Complex;
  36035.  
  36036.          6.
  36037.  
  36038.                         function Sinh (X : Complex) return Complex;
  36039.                         function Cosh (X : Complex) return Complex;
  36040.                         function Tanh (X : Complex) return Complex;
  36041.                         function Coth (X : Complex) return Complex;
  36042.  
  36043.          7.
  36044.  
  36045.                         function Arcsinh (X : Complex) return Complex;
  36046.                         function Arccosh (X : Complex) return Complex;
  36047.                         function Arctanh (X : Complex) return Complex;
  36048.                         function Arccoth (X : Complex) return Complex;
  36049.  
  36050.          8.
  36051.  
  36052.                       end Ada.Numerics.Generic_Complex_Elementary_Functions;
  36053.  
  36054.    9. The library package Numerics.Complex_Elementary_Functions defines the 
  36055.       same subprograms as Numerics.Generic_Complex_Elementary_Functions, except 
  36056.       that the predefined type Float is systematically substituted for 
  36057.       Real'Base, and the Complex and Imaginary types exported by 
  36058.       Numerics.Complex_Types are systematically substituted for Complex and 
  36059.       Imaginary, throughout. Nongeneric equivalents of 
  36060.       Numerics.Generic_Complex_Elementary_Functions corresponding to each of 
  36061.       the other predefined floating point types are defined similarly, with the 
  36062.       names Numerics.Short_Complex_Elementary_Functions, 
  36063.       Numerics.Long_Complex_Elementary_Functions, etc. 
  36064.  
  36065.   10. The overloading of the Exp function for the pure-imaginary type is 
  36066.       provided to give the user an alternate way to compose a complex value 
  36067.       from a given modulus and argument. In addition to Compose_From_Polar(Rho, 
  36068.       Theta), see G.1.1, the programmer may write Rho * Exp(i * Theta). 
  36069.  
  36070.   11. The imaginary (resp., real) component of the parameter X of the forward 
  36071.       hyperbolic (resp., trigonometric) functions and of the Exp function (and 
  36072.       the parameter X, itself, in the case of the overloading of the Exp 
  36073.       function for the pure-imaginary type) represents an angle measured in 
  36074.       radians, as does the imaginary (resp., real) component of the result of 
  36075.       the Log and inverse hyperbolic (resp., trigonometric) functions. 
  36076.  
  36077.   12. The functions have their usual mathematical meanings. However, the 
  36078.       arbitrariness inherent in the placement of branch cuts, across which some 
  36079.       of the complex elementary functions exhibit discontinuities, is 
  36080.       eliminated by the following conventions: 
  36081.  
  36082.         a. The imaginary component of the result of the Sqrt and Log functions 
  36083.            is discontinuous as the parameter X crosses the negative real axis. 
  36084.  
  36085.         b. The result of the exponentiation operator when the left operand is 
  36086.            of complex type is discontinuous as that operand crosses the 
  36087.            negative real axis. 
  36088.  
  36089.         c. The real (resp., imaginary) component of the result of the Arcsin 
  36090.            and Arccos (resp., Arctanh) functions is discontinuous as the 
  36091.            parameter X crosses the real axis to the left of -1.0 or the right 
  36092.            of 1.0. 
  36093.  
  36094.         d. The real (resp., imaginary) component of the result of the Arctan 
  36095.            (resp., Arcsinh) function is discontinuous as the parameter X 
  36096.            crosses the imaginary axis below -i or above i. 
  36097.  
  36098.         e. The real component of the result of the Arccot function is 
  36099.            discontinuous as the parameter X crosses the imaginary axis between 
  36100.            -i and i. 
  36101.  
  36102.         f. The imaginary component of the Arccosh function is discontinuous as 
  36103.            the parameter X crosses the real axis to the left of 1.0. 
  36104.  
  36105.         g. The imaginary component of the result of the Arccoth function is 
  36106.            discontinuous as the parameter X crosses the real axis between -1.0 
  36107.            and 1.0. 
  36108.  
  36109.    1. The computed results of the mathematically multivalued functions are 
  36110.       rendered single-valued by the following conventions, which are meant to 
  36111.       imply the principal branch: 
  36112.  
  36113.         a. The real component of the result of the Sqrt and Arccosh functions 
  36114.            is nonnegative. 
  36115.  
  36116.         b. The same convention applies to the imaginary component of the result 
  36117.            of the Log function as applies to the result of the natural-cycle 
  36118.            version of the Argument function of Numerics.Generic_Complex_Types 
  36119.            (see G.1.1). 
  36120.  
  36121.         c. The range of the real (resp., imaginary) component of the result of 
  36122.            the Arcsin and Arctan (resp., Arcsinh and Arctanh) functions is 
  36123.            approximately -Pi/2.0 to Pi/2.0. 
  36124.  
  36125.         d. The real (resp., imaginary) component of the result of the Arccos 
  36126.            and Arccot (resp., Arccoth) functions ranges from 0.0 to 
  36127.            approximately Pi. 
  36128.  
  36129.         e. The range of the imaginary component of the result of the Arccosh 
  36130.            function is approximately -Pi to Pi. 
  36131.  
  36132.    1. In addition, the exponentiation operator inherits the single-valuedness 
  36133.       of the Log function. 
  36134.  
  36135.             Dynamic Semantics
  36136.  
  36137.    2. The exception Numerics.Argument_Error is raised by the exponentiation 
  36138.       operator, signaling a parameter value outside the domain of the 
  36139.       corresponding mathematical function, when the value of the left operand 
  36140.       is zero and the real component of the exponent (or the exponent itself, 
  36141.       when it is of real type) is zero. 
  36142.  
  36143.    3. The exception Constraint_Error is raised, signaling a pole of the 
  36144.       mathematical function (analogous to dividing by zero), in the following 
  36145.       cases, provided that Complex_Types.Real'Machine_Overflows is True: 
  36146.  
  36147.         a. by the Log, Cot, and Coth functions, when the value of the parameter 
  36148.            X is zero; 
  36149.  
  36150.         b. by the exponentiation operator, when the value of the left operand 
  36151.            is zero and the real component of the exponent (or the exponent 
  36152.            itself, when it is of real type) is negative; 
  36153.  
  36154.         c. by the Arctan and Arccot functions, when the value of the parameter 
  36155.            X is +/-i; 
  36156.  
  36157.         d. by the Arctanh and Arccoth functions, when the value of the 
  36158.            parameter X is +/-1.0. 
  36159.  
  36160.    1. Constraint_Error can also be raised when a finite result overflows (see 
  36161.       G.2.6) this may occur for parameter values sufficiently near poles, and, 
  36162.       in the case of some of the functions, for parameter values having 
  36163.       components of sufficiently large magnitude. When 
  36164.       Complex_Types.Real'Machine_Overflows is False, the result at poles is 
  36165.       unspecified. 
  36166.  
  36167.             Implementation Requirements
  36168.  
  36169.    2. In the implementation of Numerics.Generic_Complex_Elementary_Functions, 
  36170.       the range of intermediate values allowed during the calculation of a 
  36171.       final result shall not be affected by any range constraint of the subtype 
  36172.       Complex_Types.Real. 
  36173.  
  36174.    3. In the following cases, evaluation of a complex elementary function shall 
  36175.       yield the prescribed result (or a result having the prescribed 
  36176.       component), provided that the preceding rules do not call for an 
  36177.       exception to be raised: 
  36178.  
  36179.         a. When the parameter X has the value zero, the Sqrt, Sin, Arcsin, Tan, 
  36180.            Arctan, Sinh, Arcsinh, Tanh, and Arctanh functions yield a result of 
  36181.            zero; the Exp, Cos, and Cosh functions yield a result of one; the 
  36182.            Arccos and Arccot functions yield a real result; and the Arccoth 
  36183.            function yields an imaginary result. 
  36184.  
  36185.         b. When the parameter X has the value one, the Sqrt function yields a 
  36186.            result of one; the Log, Arccos, and Arccosh functions yield a result 
  36187.            of zero; and the Arcsin function yields a real result. 
  36188.  
  36189.         c. When the parameter X has the value -1.0, the Sqrt function yields 
  36190.            the result 
  36191.  
  36192.              1. i (resp., -i), when the sign of the imaginary component of X is 
  36193.                 positive (resp., negative), if Complex_Types.Real'Signed_Zeros 
  36194.                 is True; 
  36195.  
  36196.              2. i, if Complex_Types.Real'Signed_Zeros is False; 
  36197.  
  36198.         a. the Log function yields an imaginary result; and the Arcsin and 
  36199.            Arccos functions yield a real result. 
  36200.  
  36201.         b. When the parameter X has the value +/-i, the Log function yields an 
  36202.            imaginary result. 
  36203.  
  36204.         c. Exponentiation by a zero exponent yields the value one. 
  36205.            Exponentiation by a unit exponent yields the value of the left 
  36206.            operand (as a complex value). Exponentiation of the value one yields 
  36207.            the value one. Exponentiation of the value zero yields the value 
  36208.            zero. 
  36209.  
  36210.    1. Other accuracy requirements for the complex elementary functions, which 
  36211.       apply only in the strict mode, are given in G.2.6. 
  36212.  
  36213.    2. The sign of a zero result or zero result component yielded by a complex 
  36214.       elementary function is implementation defined when 
  36215.       Complex_Types.Real'Signed_Zeros is True. 
  36216.  
  36217.             Implementation Permissions
  36218.  
  36219.    3. The nongeneric equivalent packages may, but need not, be actual 
  36220.       instantiations of the generic package with the appropriate predefined 
  36221.       nongeneric equivalent of Numerics.Generic_Complex_Types; if they are, 
  36222.       then the latter shall have been obtained by actual instantiation of 
  36223.       Numerics.Generic_Complex_Types. 
  36224.  
  36225.    4. The exponentiation operator may be implemented in terms of the Exp and 
  36226.       Log functions. Because this implementation yields poor accuracy in some 
  36227.       parts of the domain, no accuracy requirement is imposed on complex 
  36228.       exponentiation. 
  36229.  
  36230.    5. The implementation of the Exp function of a complex parameter X is 
  36231.       allowed to raise the exception Constraint_Error, signaling overflow, when 
  36232.       the real component of X exceeds an unspecified threshold that is 
  36233.       approximately log (Complex_Types.Real'Safe_Last). This permission 
  36234.       recognizes the impracticality of avoiding overflow in the marginal case 
  36235.       that the exponential of the real component of X exceeds the safe range of 
  36236.       Complex_Types.Real but both components of the final result do not. 
  36237.       Similarly, the Sin and Cos (resp., Sinh and Cosh) functions are allowed 
  36238.       to raise the exception Constraint_Error, signaling overflow, when the 
  36239.       absolute value of the imaginary (resp., real) component of the parameter 
  36240.       X exceeds an unspecified threshold that is approximately log 
  36241.       (Complex_Types.Real'Safe_Last)+log (2.0). This permission recognizes the 
  36242.       impracticality of avoiding overflow in the marginal case that the 
  36243.       hyperbolic sine or cosine of the imaginary (resp., real) component of X 
  36244.       exceeds the safe range of Complex_Types.Real but both components of the 
  36245.       final result do not. 
  36246.  
  36247.             Implementation Advice
  36248.  
  36249.    6. Implementations in which Complex_Types.Real'Signed_Zeros is True should 
  36250.       attempt to provide a rational treatment of the signs of zero results and 
  36251.       result components. For example, many of the complex elementary functions 
  36252.       have components that are odd functions of one of the parameter 
  36253.       components; in these cases, the result component should have the sign of 
  36254.       the parameter component at the origin. Other complex elementary functions 
  36255.       have zero components whose sign is opposite that of a parameter component 
  36256.       at the origin, or is always positive or always negative. 
  36257.  
  36258.  
  36259. ΓòÉΓòÉΓòÉ 23.1.3. Complex Input-Output ΓòÉΓòÉΓòÉ
  36260.  
  36261.    1. The generic package Text_IO.Complex_IO defines procedures for the 
  36262.       formatted input and output of complex values. The generic actual 
  36263.       parameter in an instantiation of Text_IO.Complex_IO is an instance of 
  36264.       Numerics.Generic_Complex_Types for some floating point subtype. 
  36265.       Exceptional conditions are reported by raising the appropriate exception 
  36266.       defined in Text_IO. 
  36267.  
  36268.             Static Semantics
  36269.  
  36270.    2. The generic library package Text_IO.Complex_IO has the following 
  36271.       declaration: 
  36272.  
  36273.          3.
  36274.  
  36275.                       with Ada.Numerics.Generic_Complex_Types;
  36276.                       generic
  36277.                         with package Complex_Types is new
  36278.                          Ada.Numerics.Generic_Complex_Types (<>);
  36279.                       package Ada.Text_IO.Complex_IO is
  36280.  
  36281.          4.
  36282.  
  36283.                         use Complex_Types;
  36284.  
  36285.          5.
  36286.  
  36287.                         Default_Fore : Field := 2;
  36288.                         Default_Aft  : Field := Real'Digits - 1;
  36289.                         Default_Exp  : Field := 3;
  36290.  
  36291.          6.
  36292.  
  36293.                         procedure Get (File  : in  File_Type;
  36294.                                Item  : out Complex;
  36295.                                Width : in  Field := 0);
  36296.                         procedure Get (Item  : out Complex;
  36297.                                Width : in  Field := 0);
  36298.  
  36299.          7.
  36300.  
  36301.                         procedure Put (File : in File_Type;
  36302.                                Item : in Complex;
  36303.                                Fore : in Field := Default_Fore;
  36304.                                Aft  : in Field := Default_Aft;
  36305.                                Exp  : in Field := Default_Exp);
  36306.                         procedure Put (Item : in Complex;
  36307.                                Fore : in Field := Default_Fore;
  36308.                                Aft  : in Field := Default_Aft;
  36309.                                Exp  : in Field := Default_Exp);
  36310.  
  36311.          8.
  36312.  
  36313.                         procedure Get (From : in  String;
  36314.                                Item : out Complex;
  36315.                                Last : out Positive);
  36316.                         procedure Put (To  : out String;
  36317.                                Item : in  Complex;
  36318.                                Aft  : in  Field := Default_Aft;
  36319.                                Exp  : in  Field := Default_Exp);
  36320.  
  36321.          9.
  36322.  
  36323.                       end Ada.Text_IO.Complex_IO;
  36324.  
  36325.   10. The semantics of the Get and Put procedures are as follows: 
  36326.  
  36327.         11.
  36328.  
  36329.             procedure Get (File  : in  File_Type;
  36330.                     Item  : out Complex;
  36331.                     Width : in  Field := 0);
  36332.  
  36333.             procedure Get (Item  : out Complex;
  36334.                     Width : in  Field := 0);
  36335.  
  36336.         a. The input sequence is a pair of optionally signed real literals 
  36337.            representing the real and imaginary components of a complex value; 
  36338.            optionally, the pair of components may be separated by a comma 
  36339.            and/or surrounded by a pair of parentheses. Blanks are freely 
  36340.            allowed before each of the components and before the parentheses and 
  36341.            comma, if either is used. If the value of the parameter Width is 
  36342.            zero, then 
  36343.  
  36344.              1. line and page terminators are also allowed in these places; 
  36345.  
  36346.              2. the components shall be separated by at least one blank or line 
  36347.                 terminator if the comma is omitted; and 
  36348.  
  36349.              3. reading stops when the right parenthesis has been read, if the 
  36350.                 input sequence includes a left parenthesis, or when the 
  36351.                 imaginary component has been read, otherwise. 
  36352.       If a nonzero value of Width is supplied, then 
  36353.  
  36354.              1. the components shall be separated by at least one blank if the 
  36355.                 comma is omitted; and 
  36356.  
  36357.              2. exactly Width characters are read, or the characters (possibly 
  36358.                 none) up to a line terminator, whichever comes first (blanks 
  36359.                 are included in the count). 
  36360.  
  36361.         a. Returns, in the parameter Item, the value of type Complex that 
  36362.            corresponds to the input sequence. 
  36363.  
  36364.         b. The exception Text_IO.Data_Error is raised if the input sequence 
  36365.            does not have the required syntax or if the components of the 
  36366.            complex value obtained are not of the base subtype of 
  36367.            Complex_Types.Real. 
  36368.  
  36369.          1.
  36370.  
  36371.             procedure Put (File : in File_Type;
  36372.                     Item : in Complex;
  36373.                     Fore : in Field := Default_Fore;
  36374.                     Aft  : in Field := Default_Aft;
  36375.                     Exp  : in Field := Default_Exp);
  36376.  
  36377.             procedure Put (Item : in Complex;
  36378.                     Fore : in Field := Default_Fore;
  36379.                     Aft  : in Field := Default_Aft;
  36380.                     Exp  : in Field := Default_Exp);
  36381.  
  36382.         a. Outputs the value of the parameter Item as a pair of decimal 
  36383.            literals representing the real and imaginary components of the 
  36384.            complex value, using the syntax of an aggregate. More specifically, 
  36385.  
  36386.              1. outputs a left parenthesis; 
  36387.  
  36388.              2. outputs the value of the real component of the parameter Item 
  36389.                 with the format defined by the corresponding Put procedure of 
  36390.                 an instance of Text_IO.Float_IO for the base subtype of 
  36391.                 Complex_Types.Real, using the given values of Fore, Aft, and 
  36392.                 Exp; 
  36393.  
  36394.              3. outputs a comma; 
  36395.  
  36396.              4. outputs the value of the imaginary component of the parameter 
  36397.                 Item with the format defined by the corresponding Put procedure 
  36398.                 of an instance of Text_IO.Float_IO for the base subtype of 
  36399.                 Complex_Types.Real, using the given values of Fore, Aft, and 
  36400.                 Exp; 
  36401.  
  36402.              5. outputs a right parenthesis. 
  36403.  
  36404.          1.
  36405.  
  36406.             procedure Get (From : in  String;
  36407.                     Item : out Complex;
  36408.                     Last : out Positive);
  36409.  
  36410.         a. Reads a complex value from the beginning of the given string, 
  36411.            following the same rule as the Get procedure that reads a complex 
  36412.            value from a file, but treating the end of the string as a line 
  36413.            terminator. Returns, in the parameter Item, the value of type 
  36414.            Complex that corresponds to the input sequence. Returns in Last the 
  36415.            index value such that From(Last) is the last character read. 
  36416.  
  36417.         b. The exception Text_IO.Data_Error is raised if the input sequence 
  36418.            does not have the required syntax or if the components of the 
  36419.            complex value obtained are not of the base subtype of 
  36420.            Complex_Types.Real. 
  36421.  
  36422.          1.
  36423.  
  36424.             procedure Put (To  : out String;
  36425.                     Item : in  Complex;
  36426.                     Aft  : in  Field := Default_Aft;
  36427.                     Exp  : in  Field := Default_Exp);
  36428.  
  36429.         a. Outputs the value of the parameter Item to the given string as a 
  36430.            pair of decimal literals representing the real and imaginary 
  36431.            components of the complex value, using the syntax of an aggregate. 
  36432.            More specifically, 
  36433.  
  36434.              1. a left parenthesis, the real component, and a comma are left 
  36435.                 justified in the given string, with the real component having 
  36436.                 the format defined by the Put procedure (for output to a file) 
  36437.                 of an instance of Text_IO.Float_IO for the base subtype of 
  36438.                 Complex_Types.Real, using a value of zero for Fore and the 
  36439.                 given values of Aft and Exp; 
  36440.  
  36441.              2. the imaginary component and a right parenthesis are right 
  36442.                 justified in the given string, with the imaginary component 
  36443.                 having the format defined by the Put procedure (for output to a 
  36444.                 file) of an instance of Text_IO.Float_IO for the base subtype 
  36445.                 of Complex_Types.Real, using a value for Fore that completely 
  36446.                 fills the remainder of the string, together with the given 
  36447.                 values of Aft and Exp. 
  36448.  
  36449.         a. The exception Text_IO.Layout_Error is raised if the given string is 
  36450.            too short to hold the formatted output. 
  36451.  
  36452.   Implementation Permissions
  36453.  
  36454.    1. Other exceptions declared (by renaming) in Text_IO may be raised by the 
  36455.       preceding procedures in the appropriate circumstances, as for the 
  36456.       corresponding procedures of Text_IO.Float_IO. 
  36457.  
  36458.  
  36459. ΓòÉΓòÉΓòÉ 23.1.4. The Package Wide_Text_IO.Complex_IO ΓòÉΓòÉΓòÉ
  36460.  
  36461.  
  36462.   Static Semantics
  36463.  
  36464.    1. Implementations shall also provide the generic library package 
  36465.       Wide_Text_IO.Complex_IO. Its declaration is obtained from that of 
  36466.       Text_IO.Complex_IO by systematically replacing Text_IO by Wide_Text_IO 
  36467.       and String by Wide_String; the description of its behavior is obtained by 
  36468.       additionally replacing references to particular characters (commas, 
  36469.       parentheses, etc.) by those for the corresponding wide characters. 
  36470.  
  36471.  
  36472. ΓòÉΓòÉΓòÉ 23.2. Numeric Performance Requirements ΓòÉΓòÉΓòÉ
  36473.  
  36474.  
  36475.   Implementation Requirements
  36476.  
  36477.    1. Implementations shall provide a user-selectable mode in which the 
  36478.       accuracy and other numeric performance requirements detailed in the 
  36479.       following subclauses are observed. This mode, referred to as the strict 
  36480.       mode, may or may not be the default mode; it directly affects the results 
  36481.       of the predefined arithmetic operations of real types and the results of 
  36482.       the subprograms in children of the Numerics package, and indirectly 
  36483.       affects the operations in other language defined packages. 
  36484.       Implementations shall also provide the opposing mode, which is known as 
  36485.       the relaxed mode. 
  36486.  
  36487.             Implementation Permissions
  36488.  
  36489.    2. Either mode may be the default mode. 
  36490.  
  36491.    3. The two modes need not actually be different. 
  36492.  
  36493.  G.2.1                         Model of Floating Point Arithmetic 
  36494.  G.2.2                         Model-Oriented Attributes of Floating Point 
  36495.                                Types 
  36496.  G.2.3                         Model of Fixed Point Arithmetic 
  36497.  G.2.4                         Accuracy Requirements for the Elementary 
  36498.                                Functions 
  36499.  G.2.5                         Performance Requirements for Random Number 
  36500.                                Generation 
  36501.  G.2.6                         Accuracy Requirements for Complex Arithmetic 
  36502.  
  36503.  
  36504. ΓòÉΓòÉΓòÉ 23.2.1. Model of Floating Point Arithmetic ΓòÉΓòÉΓòÉ
  36505.  
  36506.    1. In the strict mode, the predefined operations of a floating point type 
  36507.       shall satisfy the accuracy requirements specified here and shall avoid or 
  36508.       signal overflow in the situations described. This behavior is presented 
  36509.       in terms of a model of floating point arithmetic that builds on the 
  36510.       concept of the canonical form, see A.5.3. 
  36511.  
  36512.             Static Semantics
  36513.  
  36514.    2. Associated with each floating point type is an infinite set of model 
  36515.       numbers. The model numbers of a type are used to define the accuracy 
  36516.       requirements that have to be satisfied by certain predefined operations 
  36517.       of the type; through certain attributes of the model numbers, they are 
  36518.       also used to explain the meaning of a user-declared floating point type 
  36519.       declaration. The model numbers of a derived type are those of the parent 
  36520.       type; the model numbers of a subtype are those of its type. 
  36521.  
  36522.    3. The model numbers of a floating point type T are zero and all the values 
  36523.       expressible in the canonical form (for the type T), in which mantissa has 
  36524.       T'Model_Mantissa digits and exponent has a value greater than or equal to 
  36525.       T'Model_Emin. (These attributes are defined in G.2.2.) 
  36526.  
  36527.    4. A model interval of a floating point type is any interval whose bounds 
  36528.       are model numbers of the type. The model interval of a type T associated 
  36529.       with a value v is the smallest model interval of T that includes v. (The 
  36530.       model interval associated with a model number of a type consists of that 
  36531.       number only.) 
  36532.  
  36533.             Implementation Requirements
  36534.  
  36535.    5. The accuracy requirements for the evaluation of certain predefined 
  36536.       operations of floating point types are as follows. 
  36537.  
  36538.    6. An operand interval is the model interval, of the type specified for the 
  36539.       operand of an operation, associated with the value of the operand. 
  36540.  
  36541.    7. For any predefined arithmetic operation that yields a result of a 
  36542.       floating point type T, the required bounds on the result are given by a 
  36543.       model interval of T (called the result interval) defined in terms of the 
  36544.       operand values as follows: 
  36545.  
  36546.         a. The result interval is the smallest model interval of T that 
  36547.            includes the minimum and the maximum of all the values obtained by 
  36548.            applying the (exact) mathematical operation to values arbitrarily 
  36549.            selected from the respective operand intervals. 
  36550.  
  36551.    1. The result interval of an exponentiation is obtained by applying the 
  36552.       above rule to the sequence of multiplications defined by the exponent, 
  36553.       assuming arbitrary association of the factors, and to the final division 
  36554.       in the case of a negative exponent. 
  36555.  
  36556.    2. The result interval of a conversion of a numeric value to a floating 
  36557.       point type T is the model interval of T associated with the operand 
  36558.       value, except when the source expression is of a fixed point type with a 
  36559.       small that is not a power of T'Machine_Radix or is a fixed point 
  36560.       multiplication or division either of whose operands has a small that is 
  36561.       not a power of T'Machine_Radix; in these cases, the result interval is 
  36562.       implementation defined. 
  36563.  
  36564.    3. For any of the foregoing operations, the implementation shall deliver a 
  36565.       value that belongs to the result interval when both bounds of the result 
  36566.       interval are in the safe range of the result type T, as determined by the 
  36567.       values of T'Safe_First and T'Safe_Last; otherwise, 
  36568.  
  36569.         a. if T'Machine_Overflows is True, the implementation shall either 
  36570.            deliver a value that belongs to the result interval or raise 
  36571.            Constraint_Error; 
  36572.  
  36573.         b. if T'Machine_Overflows is False, the result is implementation 
  36574.            defined. 
  36575.  
  36576.    1. For any predefined relation on operands of a floating point type T, the 
  36577.       implementation may deliver any value (i.e., either True or False) 
  36578.       obtained by applying the (exact) mathematical comparison to values 
  36579.       arbitrarily chosen from the respective operand intervals. 
  36580.  
  36581.    2. The result of a membership test is defined in terms of comparisons of the 
  36582.       operand value with the lower and upper bounds of the given range or type 
  36583.       mark (the usual rules apply to these comparisons). 
  36584.  
  36585.             Implementation Permissions
  36586.  
  36587.    3. If the underlying floating point hardware implements division as 
  36588.       multiplication by a reciprocal, the result interval for division (and 
  36589.       exponentiation by a negative exponent) is implementation defined. 
  36590.  
  36591.  
  36592. ΓòÉΓòÉΓòÉ 23.2.2. Model-Oriented Attributes of Floating Point Types ΓòÉΓòÉΓòÉ
  36593.  
  36594.    1. In implementations that support the Numerics Annex, the model-oriented 
  36595.       attributes of floating point types shall yield the values defined here, 
  36596.       in both the strict and the relaxed modes. These definitions add 
  36597.       conditions to those in A.5.3. 
  36598.  
  36599.             Static Semantics
  36600.  
  36601.    2. For every subtype S of a floating point type T: 
  36602.  
  36603.    3. S'Model_Mantissa 
  36604.  
  36605.                       Yields the number of digits in the mantissa of the
  36606.                       canonical form of the model numbers of T, see A.5.3.
  36607.                       The value of this attribute shall be greater than or
  36608.                       equal to Ceiling(d*log (10)/log (T'Machine_Radix))+1,
  36609.                       where d is the requested decimal precision of T. In
  36610.                       addition, it shall be less than or equal to the value of
  36611.                       T'Machine_Mantissa. This attribute yields a value of the
  36612.                       type universal_integer.
  36613.  
  36614.    4. S'Model_Emin 
  36615.  
  36616.                       Yields the minimum exponent of the canonical form of the model
  36617.                       numbers of T, see A.5.3. The value of this attribute shall
  36618.                       be greater than or equal to the value of T'Machine_Emin. This
  36619.                       attribute yields a value of the type universal_integer.
  36620.  
  36621.    5. S'Safe_First 
  36622.  
  36623.                       Yields the lower bound of the safe range of T. The value of
  36624.                       this attribute shall be a model number of T and greater than
  36625.                       or equal to the lower bound of the base range of T. In
  36626.                       addition, if T is declared by a floating_point_definition or
  36627.                       is derived from such a type, and the
  36628.                       floating_point_definition includes a real_range_specification
  36629.                       specifying a lower bound of lb, then the value of this
  36630.                       attribute shall be less than or equal to lb; otherwise, it
  36631.                       shall be less than or equal to -10.0 ** (4*d), where d is the
  36632.                       requested decimal precision of T. This attribute yields a
  36633.                       value of the type universal_real.
  36634.  
  36635.    6. S'Safe_Last 
  36636.  
  36637.                       Yields the upper bound of the safe range of T. The value of
  36638.                       this attribute shall be a model number of T and less than or
  36639.                       equal to the upper bound of the base range of T. In
  36640.                       addition, if T is declared by a floating_point_definition or
  36641.                       is derived from such a type, and the floating_point_definition
  36642.                       includes a real_range_specification specifying an
  36643.                       upper bound of ub, then the value of this attribute shall be
  36644.                       greater than or equal to ub; otherwise, it shall be greater
  36645.                       than or equal to 10.0 ** (4*d), where d is the requested
  36646.                       decimal precision of T. This attribute yields a value of the
  36647.                       type universal_real.
  36648.  
  36649.    7. S'Model 
  36650.  
  36651.                       Denotes a function (of a parameter X) whose specification is
  36652.                       given in A.5.3. If X is a model number of T, the
  36653.                       function yields X; otherwise, it yields the value obtained by
  36654.                       rounding or truncating X to either one of the adjacent model
  36655.                       numbers of T. Constraint_Error is raised if the resulting model
  36656.                       number is outside the safe range of S. A zero result has the
  36657.                       sign of X when S'Signed_Zeros is True.
  36658.  
  36659.    8. Subject to the constraints given above, the values of S'Model_Mantissa 
  36660.       and S'Safe_Last are to be maximized, and the values of S'Model_Emin and 
  36661.       S'Safe_First minimized, by the implementation as follows: 
  36662.  
  36663.         a. First, S'Model_Mantissa is set to the largest value for which values 
  36664.            of S'Model_Emin, S'Safe_First, and S'Safe_Last can be chosen so that 
  36665.            the implementation satisfies the strict-mode requirements of G.2.1, 
  36666.            in terms of the model numbers and safe range induced by these 
  36667.            attributes. 
  36668.  
  36669.         b. Next, S'Model_Emin is set to the smallest value for which values of 
  36670.            S'Safe_First and S'Safe_Last can be chosen so that the 
  36671.            implementation satisfies the strict-mode requirements of G.2.1, in 
  36672.            terms of the model numbers and safe range induced by these 
  36673.            attributes and the previously determined value of S'Model_Mantissa. 
  36674.  
  36675.         c. Finally, S'Safe_First and S'Safe_last are set (in either order) to 
  36676.            the smallest and largest values, respectively, for which the 
  36677.            implementation satisfies the strict-mode requirements of G.2.1, in 
  36678.            terms of the model numbers and safe range induced by these 
  36679.            attributes and the previously determined values of S'Model_Mantissa 
  36680.            and S'Model_Emin. 
  36681.  
  36682.  
  36683. ΓòÉΓòÉΓòÉ 23.2.3. Model of Fixed Point Arithmetic ΓòÉΓòÉΓòÉ
  36684.  
  36685.    1. In the strict mode, the predefined arithmetic operations of a fixed point 
  36686.       type shall satisfy the accuracy requirements specified here and shall 
  36687.       avoid or signal overflow in the situations described. 
  36688.  
  36689.             Implementation Requirements
  36690.  
  36691.    2. The accuracy requirements for the predefined fixed point arithmetic 
  36692.       operations and conversions, and the results of relations on fixed point 
  36693.       operands, are given below. 
  36694.  
  36695.    3. The operands of the fixed point adding operators, absolute value, and 
  36696.       comparisons have the same type. These operations are required to yield 
  36697.       exact results, unless they overflow. 
  36698.  
  36699.    4. Multiplications and divisions are allowed between operands of any two 
  36700.       fixed point types; the result has to be (implicitly or explicitly) 
  36701.       converted to some other numeric type. For purposes of defining the 
  36702.       accuracy rules, the multiplication or division and the conversion are 
  36703.       treated as a single operation whose accuracy depends on three types 
  36704.       (those of the operands and the result). For decimal fixed point types, 
  36705.       the attribute T'Round may be used to imply explicit conversion with 
  36706.       rounding, see 3.5.10. 
  36707.  
  36708.    5. When the result type is a floating point type, the accuracy is as given 
  36709.       in G.2.1. For some combinations of the operand and result types in the 
  36710.       remaining cases, the result is required to belong to a small set of 
  36711.       values called the perfect result set; for other combinations, it is 
  36712.       required merely to belong to a generally larger and 
  36713.       implementation-defined set of values called the close result set. When 
  36714.       the result type is a decimal fixed point type, the perfect result set 
  36715.       contains a single value; thus, operations on decimal types are always 
  36716.       fully specified. 
  36717.  
  36718.    6. When one operand of a fixed-fixed multiplication or division is of type 
  36719.       universal_real, that operand is not implicitly converted in the usual 
  36720.       sense, since the context does not determine a unique target type, but the 
  36721.       accuracy of the result of the multiplication or division (i.e., whether 
  36722.       the result has to belong to the perfect result set or merely the close 
  36723.       result set) depends on the value of the operand of type universal_real 
  36724.       and on the types of the other operand and of the result. 
  36725.  
  36726.    7. For a fixed point multiplication or division whose (exact) mathematical 
  36727.       result is v, and for the conversion of a value v to a fixed point type, 
  36728.       the perfect result set and close result set are defined as follows: 
  36729.  
  36730.         a. If the result type is an ordinary fixed point type with a small of 
  36731.            s, 
  36732.  
  36733.                   a. if v is an integer multiple of s, then the perfect result 
  36734.                      set contains only the value v; 
  36735.  
  36736.                   b. otherwise, it contains the integer multiple of s just 
  36737.                      below v and the integer multiple of s just above v. 
  36738.  
  36739.              1. The close result set is an implementation-defined set of 
  36740.                 consecutive integer multiples of s containing the perfect 
  36741.                 result set as a subset. 
  36742.  
  36743.         a. If the result type is a decimal type with a small of s, 
  36744.  
  36745.                   a. if v is an integer multiple of s, then the perfect result 
  36746.                      set contains only the value v; 
  36747.  
  36748.                   b. otherwise, if truncation applies then it contains only the 
  36749.                      integer multiple of s in the direction toward zero, 
  36750.                      whereas if rounding applies then it contains only the 
  36751.                      nearest integer multiple of s (with ties broken by 
  36752.                      rounding away from zero). 
  36753.  
  36754.              1. The close result set is an implementation-defined set of 
  36755.                 consecutive integer multiples of s containing the perfect 
  36756.                 result set as a subset. 
  36757.  
  36758.         a. If the result type is an integer type, 
  36759.  
  36760.                   a. if v is an integer, then the perfect result set contains 
  36761.                      only the value v; 
  36762.  
  36763.                   b. otherwise, it contains the integer nearest to the value v 
  36764.                      (if v lies equally distant from two consecutive integers, 
  36765.                      the perfect result set contains the one that is further 
  36766.                      from zero). 
  36767.  
  36768.              1. The close result set is an implementation-defined set of 
  36769.                 consecutive integers containing the perfect result set as a 
  36770.                 subset. 
  36771.  
  36772.    1. The result of a fixed point multiplication or division shall belong 
  36773.       either to the perfect result set or to the close result set, as described 
  36774.       below, if overflow does not occur. In the following cases, if the result 
  36775.       type is a fixed point type, let s be its small; otherwise, i.e. when the 
  36776.       result type is an integer type, let s be 1.0. 
  36777.  
  36778.         a. For a multiplication or division neither of whose operands is of 
  36779.            type universal_real, let l and r be the smalls of the left and right 
  36780.            operands. For a multiplication, if (l*r)/s is an integer or the 
  36781.            reciprocal of an integer (the smalls are said to be ``compatible'' 
  36782.            in this case), the result shall belong to the perfect result set; 
  36783.            otherwise, it belongs to the close result set. For a division, if 
  36784.            l/(r*s) is an integer or the reciprocal of an integer (i.e., the 
  36785.            smalls are compatible), the result shall belong to the perfect 
  36786.            result set; otherwise, it belongs to the close result set. 
  36787.  
  36788.         b. For a multiplication or division having one universal_real operand 
  36789.            with a value of v, note that it is always possible to factor v as an 
  36790.            integer multiple of a ``compatible'' small, but the integer multiple 
  36791.            may be ``too big.''  If there exists a factorization in which that 
  36792.            multiple is less than some implementation-defined limit, the result 
  36793.            shall belong to the perfect result set; otherwise, it belongs to the 
  36794.            close result set. 
  36795.  
  36796.    1. A multiplication P * Q of an operand of a fixed point type F by an 
  36797.       operand of an integer type I, or vice-versa, and a division P / Q of an 
  36798.       operand of a fixed point type F by an operand of an integer type I, are 
  36799.       also allowed. In these cases, the result has a type of F; explicit 
  36800.       conversion of the result is never required. The accuracy required in 
  36801.       these cases is the same as that required for a multiplication F(P * Q) or 
  36802.       a division F(P / Q) obtained by interpreting the operand of the integer 
  36803.       type to have a fixed point type with a small of 1.0. 
  36804.  
  36805.    2. The accuracy of the result of a conversion from an integer or fixed point 
  36806.       type to a fixed point type, or from a fixed point type to an integer 
  36807.       type, is the same as that of a fixed point multiplication of the source 
  36808.       value by a fixed point operand having a small of 1.0 and a value of 1.0, 
  36809.       as given by the foregoing rules. The result of a conversion from a 
  36810.       floating point type to a fixed point type shall belong to the close 
  36811.       result set. The result of a conversion of a universal_real operand to a 
  36812.       fixed point type shall belong to the perfect result set. 
  36813.  
  36814.    3. The possibility of overflow in the result of a predefined arithmetic 
  36815.       operation or conversion yielding a result of a fixed point type T is 
  36816.       analogous to that for floating point types, except for being related to 
  36817.       the base range instead of the safe range. If all of the permitted results 
  36818.       belong to the base range of T, then the implementation shall deliver one 
  36819.       of the permitted results; otherwise, 
  36820.  
  36821.         a. if T'Machine_Overflows is True, the implementation shall either 
  36822.            deliver one of the permitted results or raise Constraint_Error; 
  36823.  
  36824.         b. if T'Machine_Overflows is False, the result is implementation 
  36825.            defined. 
  36826.  
  36827.  
  36828. ΓòÉΓòÉΓòÉ 23.2.4. Accuracy Requirements for the Elementary Functions ΓòÉΓòÉΓòÉ
  36829.  
  36830.    1. In the strict mode, the performance of 
  36831.       Numerics.Generic_Elementary_Functions shall be as specified here. 
  36832.  
  36833.             Implementation Requirements
  36834.  
  36835.    2. When an exception is not raised, the result of evaluating a function in 
  36836.       an instance EF of Numerics.Generic_Elementary_Functions belongs to a 
  36837.       result interval, defined as the smallest model interval of EF.Float_Type 
  36838.       that contains all the values of the form f*(1.0+d), where f is the exact 
  36839.       value of the corresponding mathematical function at the given parameter 
  36840.       values, d is a real number, and |d| is less than or equal to the 
  36841.       function's maximum relative error. The function delivers a value that 
  36842.       belongs to the result interval when both of its bounds belong to the safe 
  36843.       range of EF.Float_Type; otherwise, 
  36844.  
  36845.         a. if EF.Float_Type'Machine_Overflows is True, the function either 
  36846.            delivers a value that belongs to the result interval or raises 
  36847.            Constraint_Error, signaling overflow; 
  36848.  
  36849.         b. if EF.Float_Type'Machine_Overflows is False, the result is 
  36850.            implementation defined. 
  36851.  
  36852.    1. The maximum relative error exhibited by each function is as follows: 
  36853.  
  36854.         a. 2.0*EF.Float_Type'Model_Epsilon, in the case of the Sqrt, Sin, and 
  36855.            Cos functions; 
  36856.  
  36857.         b. 4.0*EF.Float_Type'Model_Epsilon, in the case of the Log, Exp, Tan, 
  36858.            Cot, and inverse trigonometric functions; and 
  36859.  
  36860.         c. 8.0*EF.Float_Type'Model_Epsilon, in the case of the forward and 
  36861.            inverse hyperbolic functions. 
  36862.  
  36863.    1. The maximum relative error exhibited by the exponentiation operator, 
  36864.       which depends on the values of the operands, is (4.0+|Right*log 
  36865.       (Left)|/32.0)*EF.Float_Type'Model_Epsilon. 
  36866.  
  36867.    2. The maximum relative error given above applies throughout the domain of 
  36868.       the forward trigonometric functions when the Cycle parameter is 
  36869.       specified. When the Cycle parameter is omitted, the maximum relative 
  36870.       error given above applies only when the absolute value of the angle 
  36871.       parameter X is less than or equal to some implementation-defined angle 
  36872.       threshold, which shall be at least EF.Float_Type'Machine_Radix ** 
  36873.       Floor(EF.Float_Type'Machine_Mantissa/2). Beyond the angle threshold, the 
  36874.       accuracy of the forward trigonometric functions is implementation 
  36875.       defined. 
  36876.  
  36877.    3. The prescribed results specified in A.5.1, for certain functions at 
  36878.       particular parameter values take precedence over the maximum relative 
  36879.       error bounds; effectively, they narrow to a single value the result 
  36880.       interval allowed by the maximum relative error bounds. Additional rules 
  36881.       with a similar effect are given by the table below for the inverse 
  36882.       trigonometric functions, at particular parameter values for which the 
  36883.       mathematical result is possibly not a model number of EF.Float_Type (or 
  36884.       is, indeed, even transcendental). In each table entry, the values of the 
  36885.       parameters are such that the result lies on the axis between two 
  36886.       quadrants; the corresponding accuracy rule, which takes precedence over 
  36887.       the maximum relative error bounds, is that the result interval is the 
  36888.       model interval of EF.Float_Type associated with the exact mathematical 
  36889.       result given in the table. 
  36890.  
  36891.          4.
  36892.  
  36893.               +--------------------------------------------------------------+
  36894.              |                                |
  36895.              |    Tightly Approximated Elementary Function Results    |
  36896.              |                                |
  36897.              +-----------------+----------+----------+------------+-------- +
  36898.              |         |      |      |       |     |
  36899.              |         |      |      |  Exact   | Exact  |
  36900.              |         |      |      |  Result  | Result  |
  36901.              |         | Value of | Value of | when Cycle | when   |
  36902.              |   Function   |   X   |   Y   | Specified  | Cycle  |
  36903.              |         |      |      |       | Omitted |
  36904.              |         |      |      |       |     |
  36905.              +-----------------+----------+----------+------------+---------+
  36906.              |         |      |      |       |     |
  36907.              |   Arcsin    |  1.0   |  n.a.  | Cycle/4.0  |  Pi/2.0 |
  36908.              |         |      |      |       |     |
  36909.              |   Arcsin    |  -1.0  |  n.a.  | -Cycle/4.0 | -Pi/2.0 |
  36910.              |         |      |      |       |     |
  36911.              |   Arccos    |  0.0   |  n.a.  | Cycle/4.0  |  Pi/2.0 |
  36912.              |         |      |      |       |     |
  36913.              |   Arccos    |  -1.0  |  n.a.  | Cycle/2.0  |   Pi  |
  36914.              |         |      |      |       |     |
  36915.              | Arctan & Arccot |  0.0   | positive | Cycle/4.0  |  Pi/2.0 |
  36916.              |         |      |      |       |     |
  36917.              | Arctan & Arccot |  0.0   | negative | -Cycle/4.0 | -Pi/2.0 |
  36918.              |         |      |      |       |     |
  36919.              | Arctan & Arccot | negative |  +0.0  | Cycle/2.0  |   Pi  |
  36920.              |         |      |      |       |     |
  36921.              | Arctan & Arccot | negative |  -0.0  | -Cycle/2.0 |  -Pi  |
  36922.              |         |      |      |       |     |
  36923.              | Arctan & Arccot | negative |  0.0   | Cycle/2.0  |   Pi  |
  36924.              |         |      |      |       |     |
  36925.              +-----------------+----------+----------+------------+---------+
  36926.  
  36927.    5. The last line of the table is meant to apply when EF.Float_Type'Signed_ 
  36928.       Zeros is False; the two lines just above it, when 
  36929.       EF.Float_Type'Signed_Zeros is True and the parameter Y has a zero value 
  36930.       with the indicated sign. 
  36931.  
  36932.    6. The amount by which the result of an inverse trigonometric function is 
  36933.       allowed to spill over into a quadrant adjacent to the one corresponding 
  36934.       to the principal branch, as given in A.5.1, is limited. The rule is that 
  36935.       the result belongs to the smallest model interval of EF.Float_Type that 
  36936.       contains both boundaries of the quadrant corresponding to the principal 
  36937.       branch. This rule also takes precedence over the maximum relative error 
  36938.       bounds, effectively narrowing the result interval allowed by them. 
  36939.  
  36940.    7. Finally, the following specifications also take precedence over the 
  36941.       maximum relative error bounds: 
  36942.  
  36943.         a. The absolute value of the result of the Sin, Cos, and Tanh functions 
  36944.            never exceeds one. 
  36945.  
  36946.         b. The absolute value of the result of the Coth function is never less 
  36947.            than one. 
  36948.  
  36949.         c. The result of the Cosh function is never less than one. 
  36950.  
  36951.   Implementation Advice
  36952.  
  36953.    1. The versions of the forward trigonometric functions without a Cycle 
  36954.       parameter should not be implemented by calling the corresponding version 
  36955.       with a Cycle parameter of 2.0*Numerics.Pi, since this will not provide 
  36956.       the required accuracy in some portions of the domain. For the same 
  36957.       reason, the version of Log without a Base parameter should not be 
  36958.       implemented by calling the corresponding version with a Base parameter of 
  36959.       Numerics.e. 
  36960.  
  36961.  
  36962. ΓòÉΓòÉΓòÉ 23.2.5. Performance Requirements for Random Number Generation ΓòÉΓòÉΓòÉ
  36963.  
  36964.    1. In the strict mode, the performance of Numerics.Float_Random and 
  36965.       Numerics.Discrete_Random shall be as specified here. 
  36966.  
  36967.             Implementation Requirements
  36968.  
  36969.    2. Two different calls to the time-dependent Reset procedure shall reset the 
  36970.       generator to different states, provided that the calls are separated in 
  36971.       time by at least one second and not more than fifty years. 
  36972.  
  36973.    3. The implementation's representations of generator states and its 
  36974.       algorithms for generating random numbers shall yield a period of at least 
  36975.       2**31-2; much longer periods are desirable but not required. 
  36976.  
  36977.    4. The implementations of Numerics.Float_Random.Random and 
  36978.       Numerics.Discrete_Random.Random shall pass at least 85% of the individual 
  36979.       trials in a suite of statistical tests. For Numerics.Float_Random, the 
  36980.       tests are applied directly to the floating point values generated (i.e., 
  36981.       they are not converted to integers first), while for 
  36982.       Numerics.Discrete_Random they are applied to the generated values of 
  36983.       various discrete types. Each test suite performs 6 different tests, with 
  36984.       each test repeated 10 times, yielding a total of 60 individual trials. An 
  36985.       individual trial is deemed to pass if the chi-square value (or other 
  36986.       statistic) calculated for the observed counts or distribution falls 
  36987.       within the range of values corresponding to the 2.5 and 97.5 percentage 
  36988.       points for the relevant degrees of freedom (i.e., it shall be neither too 
  36989.       high nor too low). For the purpose of determining the degrees of freedom, 
  36990.       measurement categories are combined whenever the expected counts are 
  36991.       fewer than 5. 
  36992.  
  36993.  
  36994. ΓòÉΓòÉΓòÉ 23.2.6. Accuracy Requirements for Complex Arithmetic ΓòÉΓòÉΓòÉ
  36995.  
  36996.    1. In the strict mode, the performance of Numerics.Generic_Complex_Types and 
  36997.       Numerics.Generic_Complex_Elementary_Functions shall be as specified here. 
  36998.  
  36999.             Implementation Requirements
  37000.  
  37001.    2. When an exception is not raised, the result of evaluating a real function 
  37002.       of an instance CT of Numerics.Generic_Complex_Types (i.e., a function 
  37003.       that yields a value of subtype CT.Real'Base or CT.Imaginary) belongs to a 
  37004.       result interval defined as for a real elementary function (see G.2.4). 
  37005.  
  37006.    3. When an exception is not raised, each component of the result of 
  37007.       evaluating a complex function of such an instance, or of an instance of 
  37008.       Numerics.Generic_Complex_Elementary_Functions obtained by instantiating 
  37009.       the latter with CT (i.e., a function that yields a value of subtype 
  37010.       CT.Complex), also belongs to a result interval. The result intervals for 
  37011.       the components of the result are either defined by a maximum relative 
  37012.       error bound or by a maximum box error bound. When the result interval for 
  37013.       the real (resp., imaginary) component is defined by maximum relative 
  37014.       error, it is defined as for that of a real function, relative to the 
  37015.       exact value of the real (resp., imaginary) part of the result of the 
  37016.       corresponding mathematical function. When defined by maximum box error, 
  37017.       the result interval for a component of the result is the smallest model 
  37018.       interval of CT.Real that contains all the values of the corresponding 
  37019.       part of f*(1.0+d), where f is the exact complex value of the 
  37020.       corresponding mathematical function at the given parameter values, d is 
  37021.       complex, and |d| is less than or equal to the given maximum box error. 
  37022.       The function delivers a value that belongs to the result interval (or a 
  37023.       value both of whose components belong to their respective result 
  37024.       intervals) when both bounds of the result interval(s) belong to the safe 
  37025.       range of CT.Real; otherwise, 
  37026.  
  37027.         a. if CT.Real'Machine_Overflows is True, the function either delivers a 
  37028.            value that belongs to the result interval (or a value both of whose 
  37029.            components belong to their respective result intervals) or raises 
  37030.            Constraint_Error, signaling overflow; 
  37031.  
  37032.         b. if CT.Real'Machine_Overflows is False, the result is implementation 
  37033.            defined. 
  37034.  
  37035.    1. The error bounds for particular complex functions are tabulated below. In 
  37036.       the table, the error bound is given as the coefficient of 
  37037.       CT.Real'Model_Epsilon. 
  37038.  
  37039.          2.
  37040.  
  37041.               +-----------------------------------------------------------------+
  37042.              |                                 |
  37043.              |      Error Bounds for Particular Complex Functions      |
  37044.              |                                 |
  37045.              +-----------------------------+---------+-----------------+-------+
  37046.              |               |     |         |    |
  37047.              |               | Nature  |   Nature of   | Error |
  37048.              |   Function or Operator   |  of   |    Bound    | Bound |
  37049.              |               | Result  |         |    |
  37050.              |               |     |         |    |
  37051.              +-----------------------------+---------+-----------------+-------+
  37052.              |               |     |         |    |
  37053.              |      Modulus      |  real  | max. rel. error |  3.0 |
  37054.              |               |     |         |    |
  37055.              |      Argument      |  real  | max. rel. error |  4.0 |
  37056.              |               |     |         |    |
  37057.              |   Compose_From_Polar    | complex | max. rel. error |  3.0 |
  37058.              |               |     |         |    |
  37059.              | "*" (both operands complex) | complex | max. box error  |  5.0 |
  37060.              |               |     |         |    |
  37061.              | "/" (right operand complex) | complex | max. box error  |  13.0 |
  37062.              |               |     |         |    |
  37063.              |       Sqrt       | complex | max. rel. error |  6.0 |
  37064.              |               |     |         |    |
  37065.              |       Log       | complex | max. box error  |  13.0 |
  37066.              |               |     |         |    |
  37067.              |  Exp (complex parameter)  | complex | max. rel. error |  7.0 |
  37068.              |               |     |         |    |
  37069.              |  Exp (imaginary parameter)  | complex | max. rel. error |  2.0 |
  37070.              |               |     |         |    |
  37071.              |  Sin, Cos, Sinh, and Cosh  | complex | max. rel. error |  11.0 |
  37072.              |               |     |         |    |
  37073.              |  Tan, Cot, Tanh, and Coth  | complex | max. rel. error |  35.0 |
  37074.              |               |     |         |    |
  37075.              |   inverse trigonometric   | complex | max. rel. error |  14.0 |
  37076.              |               |     |         |    |
  37077.              |   inverse hyperbolic    | complex | max. rel. error |  14.0 |
  37078.              |               |     |         |    |
  37079.              +-----------------------------+---------+-----------------+-------+
  37080.  
  37081.    3. The maximum relative error given above applies throughout the domain of 
  37082.       the Compose_From_Polar function when the Cycle parameter is specified. 
  37083.       When the Cycle parameter is omitted, the maximum relative error applies 
  37084.       only when the absolute value of the parameter Argument is less than or 
  37085.       equal to the angle threshold, see G.2.4. For the Exp function, and for 
  37086.       the forward hyperbolic (resp., trigonometric) functions, the maximum 
  37087.       relative error given above likewise applies only when the absolute value 
  37088.       of the imaginary (resp., real) component of the parameter X (or the 
  37089.       absolute value of the parameter itself, in the case of the Exp function 
  37090.       with a parameter of pure-imaginary type) is less than or equal to the 
  37091.       angle threshold. For larger angles, the accuracy is implementation 
  37092.       defined. 
  37093.  
  37094.    4. The prescribed results specified in G.1.2, for certain functions at 
  37095.       particular parameter values take precedence over the error bounds; 
  37096.       effectively, they narrow to a single value the result interval allowed by 
  37097.       the error bounds for a component of the result. Additional rules with a 
  37098.       similar effect are given below for certain inverse trigonometric and 
  37099.       inverse hyperbolic functions, at particular parameter values for which a 
  37100.       component of the mathematical result is transcendental. In each case, the 
  37101.       accuracy rule, which takes precedence over the error bounds, is that the 
  37102.       result interval for the stated result component is the model interval of 
  37103.       CT.Real associated with the component's exact mathematical value. The 
  37104.       cases in question are as follows: 
  37105.  
  37106.         a. When the parameter X has the value zero, the real (resp., imaginary) 
  37107.            component of the result of the Arccot (resp., Arccoth) function is 
  37108.            in the model interval of CT.Real associated with the value Pi/2.0. 
  37109.  
  37110.         b. When the parameter X has the value one, the real component of the 
  37111.            result of the Arcsin function is in the model interval of CT.Real 
  37112.            associated with the value Pi/2.0. 
  37113.  
  37114.         c. When the parameter X has the value -1.0, the real component of the 
  37115.            result of the Arcsin (resp., Arccos) function is in the model 
  37116.            interval of CT.Real associated with the value -Pi/2.0 (resp., Pi). 
  37117.  
  37118.    1. The amount by which a component of the result of an inverse trigonometric 
  37119.       or inverse hyperbolic function is allowed to spill over into a quadrant 
  37120.       adjacent to the one corresponding to the principal branch, as given in 
  37121.       G.1.2, is limited. The rule is that the result belongs to the smallest 
  37122.       model interval of CT.Real that contains both boundaries of the quadrant 
  37123.       corresponding to the principal branch. This rule also takes precedence to 
  37124.       the maximum error bounds, effectively narrowing the result interval 
  37125.       allowed by them. 
  37126.  
  37127.    2. Finally, the results allowed by the error bounds are narrowed by one 
  37128.       further rule: The absolute value of each component of the result of the 
  37129.       Exp function, for a pure-imaginary parameter, never exceeds one. 
  37130.  
  37131.             Implementation Advice
  37132.  
  37133.    3. The version of the Compose_From_Polar function without a Cycle parameter 
  37134.       should not be implemented by calling the corresponding version with a 
  37135.       Cycle parameter of 2.0*Numerics.Pi, since this will not provide the 
  37136.       required accuracy in some portions of the domain. 
  37137.  
  37138.  
  37139. ΓòÉΓòÉΓòÉ 24. Safety and Security (normative) ΓòÉΓòÉΓòÉ
  37140.  
  37141.    1. This Annex addresses requirements for systems that are safety critical or 
  37142.       have security constraints. It provides facilities and specifies 
  37143.       documentation requirements that relate to several needs: 
  37144.  
  37145.         a. Understanding program execution; 
  37146.  
  37147.         b. Reviewing object code; 
  37148.  
  37149.         c. Restricting language constructs whose usage might complicate the 
  37150.            demonstration of program correctness 
  37151.   Execution understandability is supported by pragma Normalize_Scalars, and 
  37152.  also by requirements for the implementation to document the effect of a 
  37153.  program in the presence of a bounded error or where the language rules leave 
  37154.  the effect unspecified. 
  37155.  
  37156.    1. The pragmas Reviewable and Restrictions relate to the other requirements 
  37157.       addressed by this Annex. 
  37158.  
  37159.       NOTES 
  37160.  
  37161.    2. (1) The Valid attribute, see 13.9.2, is also useful in addressing these 
  37162.       needs, to avoid problems that could otherwise arise from scalars that 
  37163.       have values outside their declared range constraints. 
  37164.  
  37165.  H.1                           Pragma Normalize_Scalars 
  37166.  H.2                           Documentation of Implementation Decisions 
  37167.  H.3                           Reviewable Object Code 
  37168.  H.4                           Safety and Security Restrictions --- The 
  37169.                                Detailed Node Listing --- 
  37170.  H.1                           Pragma Normalize_Scalars 
  37171.  H.2                           Documentation of Implementation Decisions 
  37172.  H.3                           Reviewable Object Code 
  37173.  H.3.1                         Pragma Reviewable 
  37174.  H.3.2                         Pragma Inspection_Point 
  37175.  H.4                           Safety and Security Restrictions 
  37176.  
  37177.  
  37178. ΓòÉΓòÉΓòÉ 24.1. Pragma Normalize_Scalars ΓòÉΓòÉΓòÉ
  37179.  
  37180.    1. This pragma ensures that an otherwise uninitialized scalar object is set 
  37181.       to a predictable value, but out of range if possible. 
  37182.  
  37183.             Syntax
  37184.  
  37185.    2. The form of a pragma Normalize_Scalars is as follows: 
  37186.  
  37187.          3.
  37188.  
  37189.                       pragma Normalize_Scalars;
  37190.  
  37191.   Post-Compilation Rules
  37192.  
  37193.    4. Pragma Normalize_Scalars is a configuration pragma. It applies to all 
  37194.       compilation_units included in a partition. 
  37195.  
  37196.             Documentation Requirements
  37197.  
  37198.    5. If a pragma Normalize_Scalars applies, the implementation shall document 
  37199.       the implicit initial value for scalar subtypes, and shall identify each 
  37200.       case in which such a value is used and is not an invalid representation. 
  37201.  
  37202.             Implementation Advice
  37203.  
  37204.    6. Whenever possible, the implicit initial value for a scalar subtype should 
  37205.       be an invalid representation, see 13.9.1. 
  37206.  
  37207.       NOTES 
  37208.  
  37209.    7. (2) The initialization requirement applies to uninitialized scalar 
  37210.       objects that are subcomponents of composite objects, to allocated 
  37211.       objects, and to stand-alone objects. It also applies to scalar out 
  37212.       parameters. Scalar subcomponents of composite out parameters are 
  37213.       initialized to the corresponding part of the actual, by virtue of 6.4.1. 
  37214.  
  37215.    8. (3) The initialization requirement does not apply to a scalar for which 
  37216.       pragma Import has been specified, since initialization of an imported 
  37217.       object is performed solely by the foreign language environment (see B.1). 
  37218.  
  37219.    9. (4) The use of pragma Normalize_Scalars in conjunction with Pragma 
  37220.       Restrictions(No_Exceptions) may result in erroneous execution (see H.4). 
  37221.  
  37222.  
  37223. ΓòÉΓòÉΓòÉ 24.2. Documentation of Implementation Decisions ΓòÉΓòÉΓòÉ
  37224.  
  37225.  
  37226.   Documentation Requirements
  37227.  
  37228.    1. The implementation shall document the range of effects for each situation 
  37229.       that the language rules identify as either a bounded error or as having 
  37230.       an unspecified effect. If the implementation can constrain the effects of 
  37231.       erroneous execution for a given construct, then it shall document such 
  37232.       constraints. The documentation might be provided either independently of 
  37233.       any compilation unit or partition, or as part of an annotated listing for 
  37234.       a given unit or partition. See also  1.1.3, and 1.1.2. 
  37235.  
  37236.       NOTES 
  37237.  
  37238.    2. (5) Among the situations to be documented are the conventions chosen for 
  37239.       parameter passing, the methods used for the management of run-time 
  37240.       storage, and the method used to evaluate numeric expressions if this 
  37241.       involves extended range or extra precision. 
  37242.  
  37243.  
  37244. ΓòÉΓòÉΓòÉ 24.3. Reviewable Object Code ΓòÉΓòÉΓòÉ
  37245.  
  37246.    1. Object code review and validation are supported by pragmas Reviewable and 
  37247.       Inspection_Point. 
  37248.  
  37249.  H.3.1                         Pragma Reviewable 
  37250.  H.3.2                         Pragma Inspection_Point 
  37251.  
  37252.  
  37253. ΓòÉΓòÉΓòÉ 24.3.1. Pragma Reviewable ΓòÉΓòÉΓòÉ
  37254.  
  37255.    1. This pragma directs the implementation to provide information to 
  37256.       facilitate analysis and review of a program's object code, in particular 
  37257.       to allow determination of execution time and storage usage and to 
  37258.       identify the correspondence between the source and object programs. 
  37259.  
  37260.             Syntax
  37261.  
  37262.    2. The form of a pragma Reviewable is as follows: 
  37263.  
  37264.          3.
  37265.  
  37266.                       pragma Reviewable;
  37267.  
  37268.   Post-Compilation Rules
  37269.  
  37270.    4. Pragma Reviewable is a configuration pragma. It applies to all 
  37271.       compilation_units included in a partition. 
  37272.  
  37273.             Implementation Requirements
  37274.  
  37275.    5. The implementation shall provide the following information for any 
  37276.       compilation unit to which such a pragma applies: 
  37277.  
  37278.         a. Where compiler-generated run-time checks remain; 
  37279.  
  37280.         b. An identification of any construct with a language-defined check 
  37281.            that is recognized prior to run time as certain to fail if executed 
  37282.            (even if the generation of run-time checks has been suppressed); 
  37283.  
  37284.         c. For each reference to a scalar object, an identification of the 
  37285.            reference as either ``known to be initialized,'' or ``possibly 
  37286.            uninitialized,'' independent of whether pragma Normalize_Scalars 
  37287.            applies; 
  37288.  
  37289.         d. Where run-time support routines are implicitly invoked; 
  37290.  
  37291.         e. An object code listing, including: 
  37292.  
  37293.              1. Machine instructions, with relative offsets; 
  37294.  
  37295.              2. Where each data object is stored during its lifetime; 
  37296.  
  37297.              3. Correspondence with the source program, including an 
  37298.                 identification of the code produced per declaration and per 
  37299.                 statement. 
  37300.  
  37301.         a. An identification of each construct for which the implementation 
  37302.            detects the possibility of erroneous execution; 
  37303.  
  37304.         b. For each subprogram, block, task, or other construct implemented by 
  37305.            reserving and subsequently freeing an area on a run-time stack, an 
  37306.            identification of the length of the fixed-size portion of the area 
  37307.            and an indication of whether the non-fixed size portion is reserved 
  37308.            on the stack or in a dynamically-managed storage region. 
  37309.  
  37310.    1. The implementation shall provide the following information for any 
  37311.       partition to which the pragma applies: 
  37312.  
  37313.         a. An object code listing of the entire partition, including 
  37314.            initialization and finalization code as well as run-time system 
  37315.            components, and with an identification of those instructions and 
  37316.            data that will be relocated at load time; 
  37317.  
  37318.         b. A description of the run-time model relevant to the partition. 
  37319.   The implementation shall provide control- and data-flow information, both 
  37320.  within each compilation unit and across the compilation units of the 
  37321.  partition. 
  37322.  
  37323.   Implementation Advice
  37324.  
  37325.    1. The implementation should provide the above information in both a 
  37326.       human-readable and machine-readable form, and should document the latter 
  37327.       so as to ease further processing by automated tools. 
  37328.  
  37329.    2. Object code listings should be provided both in a symbolic format and 
  37330.       also in an appropriate numeric format (such as hexadecimal or octal). 
  37331.  
  37332.       NOTES 
  37333.  
  37334.    3. (6) The order of elaboration of library units will be documented even in 
  37335.       the absence of pragma Reviewable, see 10.2. 
  37336.  
  37337.  
  37338. ΓòÉΓòÉΓòÉ 24.3.2. Pragma Inspection_Point ΓòÉΓòÉΓòÉ
  37339.  
  37340.    1. An occurrence of a pragma Inspection_Point identifies a set of objects 
  37341.       each of whose values is to be available at the point(s) during program 
  37342.       execution corresponding to the position of the pragma in the compilation 
  37343.       unit. The purpose of such a pragma is to facilitate code validation. 
  37344.  
  37345.             Syntax
  37346.  
  37347.    2. The form of a pragma Inspection_Point is as follows: 
  37348.  
  37349.          3.
  37350.  
  37351.                       pragma Inspection_Point[(object_name {, object_name})];
  37352.  
  37353.   Legality Rules
  37354.  
  37355.    4. A pragma Inspection_Point is allowed wherever a declarative_item or 
  37356.       statement is allowed. Each object_name shall statically denote the 
  37357.       declaration of an object. 
  37358.  
  37359.             Static Semantics
  37360.  
  37361.    5. An inspection point is a point in the object code corresponding to the 
  37362.       occurrence of a pragma Inspection_Point in the compilation unit. An 
  37363.       object is inspectable at an inspection point if the corresponding pragma 
  37364.       Inspection_Point either has an argument denoting that object, or has no 
  37365.       arguments. 
  37366.  
  37367.             Dynamic Semantics
  37368.  
  37369.    6. Execution of a pragma Inspection_Point has no effect. 
  37370.  
  37371.             Implementation Requirements
  37372.  
  37373.    7. Reaching an inspection point is an external interaction with respect to 
  37374.       the values of the inspectable objects at that point, see 1.1.3. 
  37375.  
  37376.             Documentation Requirements
  37377.  
  37378.    8. For each inspection point, the implementation shall identify a mapping 
  37379.       between each inspectable object and the machine resources (such as memory 
  37380.       locations or registers) from which the object's value can be obtained. 
  37381.  
  37382.       NOTES 
  37383.  
  37384.    9. (7) The implementation is not allowed to perform ``dead store 
  37385.       elimination'' on the last assignment to a variable prior to a point where 
  37386.       the variable is inspectable. Thus an inspection point has the effect of 
  37387.       an implicit reference to each of its inspectable objects. 
  37388.  
  37389.   10. (8) Inspection points are useful in maintaining a correspondence between 
  37390.       the state of the program in source code terms, and the machine state 
  37391.       during the program's execution. Assertions about the values of program 
  37392.       objects can be tested in machine terms at inspection points. Object code 
  37393.       between inspection points can be processed by automated tools to verify 
  37394.       programs mechanically. 
  37395.  
  37396.   11. (9) The identification of the mapping from source program objects to 
  37397.       machine resources is allowed to be in the form of an annotated object 
  37398.       listing, in human-readable or tool-processable form. 
  37399.  
  37400.  
  37401. ΓòÉΓòÉΓòÉ 24.4. Safety and Security Restrictions ΓòÉΓòÉΓòÉ
  37402.  
  37403.    1. This clause defines restrictions that can be used with pragma 
  37404.       Restrictions, see 13.12, these facilitate the demonstration of program 
  37405.       correctness by allowing tailored versions of the run-time system. 
  37406.  
  37407.             Static Semantics
  37408.  
  37409.    2. The following restrictions, the same as in D.7, apply in this Annex: 
  37410.       No_Task_Hierarchy, No_Abort_Statement, No_Implicit_Heap_Allocation, 
  37411.       Max_Task_Entries is 0, Max_Asynchronous_Select_Nesting is 0, and 
  37412.       Max_Tasks is 0. The last three restrictions are checked prior to program 
  37413.       execution. 
  37414.  
  37415.    3. The following additional restrictions apply in this Annex. 
  37416.  
  37417.    4. Tasking-related restriction: 
  37418.  
  37419.    5. No_Protected_Types 
  37420.  
  37421.                       There are no declarations of protected types or protected
  37422.                       objects.
  37423.  
  37424.    6. Memory-management related restrictions: 
  37425.  
  37426.    7. No_Allocators 
  37427.  
  37428.                       There are no occurrences of an allocator.
  37429.  
  37430.    8. No_Local_Allocators 
  37431.  
  37432.                       Allocators are prohibited in subprograms, generic sub-programs,
  37433.                       tasks, and entry bodies; instantiations of generic
  37434.                       packages are also prohibited in these contexts.
  37435.  
  37436.    9. No_Unchecked_Deallocation 
  37437.  
  37438.                       Semantic dependence on Unchecked_Deallocation is not allowed.
  37439.  
  37440.   10. Immediate_Reclamation 
  37441.  
  37442.                       Except for storage occupied by objects created by allocators
  37443.                       and not deallocated via unchecked deallocation, any storage
  37444.                       reserved at run time for an object is immediately reclaimed
  37445.                       when the object no longer exists.
  37446.  
  37447.   11. Exception-related restriction: 
  37448.  
  37449.   12. No_Exceptions 
  37450.  
  37451.                       Raise_statements and exception_handlers are not allowed. No
  37452.                       language-defined run-time checks are generated; however, a
  37453.                       run-time check performed automatically by the hardware is
  37454.                       permitted.
  37455.  
  37456.   13. Other restrictions: 
  37457.  
  37458.   14. No_Floating_Point 
  37459.  
  37460.                       Uses of predefined floating point types and operations, and
  37461.                       declarations of new floating point types, are not allowed.
  37462.  
  37463.   15. No_Fixed_Point 
  37464.  
  37465.                       Uses of predefined fixed point types and operations, and
  37466.                       declarations of new fixed point types, are not allowed.
  37467.  
  37468.   16. No_Unchecked_Conversion 
  37469.  
  37470.                       Semantic dependence on the predefined generic
  37471.                       Unchecked_Conversion is not allowed.
  37472.  
  37473.   17. No_Access_Subprograms 
  37474.  
  37475.                       The declaration of access-to-subprogram types is not allowed.
  37476.  
  37477.   18. No_Unchecked_Access 
  37478.  
  37479.                       The Unchecked_Access attribute is not allowed.
  37480.  
  37481.   19. No_Dispatch 
  37482.  
  37483.                       Occurrences of T'Class are not allowed, for any (tagged)
  37484.                       subtype T.
  37485.  
  37486.   20. No_IO 
  37487.  
  37488.                       Semantic dependence on any of the library units
  37489.                       Sequential_IO, Direct_IO, Text_IO, Wide_Text_IO, or Stream_IO
  37490.                       is not allowed.
  37491.  
  37492.   21. No_Delay 
  37493.  
  37494.                       Delay_Statements and semantic dependence on package Calendar
  37495.                       are not allowed.
  37496.  
  37497.   22. No_Recursion 
  37498.  
  37499.                       As part of the execution of a subprogram, the same subprogram
  37500.                       is not invoked.
  37501.  
  37502.   23. No_Reentrancy 
  37503.  
  37504.                       During the execution of a subprogram by a task, no other task
  37505.                       invokes the same subprogram.
  37506.  
  37507.   Implementation Requirements
  37508.  
  37509.   24. If an implementation supports pragma Restrictions for a particular 
  37510.       argument, then except for the restrictions No_Unchecked_Deallocation, 
  37511.       No_Unchecked_Conversion, No_Access_Subprograms, and No_Unchecked_Access, 
  37512.       the associated restriction applies to the run-time system. 
  37513.  
  37514.             Documentation Requirements
  37515.  
  37516.   25. If a pragma Restrictions(No_Exceptions) is specified, the implementation 
  37517.       shall document the effects of all constructs where language-defined 
  37518.       checks are still performed automatically (for example, an overflow check 
  37519.       performed by the processor). 
  37520.  
  37521.             Erroneous Execution
  37522.  
  37523.   26. Program execution is erroneous if pragma Restrictions(No_Exceptions) has 
  37524.       been specified and the conditions arise under which a generated 
  37525.       language-defined run-time check would fail. 
  37526.  
  37527.   27. Program execution is erroneous if pragma Restrictions(No_Recursion) has 
  37528.       been specified and a subprogram is invoked as part of its own execution, 
  37529.       or if pragma Restrictions(No_Reentrancy) has been specified and during 
  37530.       the execution of a subprogram by a task, another task invokes the same 
  37531.       subprogram. 
  37532.  
  37533.  
  37534. ΓòÉΓòÉΓòÉ 25. Obsolescent Features (normative) ΓòÉΓòÉΓòÉ
  37535.  
  37536.    1. This Annex contains descriptions of features of the language whose 
  37537.       functionality is largely redundant with other features defined by this 
  37538.       International Standard. Use of these features is not recommended in newly 
  37539.       written programs. 
  37540.  
  37541.  J.1                           Renamings of Ada 83 Library Units 
  37542.  J.2                           Allowed Replacements of Characters 
  37543.  J.3                           Reduced Accuracy Subtypes 
  37544.  J.4                           The Constrained Attribute 
  37545.  J.5                           ASCII 
  37546.  J.6                           Numeric_Error 
  37547.  J.7                           At Clauses 
  37548.  J.8                           Mod Clauses 
  37549.  J.9                           The Storage_Size Attribute --- The Detailed Node 
  37550.                                Listing --- 
  37551.  J.1                           Renamings of Ada 83 Library Units 
  37552.  J.2                           Allowed Replacements of Characters 
  37553.  J.3                           Reduced Accuracy Subtypes 
  37554.  J.4                           The Constrained Attribute 
  37555.  J.5                           ASCII 
  37556.  J.6                           Numeric_Error 
  37557.  J.7                           At Clauses 
  37558.  J.7.1                         Interrupt Entries 
  37559.  J.8                           Mod Clauses 
  37560.  J.9                           The Storage_Size Attribute 
  37561.  
  37562.  
  37563. ΓòÉΓòÉΓòÉ 25.1. Renamings of Ada 83 Library Units ΓòÉΓòÉΓòÉ
  37564.  
  37565.  
  37566.   Static Semantics
  37567.  
  37568.    1. The following library_unit_renaming_declarations exist: 
  37569.  
  37570.          2.
  37571.  
  37572.                       with Ada.Unchecked_Conversion;
  37573.                       generic function Unchecked_Conversion
  37574.                        renames Ada.Unchecked_Conversion;
  37575.  
  37576.          3.
  37577.  
  37578.                       with Ada.Unchecked_Deallocation;
  37579.                       generic procedure Unchecked_Deallocation
  37580.                        renames Ada.Unchecked_Deallocation;
  37581.  
  37582.          4.
  37583.  
  37584.                       with Ada.Sequential_IO;
  37585.                       generic package Sequential_IO renames Ada.Sequential_IO;
  37586.  
  37587.          5.
  37588.  
  37589.                       with Ada.Direct_IO;
  37590.                       generic package Direct_IO renames Ada.Direct_IO;
  37591.  
  37592.          6.
  37593.  
  37594.                       with Ada.Text_IO;
  37595.                       package Text_IO renames Ada.Text_IO;
  37596.  
  37597.          7.
  37598.  
  37599.                       with Ada.IO_Exceptions;
  37600.                       package IO_Exceptions renames Ada.IO_Exceptions;
  37601.  
  37602.          8.
  37603.  
  37604.                       with Ada.Calendar;
  37605.                       package Calendar renames Ada.Calendar;
  37606.  
  37607.          9.
  37608.  
  37609.                       with System.Machine_Code;
  37610.                       package Machine_Code renames System.Machine_Code; -- If supported.
  37611.  
  37612.   Implementation Requirements
  37613.  
  37614.   10. The implementation shall allow the user to replace these renamings. 
  37615.  
  37616.  
  37617. ΓòÉΓòÉΓòÉ 25.2. Allowed Replacements of Characters ΓòÉΓòÉΓòÉ
  37618.  
  37619.  
  37620.   Syntax
  37621.  
  37622.    1. The following replacements are allowed for the vertical line, number 
  37623.       sign, and quotation mark characters: 
  37624.  
  37625.         a. A vertical line character (|) can be replaced by an exclamation mark 
  37626.            (!) where used as a delimiter. 
  37627.  
  37628.         b. The number sign characters (#) of a based_literal can be replaced by 
  37629.            colons (:) provided that the replacement is done for both 
  37630.            occurrences. 
  37631.  
  37632.         c. The quotation marks (") used as string brackets at both ends of a 
  37633.            string literal can be replaced by percent signs (%) provided that 
  37634.            the enclosed sequence of characters contains no quotation mark, and 
  37635.            provided that both string brackets are replaced. Any percent sign 
  37636.            within the sequence of characters shall then be doubled and each 
  37637.            such doubled percent sign is interpreted as a single percent sign 
  37638.            character value. 
  37639.  
  37640.         d. These replacements do not change the meaning of the program. 
  37641.  
  37642.  
  37643. ΓòÉΓòÉΓòÉ 25.3. Reduced Accuracy Subtypes ΓòÉΓòÉΓòÉ
  37644.  
  37645.    1. A digits_constraint may be used to define a floating point subtype with a 
  37646.       new value for its requested decimal precision, as reflected by its Digits 
  37647.       attribute. Similarly, a delta_constraint may be used to define an 
  37648.       ordinary fixed point subtype with a new value for its delta, as reflected 
  37649.       by its Delta attribute. 
  37650.  
  37651.             Syntax
  37652.  
  37653.          2.
  37654.  
  37655.                       delta_constraint ::= delta static_expression [range_constraint]
  37656.  
  37657.   Name Resolution Rules
  37658.  
  37659.    3. The expression of a delta_constraint is expected to be of any real type. 
  37660.  
  37661.             Legality Rules
  37662.  
  37663.    4. The expression of a delta_constraint shall be static. 
  37664.  
  37665.    5. For a subtype_indication with a delta_constraint, the subtype_mark shall 
  37666.       denote an ordinary fixed point subtype. 
  37667.  
  37668.    6. For a subtype_indication with a digits_constraint, the subtype_mark shall 
  37669.       denote either a decimal fixed point subtype or a floating point subtype 
  37670.       (notwithstanding the rule given in 3.5.9, that only allows a decimal 
  37671.       fixed point subtype). 
  37672.  
  37673.             Static Semantics
  37674.  
  37675.    7. A subtype_indication with a subtype_mark that denotes an ordinary fixed 
  37676.       point subtype and a delta_constraint defines an ordinary fixed point 
  37677.       subtype with a delta given by the value of the expression of the 
  37678.       delta_constraint. If the delta_constraint includes a range_constraint, 
  37679.       then the ordinary fixed point subtype is constrained by the 
  37680.       range_constraint. 
  37681.  
  37682.    8. A subtype_indication with a subtype_mark that denotes a floating point 
  37683.       subtype and a digits_constraint defines a floating point subtype with a 
  37684.       requested decimal precision (as reflected by its Digits attribute) given 
  37685.       by the value of the expression of the digits_constraint. If the 
  37686.       digits_constraint includes a range_constraint, then the floating point 
  37687.       subtype is constrained by the range_constraint. 
  37688.  
  37689.             Dynamic Semantics
  37690.  
  37691.    9. A delta_constraint is compatible with an ordinary fixed point subtype if 
  37692.       the value of the expression is no less than the delta of the subtype, and 
  37693.       the range_constraint, if any, is compatible with the subtype. 
  37694.  
  37695.   10. A digits_constraint is compatible with a floating point subtype if the 
  37696.       value of the expression is no greater than the requested decimal 
  37697.       precision of the subtype, and the range_constraint, if any, is compatible 
  37698.       with the subtype. 
  37699.  
  37700.   11. The elaboration of a delta_constraint consists of the elaboration of the 
  37701.       range_constraint, if any. 
  37702.  
  37703.  
  37704. ΓòÉΓòÉΓòÉ 25.4. The Constrained Attribute ΓòÉΓòÉΓòÉ
  37705.  
  37706.  
  37707.   Static Semantics
  37708.  
  37709.    1. For every private subtype S, the following attribute is defined: 
  37710.  
  37711.    2. S'Constrained 
  37712.  
  37713.                       Yields the value False if S denotes an unconstrained
  37714.                       nonformal private subtype with discriminants; also yields the
  37715.                       value False if S denotes a generic formal private subtype,
  37716.                       and the associated actual subtype is either an unconstrained
  37717.                       subtype with discriminants or an unconstrained array subtype;
  37718.                       yields the value True otherwise. The value of this attribute
  37719.                       is of the predefined subtype Boolean.
  37720.  
  37721.  
  37722. ΓòÉΓòÉΓòÉ 25.5. ASCII ΓòÉΓòÉΓòÉ
  37723.  
  37724.  
  37725.   Static Semantics
  37726.  
  37727.    1. The following declaration exists in the declaration of package Standard: 
  37728.  
  37729.          2.
  37730.  
  37731.                       package ASCII is
  37732.  
  37733.          3.
  37734.  
  37735.                         --  Control characters:
  37736.  
  37737.          4.
  37738.  
  37739.                         NUL  : constant Character := nul;
  37740.                         SOH  : constant Character := soh;
  37741.                         STX  : constant Character := stx;
  37742.                         ETX  : constant Character := etx;
  37743.                         EOT  : constant Character := eot;
  37744.                         ENQ  : constant Character := enq;
  37745.                         ACK  : constant Character := ack;
  37746.                         BEL  : constant Character := bel;
  37747.                         BS   : constant Character := bs;
  37748.                         HT   : constant Character := ht;
  37749.                         LF   : constant Character := lf;
  37750.                         VT   : constant Character := vt;
  37751.                         FF   : constant Character := ff;
  37752.                         CR   : constant Character := cr;
  37753.                         SO   : constant Character := so;
  37754.                         SI   : constant Character := si;
  37755.                         DLE  : constant Character := dle;
  37756.                         DC1  : constant Character := dc1;
  37757.                         DC2  : constant Character := dc2;
  37758.                         DC3  : constant Character := dc3;
  37759.                         DC4  : constant Character := dc4;
  37760.                         NAK  : constant Character := nak;
  37761.                         SYN  : constant Character := syn;
  37762.                         ETB  : constant Character := etb;
  37763.                         CAN  : constant Character := can;
  37764.                         EM   : constant Character := em;
  37765.                         SUB  : constant Character := sub;
  37766.                         ESC  : constant Character := esc;
  37767.                         FS   : constant Character := fs;
  37768.                         GS   : constant Character := gs;
  37769.                         RS   : constant Character := rs;
  37770.                         US   : constant Character := us;
  37771.                         DEL  : constant Character := del;
  37772.  
  37773.          5.
  37774.  
  37775.                         -- Other characters:
  37776.  
  37777.          6.
  37778.  
  37779.                         Exclam   : constant Character:= '!';
  37780.                         Quotation : constant Character:= '"';
  37781.                         Sharp   : constant Character:= '#';
  37782.                         Dollar   : constant Character:= '$';
  37783.                         Percent  : constant Character:= '%';
  37784.                         Ampersand : constant Character:= '&';
  37785.                         Colon   : constant Character:= ':';
  37786.                         Semicolon : constant Character:= ';';
  37787.                         Query   : constant Character:= '?';
  37788.                         At_Sign  : constant Character:= '@';
  37789.                         L_Bracket : constant Character:= '[';
  37790.                         Back_Slash: constant Character:= '\';
  37791.                         R_Bracket : constant Character:= ']';
  37792.                         Circumflex: constant Character:= '^';
  37793.                         Underline : constant Character:= '_';
  37794.                         Grave   : constant Character:= '`';
  37795.                         L_Brace  : constant Character:= '{';
  37796.                         Bar    : constant Character:= '|';
  37797.                         R_Brace  : constant Character:= '}';
  37798.                         Tilde   : constant Character:= '~';
  37799.  
  37800.          7.
  37801.  
  37802.                         -- Lower case letters:
  37803.  
  37804.          8.
  37805.  
  37806.                         LC_A: constant Character:= 'a';
  37807.                         ┬╖┬╖┬╖
  37808.                         LC_Z: constant Character:= 'z';
  37809.  
  37810.          9.
  37811.  
  37812.                       end ASCII;
  37813.  
  37814.  
  37815. ΓòÉΓòÉΓòÉ 25.6. Numeric_Error ΓòÉΓòÉΓòÉ
  37816.  
  37817.  
  37818.   Static Semantics
  37819.  
  37820.    1. The following declaration exists in the declaration of package Standard: 
  37821.  
  37822.          2.
  37823.  
  37824.                       Numeric_Error : exception renames Constraint_Error;
  37825.  
  37826.  
  37827. ΓòÉΓòÉΓòÉ 25.7. At Clauses ΓòÉΓòÉΓòÉ
  37828.  
  37829.  
  37830.   Syntax
  37831.  
  37832.          1.
  37833.  
  37834.                       at_clause ::= for direct_name use at expression;
  37835.  
  37836.   Static Semantics
  37837.  
  37838.    2. An at_clause of the form ``for x use at y;'' is equivalent to an 
  37839.       attribute_definition_clause of the form ``for x'Address use y;''. 
  37840.  
  37841.  J.7.1                         Interrupt Entries 
  37842.  
  37843.  
  37844. ΓòÉΓòÉΓòÉ 25.7.1. Interrupt Entries ΓòÉΓòÉΓòÉ
  37845.  
  37846.    1. Implementations are permitted to allow the attachment of task entries to 
  37847.       interrupts via the address clause. Such an entry is referred to as an 
  37848.       interrupt entry. 
  37849.  
  37850.    2. The address of the task entry corresponds to a hardware interrupt in an 
  37851.       implementation-defined manner. (See Ada.Interrupts.Reference in C.3.2.) 
  37852.  
  37853.             Static Semantics
  37854.  
  37855.    3. The following attribute is defined: 
  37856.  
  37857.    4. For any task entry X: 
  37858.  
  37859.    5. X'Address 
  37860.  
  37861.                       For a task entry whose address is specified (an interrupt
  37862.                       entry), the value refers to the corresponding hardware
  37863.                       interrupt. For such an entry, as for any other task entry,
  37864.                       the meaning of this value is implementation defined. The
  37865.                       value of this attribute is of the type of the subtype
  37866.                       System.Address.
  37867.  
  37868.         a. Address may be specified for single entries via an 
  37869.            attribute_definition_clause. 
  37870.  
  37871.   Dynamic Semantics
  37872.  
  37873.    1. As part of the initialization of a task object, the address clause for an 
  37874.       interrupt entry is elaborated, which evaluates the expression of the 
  37875.       address clause. A check is made that the address specified is associated 
  37876.       with some interrupt to which a task entry may be attached. If this check 
  37877.       fails, Program_Error is raised. Otherwise, the interrupt entry is 
  37878.       attached to the interrupt associated with the specified address. 
  37879.  
  37880.    2. Upon finalization of the task object, the interrupt entry, if any, is 
  37881.       detached from the corresponding interrupt and the default treatment is 
  37882.       restored. 
  37883.  
  37884.    3. While an interrupt entry is attached to an interrupt, the interrupt is 
  37885.       reserved, see C.3. 
  37886.  
  37887.    4. An interrupt delivered to a task entry acts as a call to the entry issued 
  37888.       by a hardware task whose priority is in the System.Interrupt_Priority 
  37889.       range. It is implementation defined whether the call is performed as an 
  37890.       ordinary entry call, a timed entry call, or a conditional entry call; 
  37891.       which kind of call is performed can depend on the specific interrupt. 
  37892.  
  37893.             Bounded (Run-Time) Errors
  37894.  
  37895.    5. It is a bounded error to evaluate E'Caller, see C.7.1, in an 
  37896.       accept_statement for an interrupt entry. The possible effects are the 
  37897.       same as for calling Current_Task from an entry body. 
  37898.  
  37899.             Documentation Requirements
  37900.  
  37901.    6. The implementation shall document to which interrupts a task entry may be 
  37902.       attached. 
  37903.  
  37904.    7. The implementation shall document whether the invocation of an interrupt 
  37905.       entry has the effect of an ordinary entry call, conditional call, or a 
  37906.       timed call, and whether the effect varies in the presence of pending 
  37907.       interrupts. 
  37908.  
  37909.             Implementation Permissions
  37910.  
  37911.    8. The support for this subclause is optional. 
  37912.  
  37913.    9. Interrupts to which the implementation allows a task entry to be attached 
  37914.       may be designated as reserved for the entire duration of program 
  37915.       execution; that is, not just when they have an interrupt entry attached 
  37916.       to them. 
  37917.  
  37918.   10. Interrupt entry calls may be implemented by having the hardware execute 
  37919.       directly the appropriate accept body. Alternatively, the implementation 
  37920.       is allowed to provide an internal interrupt handler to simulate the 
  37921.       effect of a normal task calling the entry. 
  37922.  
  37923.   11. The implementation is allowed to impose restrictions on the 
  37924.       specifications and bodies of tasks that have interrupt entries. 
  37925.  
  37926.   12. It is implementation defined whether direct calls (from the program) to 
  37927.       interrupt entries are allowed. 
  37928.  
  37929.   13. If a select_statement contains both a terminate_alternative and an 
  37930.       accept_alternative for an interrupt entry, then an implementation is 
  37931.       allowed to impose further requirements for the selection of the 
  37932.       terminate_alternative in addition to those given in, see 9.3. 
  37933.  
  37934.       NOTES 
  37935.  
  37936.   14. (1) Queued interrupts correspond to ordinary entry calls. Interrupts that 
  37937.       are lost if not immediately processed correspond to conditional entry 
  37938.       calls. It is a consequence of the priority rules that an accept body 
  37939.       executed in response to an interrupt can be executed with the active 
  37940.       priority at which the hardware generates the interrupt, taking precedence 
  37941.       over lower priority tasks, without a scheduling action. 
  37942.  
  37943.   15. (2) Control information that is supplied upon an interrupt can be passed 
  37944.       to an associated interrupt entry as one or more parameters of mode in. 
  37945.  
  37946.             Examples
  37947.  
  37948.   16. Example of an interrupt entry: 
  37949.  
  37950.         17.
  37951.  
  37952.                       task Interrupt_Handler is
  37953.                        entry Done;
  37954.                        for Done'Address use
  37955.                         Ada.Interrupts.Reference (Ada.Interrupts.Names.Device_Done);
  37956.                       end Interrupt_Handler;
  37957.  
  37958.  
  37959. ΓòÉΓòÉΓòÉ 25.8. Mod Clauses ΓòÉΓòÉΓòÉ
  37960.  
  37961.  
  37962.   Syntax
  37963.  
  37964.          1.
  37965.  
  37966.                       mod_clause ::= at mod static_expression;
  37967.  
  37968.   Static Semantics
  37969.  
  37970.    2. A record_representation_clause of the form: 
  37971.  
  37972.          3.
  37973.  
  37974.                       for r use
  37975.                         record at mod a
  37976.                           ┬╖┬╖┬╖
  37977.                         end record;
  37978.  
  37979.    4. is equivalent to: 
  37980.  
  37981.          5.
  37982.  
  37983.                       for r'Alignment use a;
  37984.                       for r use
  37985.                         record
  37986.                           ┬╖┬╖┬╖
  37987.                         end record;
  37988.  
  37989.  
  37990. ΓòÉΓòÉΓòÉ 25.9. The Storage_Size Attribute ΓòÉΓòÉΓòÉ
  37991.  
  37992.  
  37993.   Static Semantics
  37994.  
  37995.    1. For any task subtype T, the following attribute is defined: 
  37996.  
  37997.    2. T'Storage_Size 
  37998.  
  37999.                       Denotes an implementation-defined value of type
  38000.                       universal_integer representing the number of storage
  38001.                       elements reserved for a task of the subtype T.
  38002.  
  38003.         a. Storage_Size may be specified for a task first subtype via an 
  38004.            attribute_definition_clause. 
  38005.  
  38006.  
  38007. ΓòÉΓòÉΓòÉ 26. Language-Defined Attributes (informative) ΓòÉΓòÉΓòÉ
  38008.  
  38009.    1. This annex summarizes the definitions given elsewhere of the 
  38010.       language-defined attributes. 
  38011.  
  38012.    2. P'Access  For a prefix P that denotes a subprogram: 
  38013.  
  38014.         a. P'Access yields an access value that designates the subprogram 
  38015.            denoted by P. The type of P'Access is an access-to-subprogram type 
  38016.            (S), as determined by the expected type (see 3.10.2). 
  38017.  
  38018.    1. X'Access  For a prefix X that denotes an aliased view of an object: 
  38019.  
  38020.         a. X'Access yields an access value that designates the object denoted 
  38021.            by X. The type of X'Access is an access-to-object type, as 
  38022.            determined by the expected type. The expected type shall be a 
  38023.            general access type (see 3.10.2). 
  38024.  
  38025.    1. X'Address  For a prefix X that denotes an object, program unit, or label: 
  38026.  
  38027.         a. Denotes the address of the first of the storage elements allocated 
  38028.            to X. For a program unit or label, this value refers to the machine 
  38029.            code associated with the corresponding body or statement. The value 
  38030.            of this attribute is of type System.Address (see 13.3). 
  38031.  
  38032.    1. S'Adjacent  For every subtype S of a floating point type T: 
  38033.  
  38034.         a. S'Adjacent denotes a function with the following specification: 
  38035.  
  38036.                    b.
  38037.  
  38038.                       function S'Adjacent (X, Towards : T) return T
  38039.  
  38040.         c. If Towards=X, the function yields X; otherwise, it yields the 
  38041.            machine number of the type T adjacent to X in the direction of 
  38042.            Towards, if that machine number exists. If the result would be 
  38043.            outside the base range of S, Constraint_Error is raised. When 
  38044.            T'Signed_Zeros is True, a zero result has the sign of X. When 
  38045.            Towards is zero, its sign has no bearing on the result (see A.5.3). 
  38046.  
  38047.    1. S'Aft  For every fixed point subtype S: 
  38048.  
  38049.         a. S'Aft yields the number of decimal digits needed after the decimal 
  38050.            point to accommodate the delta of the subtype S, unless the delta of 
  38051.            the subtype S is greater than 0.1, in which case the attribute 
  38052.            yields the value one. (S'Aft is the smallest positive integer N for 
  38053.            which (10**N)*S'Delta is greater than or equal to one.)  The value 
  38054.            of this attribute is of the type universal_integer (see 3.5.10). 
  38055.  
  38056.    1. X'Alignment  For a prefix X that denotes a subtype or object: 
  38057.  
  38058.         a. The Address of an object that is allocated under control of the 
  38059.            implementation is an integral multiple of the Alignment of the 
  38060.            object (that is, the Address modulo the Alignment is zero). The 
  38061.            offset of a record component is a multiple of the Alignment of the 
  38062.            component. For an object that is not allocated under control of the 
  38063.            implementation (that is, one that is imported, that is allocated by 
  38064.            a user-defined allocator, whose Address has been specified, or is 
  38065.            designated by an access value returned by an instance of 
  38066.            Unchecked_Conversion), the implementation may assume that the 
  38067.            Address is an integral multiple of its Alignment. The implementation 
  38068.            shall not assume a stricter alignment. 
  38069.  
  38070.         b. The value of this attribute is of type universal_integer, and 
  38071.            nonnegative; zero means that the object is not necessarily aligned 
  38072.            on a storage element boundary (see 13.3). 
  38073.  
  38074.    1. S'Base  For every scalar subtype S: 
  38075.  
  38076.         a. S'Base denotes an unconstrained subtype of the type of S. This 
  38077.            unconstrained subtype is called the base subtype of the type (see 
  38078.            3.5). 
  38079.  
  38080.    1. S'Bit_Order  For every specific record subtype S: 
  38081.  
  38082.         a. Denotes the bit ordering for the type of S. The value of this 
  38083.            attribute is of type System.Bit_Order (see 13.5.3). 
  38084.  
  38085.    1. P'Body_Version  For a prefix P that statically denotes a program unit: 
  38086.  
  38087.         a. Yields a value of the predefined type String that identifies the 
  38088.            version of the compilation unit that contains the body (but not any 
  38089.            subunits) of the program unit (see E.3). 
  38090.  
  38091.    1. T'Callable  For a prefix T that is of a task type (after any implicit 
  38092.       dereference): 
  38093.  
  38094.         a. Yields the value True when the task denoted by T is callable, and 
  38095.            False otherwise (see 9.9). 
  38096.  
  38097.    1. E'Caller  For a prefix E that denotes an entry_declaration: 
  38098.  
  38099.         a. Yields a value of the type Task_ID that identifies the task whose 
  38100.            call is now being serviced. Use of this attribute is allowed only 
  38101.            inside an entry_body or accept_statement corresponding to the 
  38102.            entry_declaration denoted by E (see C.7.1). 
  38103.  
  38104.    1. S'Ceiling  For every subtype S of a floating point type T: 
  38105.  
  38106.         a. S'Ceiling denotes a function with the following specification: 
  38107.  
  38108.                    b.
  38109.  
  38110.                       function S'Ceiling (X : T) return T
  38111.  
  38112.         c. The function yields the value Ceiling(X), i.e., the smallest (most 
  38113.            negative) integral value greater than or equal to X. When X is zero, 
  38114.            the result has the sign of X; a zero result otherwise has a negative 
  38115.            sign when S'Signed_Zeros is True (see A.5.3). 
  38116.  
  38117.    1. S'Class  For every subtype S of a tagged type T (specific or class-wide): 
  38118.  
  38119.         a. S'Class denotes a subtype of the class-wide type (called T'Class in 
  38120.            this International Standard) for the class rooted at T (or if S 
  38121.            already denotes a class-wide subtype, then S'Class is the same as 
  38122.            S). 
  38123.  
  38124.         b. S'Class is unconstrained. However, if S is constrained, then the 
  38125.            values of S'Class are only those that when converted to the type T 
  38126.            belong to S (see 3.9). 
  38127.  
  38128.    1. S'Class  For every subtype S of an untagged private type whose full view 
  38129.       is tagged: 
  38130.  
  38131.         a. Denotes the class-wide subtype corresponding to the full view of S. 
  38132.            This attribute is allowed only from the beginning of the private 
  38133.            part in which the full view is declared, until the declaration of 
  38134.            the full view. After the full view, the Class attribute of the full 
  38135.            view can be used (see 7.3.1). 
  38136.  
  38137.    1. X'Component_Size  For a prefix X that denotes an array subtype or array 
  38138.       object (after any implicit dereference): 
  38139.  
  38140.         a. Denotes the size in bits of components of the type of X. The value 
  38141.            of this attribute is of type universal_integer (see 13.3). 
  38142.  
  38143.    1. S'Compose  For every subtype S of a floating point type T: 
  38144.  
  38145.         a. S'Compose denotes a function with the following specification: 
  38146.  
  38147.                    b.
  38148.  
  38149.                       function S'Compose
  38150.                        (Fraction : T;
  38151.                        Exponent : universal_integer) return T
  38152.  
  38153.         c. Let v be the value (Fraction*T'Machine_Radix) ** (Exponent-k), where 
  38154.            k is the normalized exponent of Fraction. If v is a machine number 
  38155.            of the type T, or if |v|>=T'Model_Small, the function yields v; 
  38156.            otherwise, it yields either one of the machine numbers of the type T 
  38157.            adjacent to v. Constraint_Error is optionally raised if v is outside 
  38158.            the base range of S. A zero result has the sign of Fraction when 
  38159.            S'Signed_Zeros is True (see A.5.3). 
  38160.  
  38161.    1. A'Constrained  For a prefix A that is of a discriminated type (after any 
  38162.       implicit dereference): 
  38163.  
  38164.         a. Yields the value True if A denotes a constant, a value, or a 
  38165.            constrained variable, and False otherwise (see 3.7.2). 
  38166.  
  38167.    1. S'Copy_Sign  For every subtype S of a floating point type T: 
  38168.  
  38169.         a. S'Copy_Sign denotes a function with the following specification: 
  38170.  
  38171.                    b.
  38172.  
  38173.                       function S'Copy_Sign (Value, Sign : T) return T
  38174.  
  38175.         c. If the value of Value is nonzero, the function yields a result whose 
  38176.            magnitude is that of Value and whose sign is that of Sign; 
  38177.            otherwise, it yields the value zero. Constraint_Error is optionally 
  38178.            raised if the result is outside the base range of S. A zero result 
  38179.            has the sign of Sign when S'Signed_Zeros is True (see A.5.3). 
  38180.  
  38181.    1. E'Count  For a prefix E that denotes an entry of a task or protected 
  38182.       unit: 
  38183.  
  38184.         a. Yields the number of calls presently queued on the entry E of the 
  38185.            current instance of the unit. The value of this attribute is of the 
  38186.            type universal_integer (see 9.9). 
  38187.  
  38188.    1. S'Definite  For a prefix S that denotes a formal indefinite subtype: 
  38189.  
  38190.         a. S'Definite yields True if the actual subtype corresponding to S is 
  38191.            definite; otherwise it yields False. The value of this attribute is 
  38192.            of the predefined type Boolean (see 12.5.1). 
  38193.  
  38194.    1. S'Delta  For every fixed point subtype S: 
  38195.  
  38196.         a. S'Delta denotes the delta of the fixed point subtype S. The value of 
  38197.            this attribute is of the type universal_real (see 3.5.10). 
  38198.  
  38199.    1. S'Denorm  For every subtype S of a floating point type T: 
  38200.  
  38201.         a. Yields the value True if every value expressible in the form 
  38202.  
  38203.                                     T'Machine_Emin
  38204.                       +/-mantissa*T'Machine_Radix
  38205.  
  38206.  where mantissa is a nonzero T'Machine_Mantissa-digit fraction in the number 
  38207.  base T'Machine_Radix, the first digit of which is zero, is a machine number, 
  38208.  see 3.5.7, of the type T; yields the value False otherwise. The value of this 
  38209.  attribute is of the predefined type Boolean (see A.5.3). 
  38210.  
  38211.    1. S'Digits  For every decimal fixed point subtype S: 
  38212.  
  38213.         a. S'Digits denotes the digits of the decimal fixed point subtype S, 
  38214.            which corresponds to the number of decimal digits that are 
  38215.            representable in objects of the subtype. The value of this attribute 
  38216.            is of the type universal_integer (see 3.5.10). 
  38217.  
  38218.    1. S'Digits  For every floating point subtype S: 
  38219.  
  38220.         a. S'Digits denotes the requested decimal precision for the subtype S. 
  38221.            The value of this attribute is of the type universal_integer (see 
  38222.            3.5.8). 
  38223.  
  38224.    1. S'Exponent  For every subtype S of a floating point type T: 
  38225.  
  38226.         a. S'Exponent denotes a function with the following specification: 
  38227.  
  38228.                    b.
  38229.  
  38230.                       function S'Exponent (X : T) return universal_integer
  38231.  
  38232.         c. The function yields the normalized exponent of X (see A.5.3). 
  38233.  
  38234.    1. S'External_Tag  For every subtype S of a tagged type T (specific or 
  38235.       class-wide): 
  38236.  
  38237.         a. S'External_Tag denotes an external string representation for S'Tag; 
  38238.            it is of the predefined type String. External_Tag may be specified 
  38239.            for a specific tagged type via an attribute_definition_clause; the 
  38240.            expression of such a clause shall be static. The default external 
  38241.            tag representation is implementation defined (see 3.9.2 and 
  38242.            13.13.2). See 13.3. 
  38243.  
  38244.    1. A'First(N)  For a prefix A that is of an array type (after any implicit 
  38245.       dereference), or denotes a constrained array subtype: 
  38246.  
  38247.         a. A'First(N) denotes the lower bound of the N-th index range; its type 
  38248.            is the corresponding index type (see 3.6.2). 
  38249.  
  38250.    1. A'First  For a prefix A that is of an array type (after any implicit 
  38251.       dereference), or denotes a constrained array subtype: 
  38252.  
  38253.         a. A'First denotes the lower bound of the first index range; its type 
  38254.            is the corresponding index type (see 3.6.2). 
  38255.  
  38256.    1. S'First  For every scalar subtype S: 
  38257.  
  38258.         a. S'First denotes the lower bound of the range of S. The value of this 
  38259.            attribute is of the type of S. See 3.5. 
  38260.  
  38261.    1. R.C'First_Bit  For a component C of a composite, non-array object R: 
  38262.  
  38263.         a. Denotes the offset, from the start of the first of the storage 
  38264.            elements occupied by C, of the first bit occupied by C. This offset 
  38265.            is measured in bits. The first bit of a storage element is numbered 
  38266.            zero. The value of this attribute is of the type universal_integer. 
  38267.            See 13.5.2. 
  38268.  
  38269.    1. S'Floor  For every subtype S of a floating point type T: 
  38270.  
  38271.         a. S'Floor denotes a function with the following specification: 
  38272.  
  38273.                    b.
  38274.  
  38275.                       function S'Floor (X : T) return T
  38276.  
  38277.         c. The function yields the value Floor(X), i.e., the largest (most 
  38278.            positive) integral value less than or equal to X. When X is zero, 
  38279.            the result has the sign of X; a zero result otherwise has a positive 
  38280.            sign. See A.5.3. 
  38281.  
  38282.    1. S'Fore  For every fixed point subtype S: 
  38283.  
  38284.         a. S'Fore yields the minimum number of characters needed before the 
  38285.            decimal point for the decimal representation of any value of the 
  38286.            subtype S, assuming that the representation does not include an 
  38287.            exponent, but includes a one-character prefix that is either a minus 
  38288.            sign or a space. (This minimum number does not include superfluous 
  38289.            zeros or underlines, and is at least 2.)  The value of this 
  38290.            attribute is of the type universal_integer. See 3.5.10. 
  38291.  
  38292.    1. S'Fraction  For every subtype S of a floating point type T: 
  38293.  
  38294.         a. S'Fraction denotes a function with the following specification: 
  38295.  
  38296.                    b.
  38297.  
  38298.                       function S'Fraction (X : T) return T
  38299.  
  38300.         c. The function yields the value (X*T'Machine_Radix) ** -k, where k is 
  38301.            the normalized exponent of X. A zero result, which can only occur 
  38302.            when X is zero, has the sign of X. See A.5.3. 
  38303.  
  38304.    1. E'Identity  For a prefix E that denotes an exception: 
  38305.  
  38306.         a. E'Identity returns the unique identity of the exception. The type of 
  38307.            this attribute is Exception_Id. See 11.4.1. 
  38308.  
  38309.    1. T'Identity  For a prefix T that is of a task type (after any implicit 
  38310.       dereference): 
  38311.  
  38312.         a. Yields a value of the type Task_ID that identifies the task denoted 
  38313.            by T. See C.7.1. 
  38314.  
  38315.    1. S'Image  For every scalar subtype S: 
  38316.  
  38317.         a. S'Image denotes a function with the following specification: 
  38318.  
  38319.                    b.
  38320.  
  38321.                       function S'Image(Arg : S'Base) return String
  38322.  
  38323.         c. The function returns an image of the value of Arg as a String. See 
  38324.            3.5. 
  38325.  
  38326.    1. S'Class'Input  For every subtype S'Class of a class-wide type T'Class: 
  38327.  
  38328.         a. S'Class'Input denotes a function with the following specification: 
  38329.  
  38330.                    b.
  38331.  
  38332.                       function S'Class'Input
  38333.                        (Stream : access Ada.Streams.Root_Stream_Type'Class)
  38334.                        return T'Class
  38335.  
  38336.         c. First reads the external tag from Stream and determines the 
  38337.            corresponding internal tag (by calling 
  38338.            Tags.Internal_Tag(String'Input(Stream)) --  see 3.9.) and then 
  38339.            dispatches to the subprogram denoted by the Input attribute of the 
  38340.            specific type identified by the internal tag; returns that result. 
  38341.            See 13.13.2. 
  38342.  
  38343.    1. S'Input  For every subtype S of a specific type T: 
  38344.  
  38345.         a. S'Input denotes a function with the following specification: 
  38346.  
  38347.                    b.
  38348.  
  38349.                       function S'Input
  38350.                        (Stream : access Ada.Streams.Root_Stream_Type'Class)
  38351.                        return T
  38352.  
  38353.         c. S'Input reads and returns one value from Stream, using any bounds or 
  38354.            discriminants written by a corresponding S'Output to determine how 
  38355.            much to read. See 13.13.2. 
  38356.  
  38357.    1. A'Last(N)  For a prefix A that is of an array type (after any implicit 
  38358.       dereference), or denotes a constrained array subtype: 
  38359.  
  38360.         a. A'Last(N) denotes the upper bound of the N-th index range; its type 
  38361.            is the corresponding index type. See 3.6.2. 
  38362.  
  38363.    1. A'Last  For a prefix A that is of an array type (after any implicit 
  38364.       dereference), or denotes a constrained array subtype: 
  38365.  
  38366.         a. A'Last denotes the upper bound of the first index range; its type is 
  38367.            the corresponding index type. See 3.6.2. 
  38368.  
  38369.    1. S'Last  For every scalar subtype S: 
  38370.  
  38371.         a. S'Last denotes the upper bound of the range of S. The value of this 
  38372.            attribute is of the type of S. See 3.5. 
  38373.  
  38374.    1. R.C'Last_Bit  For a component C of a composite, non-array object R: 
  38375.  
  38376.         a. Denotes the offset, from the start of the first of the storage 
  38377.            elements occupied by C, of the last bit occupied by C. This offset 
  38378.            is measured in bits. The value of this attribute is of the type 
  38379.            universal_integer. See 13.5.2. 
  38380.  
  38381.    1. S'Leading_Part  For every subtype S of a floating point type T: 
  38382.  
  38383.         a. S'Leading_Part denotes a function with the following specification: 
  38384.  
  38385.                    b.
  38386.  
  38387.                       function S'Leading_Part
  38388.                        (X       : T;
  38389.                         Radix_Digits : universal_integer) return T
  38390.  
  38391.         c. Let v be the value T'Machine_Radix ** (k-Radix_Digits), where k is 
  38392.            the normalized exponent of X. The function yields the value 
  38393.  
  38394.              1. Floor(X/v)*v, when X is nonnegative and Radix_Digits is 
  38395.                 positive; 
  38396.  
  38397.              2. Ceiling(X/v)*v, when X is negative and Radix_Digits is 
  38398.                 positive. 
  38399.  
  38400.         a. Constraint_Error is raised when Radix_Digits is zero or negative. A 
  38401.            zero result, which can only occur when X is zero, has the sign of X. 
  38402.            See A.5.3. 
  38403.  
  38404.    1. A'Length(N)  For a prefix A that is of an array type (after any implicit 
  38405.       dereference), or denotes a constrained array subtype: 
  38406.  
  38407.         a. A'Length(N) denotes the number of values of the N-th index range 
  38408.            (zero for a null range); its type is universal_integer. See 3.6.2. 
  38409.  
  38410.    1. A'Length  For a prefix A that is of an array type (after any implicit 
  38411.       dereference), or denotes a constrained array subtype: 
  38412.  
  38413.         a. A'Length denotes the number of values of the first index range (zero 
  38414.            for a null range); its type is universal_integer. See 3.6.2. 
  38415.  
  38416.    1. S'Machine  For every subtype S of a floating point type T: 
  38417.  
  38418.         a. S'Machine denotes a function with the following specification: 
  38419.  
  38420.                    b.
  38421.  
  38422.                       function S'Machine (X : T) return T
  38423.  
  38424.         c. If X is a machine number of the type T, the function yields X; 
  38425.            otherwise, it yields the value obtained by rounding or truncating X 
  38426.            to either one of the adjacent machine numbers of the type T. 
  38427.            Constraint_Error is raised if rounding or truncating X to the 
  38428.            precision of the machine numbers results in a value outside the base 
  38429.            range of S. A zero result has the sign of X when S'Signed_Zeros is 
  38430.            True. See A.5.3. 
  38431.  
  38432.    1. S'Machine_Emax  For every subtype S of a floating point type T: 
  38433.  
  38434.         a. Yields the largest (most positive) value of exponent such that every 
  38435.            value expressible in the canonical form (for the type T), having a 
  38436.            mantissa of T'Machine_Mantissa digits, is a machine number (see 
  38437.            3.5.7) of the type T. This attribute yields a value of the type 
  38438.            universal_integer. See A.5.3. 
  38439.  
  38440.    1. S'Machine_Emin  For every subtype S of a floating point type T: 
  38441.  
  38442.         a. Yields the smallest (most negative) value of exponent such that 
  38443.            every value expressible in the canonical form (for the type T), 
  38444.            having a mantissa of T'Machine_Mantissa digits, is a machine number 
  38445.            (see 3.5.7) of the type T. This attribute yields a value of the type 
  38446.            universal_integer. See A.5.3. 
  38447.  
  38448.    1. S'Machine_Mantissa  For every subtype S of a floating point type T: 
  38449.  
  38450.         a. Yields the largest value of p such that every value expressible in 
  38451.            the canonical form (for the type T), having a p-digit mantissa and 
  38452.            an exponent between T'Machine_Emin and T'Machine_Emax, is a machine 
  38453.            number (see 3.5.7) of the type T. This attribute yields a value of 
  38454.            the type universal_integer. See A.5.3. 
  38455.  
  38456.    1. S'Machine_Overflows  For every subtype S of a fixed point type T: 
  38457.  
  38458.         a. Yields the value True if overflow and divide-by-zero are detected 
  38459.            and reported by raising Constraint_Error for every predefined 
  38460.            operation that yields a result of the type T; yields the value False 
  38461.            otherwise. The value of this attribute is of the predefined type 
  38462.            Boolean. See A.5.4. 
  38463.  
  38464.    1. S'Machine_Overflows  For every subtype S of a floating point type T: 
  38465.  
  38466.         a. Yields the value True if overflow and divide-by-zero are detected 
  38467.            and reported by raising Constraint_Error for every predefined 
  38468.            operation that yields a result of the type T; yields the value False 
  38469.            otherwise. The value of this attribute is of the predefined type 
  38470.            Boolean. See A.5.3. 
  38471.  
  38472.    1. S'Machine_Radix  For every subtype S of a fixed point type T: 
  38473.  
  38474.         a. Yields the radix of the hardware representation of the type T. The 
  38475.            value of this attribute is of the type universal_integer. See A.5.4. 
  38476.  
  38477.    1. S'Machine_Radix  For every subtype S of a floating point type T: 
  38478.  
  38479.         a. Yields the radix of the hardware representation of the type T. The 
  38480.            value of this attribute is of the type universal_integer. See A.5.3. 
  38481.  
  38482.    1. S'Machine_Rounds  For every subtype S of a fixed point type T: 
  38483.  
  38484.         a. Yields the value True if rounding is performed on inexact results of 
  38485.            every predefined operation that yields a result of the type T; 
  38486.            yields the value False otherwise. The value of this attribute is of 
  38487.            the predefined type Boolean. See A.5.4. 
  38488.  
  38489.    1. S'Machine_Rounds  For every subtype S of a floating point type T: 
  38490.  
  38491.         a. Yields the value True if rounding is performed on inexact results of 
  38492.            every predefined operation that yields a result of the type T; 
  38493.            yields the value False otherwise. The value of this attribute is of 
  38494.            the predefined type Boolean. See A.5.3. 
  38495.  
  38496.    1. S'Max  For every scalar subtype S: 
  38497.  
  38498.         a. S'Max denotes a function with the following specification: 
  38499.  
  38500.                    b.
  38501.  
  38502.                       function S'Max(Left, Right : S'Base) return S'Base
  38503.  
  38504.         c. The function returns the greater of the values of the two 
  38505.            parameters. See 3.5. 
  38506.  
  38507.    1. S'Max_Size_In_Storage_Elements  For every subtype S: 
  38508.  
  38509.         a. Denotes the maximum value for Size_In_Storage_Elements that will be 
  38510.            requested via Allocate for an access type whose designated subtype 
  38511.            is S. The value of this attribute is of type universal_integer. See 
  38512.            13.11.1. 
  38513.  
  38514.    1. S'Min  For every scalar subtype S: 
  38515.  
  38516.         a. S'Min denotes a function with the following specification: 
  38517.  
  38518.                    b.
  38519.  
  38520.                       function S'Min(Left, Right : S'Base) return S'Base
  38521.  
  38522.         c. The function returns the lesser of the values of the two parameters. 
  38523.            See 3.5. 
  38524.  
  38525.    1. S'Model  For every subtype S of a floating point type T: 
  38526.  
  38527.         a. S'Model denotes a function with the following specification: 
  38528.  
  38529.                    b.
  38530.  
  38531.                       function S'Model (X : T) return T
  38532.  
  38533.         c. If the Numerics Annex is not supported, the meaning of this 
  38534.            attribute is implementation defined;  see G.2.2 for the definition 
  38535.            that applies to implementations supporting the Numerics Annex. See 
  38536.            A.5.3. 
  38537.  
  38538.    1. S'Model_Emin  For every subtype S of a floating point type T: 
  38539.  
  38540.         a. If the Numerics Annex is not supported, this attribute yields an 
  38541.            implementation defined value that is greater than or equal to the 
  38542.            value of T'Machine_Emin. See G.2.2 for further requirements that 
  38543.            apply to implementations supporting the Numerics Annex. The value of 
  38544.            this attribute is of the type universal_integer. See A.5.3. 
  38545.  
  38546.    1. S'Model_Epsilon  For every subtype S of a floating point type T: 
  38547.  
  38548.         a. Yields the value T'Machine_Radix ** (1-T'Model_Mantissa). The value 
  38549.            of this attribute is of the type universal_real. See A.5.3. 
  38550.  
  38551.    1. S'Model_Mantissa  For every subtype S of a floating point type T: 
  38552.  
  38553.         a. If the Numerics Annex is not supported, this attribute yields an 
  38554.            implementation defined value that is greater than or equal to 
  38555.            Ceiling(d*log (10)/log (T'Machine_Radix))+1, where d is the 
  38556.            requested decimal precision of T, and less than or equal to the 
  38557.            value of T'Machine_Mantissa. See G.2.2 for further requirements that 
  38558.            apply to implementations supporting the Numerics Annex. The value of 
  38559.            this attribute is of the type universal_integer. See A.5.3. 
  38560.  
  38561.    1. S'Model_Small  For every subtype S of a floating point type T: 
  38562.  
  38563.         a. Yields the value T'Machine_Radix ** (T'Model_Emin-1). The value of 
  38564.            this attribute is of the type universal_real. See A.5.3. 
  38565.  
  38566.    1. S'Modulus  For every modular subtype S: 
  38567.  
  38568.         a. S'Modulus yields the modulus of the type of S, as a value of the 
  38569.            type universal_integer. See 3.5.4. 
  38570.  
  38571.    1. S'Class'Output  For every subtype S'Class of a class-wide type T'Class: 
  38572.  
  38573.         a. S'Class'Output denotes a procedure with the following specification: 
  38574.  
  38575.                    b.
  38576.  
  38577.                       procedure S'Class'Output
  38578.                        (Stream : access Ada.Streams.Root_Stream_Type'Class;
  38579.                         Item  : in T'Class)
  38580.  
  38581.         c. First writes the external tag of Item to Stream (by calling 
  38582.            String'Output(Tags.External_Tag(Item'Tag) --  see 3.9.) and then 
  38583.            dispatches to the subprogram denoted by the Output attribute of the 
  38584.            specific type identified by the tag. See 13.13.2. 
  38585.  
  38586.    1. S'Output  For every subtype S of a specific type T: 
  38587.  
  38588.         a. S'Output denotes a procedure with the following specification: 
  38589.  
  38590.                    b.
  38591.  
  38592.                       procedure S'Output
  38593.                        (Stream : access Ada.Streams.Root_Stream_Type'Class;
  38594.                         Item  : in T)
  38595.  
  38596.         c. S'Output writes the value of Item to Stream, including any bounds or 
  38597.            discriminants. See 13.13.2. 
  38598.  
  38599.    1. D'Partition_ID  For a prefix D that denotes a library-level declaration, 
  38600.       excepting a declaration of or within a declared-pure library unit: 
  38601.  
  38602.         a. Denotes a value of the type universal_integer that identifies the 
  38603.            partition in which D was elaborated. If D denotes the declaration of 
  38604.            a remote call interface library unit, see E.2.3, the given partition 
  38605.            is the one where the body of D was elaborated. See E.1. 
  38606.  
  38607.    1. S'Pos  For every discrete subtype S: 
  38608.  
  38609.         a. S'Pos denotes a function with the following specification: 
  38610.  
  38611.                    b.
  38612.  
  38613.                       function S'Pos(Arg : S'Base) return universal_integer
  38614.  
  38615.         c. This function returns the position number of the value of Arg, as a 
  38616.            value of type universal_integer. See 3.5.5. 
  38617.  
  38618.    1. R.C'Position  For a component C of a composite, non-array object R: 
  38619.  
  38620.         a. Denotes the same value as R.C'Address - R'Address. The value of this 
  38621.            attribute is of the type universal_integer. See 13.5.2. 
  38622.  
  38623.    1. S'Pred  For every scalar subtype S: 
  38624.  
  38625.         a. S'Pred denotes a function with the following specification: 
  38626.  
  38627.                    b.
  38628.  
  38629.                       function S'Pred(Arg : S'Base) return S'Base
  38630.  
  38631.         c. For an enumeration type, the function returns the value whose 
  38632.            position number is one less than that of the value of Arg; 
  38633.            Constraint_Error is raised if there is no such value of the type. 
  38634.            For an integer type, the function returns the result of subtracting 
  38635.            one from the value of Arg. For a fixed point type, the function 
  38636.            returns the result of subtracting small from the value of Arg. For a 
  38637.            floating point type, the function returns the machine number (as 
  38638.            defined in 3.5.7.) immediately below the value of Arg; 
  38639.            Constraint_Error is raised if there is no such machine number. See 
  38640.            3.5. 
  38641.  
  38642.    1. A'Range(N)  For a prefix A that is of an array type (after any implicit 
  38643.       dereference), or denotes a constrained array subtype: 
  38644.  
  38645.         a. A'Range(N) is equivalent to the range A'First(N) ┬╖┬╖ A'Last(N), 
  38646.            except that the prefix A is only evaluated once. See 3.6.2. 
  38647.  
  38648.    1. A'Range  For a prefix A that is of an array type (after any implicit 
  38649.       dereference), or denotes a constrained array subtype: 
  38650.  
  38651.         a. A'Range is equivalent to the range A'First ┬╖┬╖ A'Last, except that 
  38652.            the prefix A is only evaluated once. See 3.6.2. 
  38653.  
  38654.    1. S'Range  For every scalar subtype S: 
  38655.  
  38656.         a. S'Range is equivalent to the range S'First ┬╖┬╖ S'Last. See 3.5. 
  38657.  
  38658.    1. S'Class'Read  For every subtype S'Class of a class-wide type T'Class: 
  38659.  
  38660.         a. S'Class'Read denotes a procedure with the following specification: 
  38661.  
  38662.                    b.
  38663.  
  38664.                       procedure S'Class'Read
  38665.                        (Stream : access Ada.Streams.Root_Stream_Type'Class;
  38666.                         Item  : out T'Class)
  38667.  
  38668.         c. Dispatches to the subprogram denoted by the Read attribute of the 
  38669.            specific type identified by the tag of Item. See 13.13.2. 
  38670.  
  38671.    1. S'Read  For every subtype S of a specific type T: 
  38672.  
  38673.         a. S'Read denotes a procedure with the following specification: 
  38674.  
  38675.                    b.
  38676.  
  38677.                       procedure S'Read
  38678.                        (Stream : access Ada.Streams.Root_Stream_Type'Class;
  38679.                         Item  : out T)
  38680.  
  38681.         c. S'Read reads the value of Item from Stream. See 13.13.2. 
  38682.  
  38683.    1. S'Remainder  For every subtype S of a floating point type T: 
  38684.  
  38685.         a. S'Remainder denotes a function with the following specification: 
  38686.  
  38687.                    b.
  38688.  
  38689.                       function S'Remainder (X, Y : T) return T
  38690.  
  38691.         c. For nonzero Y, let v be the value X-n*Y, where n is the integer 
  38692.            nearest to the exact value of X/Y; if |n-X/Y|=1/2, then n is chosen 
  38693.            to be even. If v is a machine number of the type T, the function 
  38694.            yields v; otherwise, it yields zero. Constraint_Error is raised if Y 
  38695.            is zero. A zero result has the sign of X when S'Signed_Zeros is 
  38696.            True. See A.5.3. 
  38697.  
  38698.    1. S'Round  For every decimal fixed point subtype S: 
  38699.  
  38700.         a. S'Round denotes a function with the following specification: 
  38701.  
  38702.                    b.
  38703.  
  38704.                       function S'Round(X : universal_real) return S'Base
  38705.  
  38706.         c. The function returns the value obtained by rounding X (away from 0, 
  38707.            if X is midway between two values of the type of S). See 3.5.10. 
  38708.  
  38709.    1. S'Rounding  For every subtype S of a floating point type T: 
  38710.  
  38711.         a. S'Rounding denotes a function with the following specification: 
  38712.  
  38713.                    b.
  38714.  
  38715.                       function S'Rounding (X : T) return T
  38716.  
  38717.         c. The function yields the integral value nearest to X, rounding away 
  38718.            from zero if X lies exactly halfway between two integers. A zero 
  38719.            result has the sign of X when S'Signed_Zeros is True. See A.5.3. 
  38720.  
  38721.    1. S'Safe_First  For every subtype S of a floating point type T: 
  38722.  
  38723.         a. Yields the lower bound of the safe range, see 3.5.7, of the type T. 
  38724.            If the Numerics Annex is not supported, the value of this attribute 
  38725.            is implementation defined;  See G.2.2 for the definition that 
  38726.            applies to implementations supporting the Numerics Annex. The value 
  38727.            of this attribute is of the type universal_real. See A.5.3. 
  38728.  
  38729.    1. S'Safe_Last  For every subtype S of a floating point type T: 
  38730.  
  38731.         a. Yields the upper bound of the safe range, see 3.5.7 of the type T. 
  38732.            If the Numerics Annex is not supported, the value of this attribute 
  38733.            is implementation defined;  See G.2.2 for the definition that 
  38734.            applies to implementations supporting the Numerics Annex. The value 
  38735.            of this attribute is of the type universal_real. See A.5.3. 
  38736.  
  38737.    1. S'Scale  For every decimal fixed point subtype S: 
  38738.  
  38739.         a. S'Scale denotes the scale of the subtype S, defined as the value N 
  38740.            such that S'Delta = 10.0**(-N). The scale indicates the position of 
  38741.            the point relative to the rightmost significant digits of values of 
  38742.            subtype S. The value of this attribute is of the type 
  38743.            universal_integer. See 3.5.10. 
  38744.  
  38745.    1. S'Scaling  For every subtype S of a floating point type T: 
  38746.  
  38747.         a. S'Scaling denotes a function with the following specification: 
  38748.  
  38749.                    b.
  38750.  
  38751.                       function S'Scaling
  38752.                        (X      : T;
  38753.                         Adjustment : universal_integer) return T
  38754.  
  38755.         c. Let v be the value X*T'Machine_Radix ** Adjustment. If v is a 
  38756.            machine number of the type T, or if |v|>=T'Model_Small, the function 
  38757.            yields v; otherwise, it yields either one of the machine numbers of 
  38758.            the type T adjacent to v. Constraint_Error is optionally raised if v 
  38759.            is outside the base range of S. A zero result has the sign of X when 
  38760.            S'Signed_Zeros is True. See A.5.3. 
  38761.  
  38762.    1. S'Signed_Zeros  For every subtype S of a floating point type T: 
  38763.  
  38764.         a. Yields the value True if the hardware representation for the type T 
  38765.            has the capability of representing both positively and negatively 
  38766.            signed zeros, these being generated and used by the predefined 
  38767.            operations of the type T as specified in IEC 559:1989; yields the 
  38768.            value False otherwise. The value of this attribute is of the 
  38769.            predefined type Boolean. See A.5.3. 
  38770.  
  38771.    1. S'Size  For every subtype S: 
  38772.  
  38773.         a. If S is definite, denotes the size (in bits) that the implementation 
  38774.            would choose for the following objects of subtype S: 
  38775.  
  38776.              1. A record component of subtype S when the record type is packed. 
  38777.  
  38778.              2. The formal parameter of an instance of Unchecked_Conversion 
  38779.                 that converts from subtype S to some other subtype. 
  38780.  
  38781.         a. If S is indefinite, the meaning is implementation defined. The value 
  38782.            of this attribute is of the type universal_integer. See 13.3. 
  38783.  
  38784.    1. X'Size  For a prefix X that denotes an object: 
  38785.  
  38786.         a. Denotes the size in bits of the representation of the object. The 
  38787.            value of this attribute is of the type universal_integer. See 13.3. 
  38788.  
  38789.    1. S'Small  For every fixed point subtype S: 
  38790.  
  38791.         a. S'Small denotes the small of the type of S. The value of this 
  38792.            attribute is of the type universal_real. See 3.5.10. 
  38793.  
  38794.    1. S'Storage_Pool  For every access subtype S: 
  38795.  
  38796.         a. Denotes the storage pool of the type of S. The type of this 
  38797.            attribute is Root_Storage_Pool'Class. See 13.11. 
  38798.  
  38799.    1. S'Storage_Size  For every access subtype S: 
  38800.  
  38801.         a. Yields the result of calling Storage_Size(S'Storage_Pool), which is 
  38802.            intended to be a measure of the number of storage elements reserved 
  38803.            for the pool. The type of this attribute is universal_integer. See 
  38804.            13.11. 
  38805.  
  38806.    1. T'Storage_Size  For a prefix T that denotes a task object (after any 
  38807.       implicit dereference): 
  38808.  
  38809.         a. Denotes the number of storage elements reserved for the task. The 
  38810.            value of this attribute is of the type universal_integer. The 
  38811.            Storage_Size includes the size of the task's stack, if any. The 
  38812.            language does not specify whether or not it includes other storage 
  38813.            associated with the task (such as the ``task control block'' used by 
  38814.            some implementations.) See 13.3. 
  38815.  
  38816.    1. S'Succ  For every scalar subtype S: 
  38817.  
  38818.         a. S'Succ denotes a function with the following specification: 
  38819.  
  38820.                    b.
  38821.  
  38822.                       function S'Succ(Arg : S'Base) return S'Base
  38823.  
  38824.         c. For an enumeration type, the function returns the value whose 
  38825.            position number is one more than that of the value of Arg; 
  38826.            Constraint_Error is raised if there is no such value of the type. 
  38827.            For an integer type, the function returns the result of adding one 
  38828.            to the value of Arg. For a fixed point type, the function returns 
  38829.            the result of adding small to the value of Arg. For a floating point 
  38830.            type, the function returns the machine number (as defined in 3.5.7.) 
  38831.            immediately above the value of Arg;  Constraint_Error is raised if 
  38832.            there is no such machine number. See 3.5. 
  38833.  
  38834.    1. S'Tag  For every subtype S of a tagged type T (specific or class-wide): 
  38835.  
  38836.         a. S'Tag denotes the tag of the type T (or if T is class-wide, the tag 
  38837.            of the root type of the corresponding class). The value of this 
  38838.            attribute is of type Tag. See 3.9. 
  38839.  
  38840.    1. X'Tag  For a prefix X that is of a class-wide tagged type (after any 
  38841.       implicit dereference): 
  38842.  
  38843.         a. X'Tag denotes the tag of X. The value of this attribute is of type 
  38844.            Tag. See 3.9. 
  38845.  
  38846.    1. T'Terminated  For a prefix T that is of a task type (after any implicit 
  38847.       dereference): 
  38848.  
  38849.         a. Yields the value True if the task denoted by T is terminated, and 
  38850.            False otherwise. The value of this attribute is of the predefined 
  38851.            type Boolean. See 9.9. 
  38852.  
  38853.    1. S'Truncation  For every subtype S of a floating point type T: 
  38854.  
  38855.         a. S'Truncation denotes a function with the following specification: 
  38856.  
  38857.                    b.
  38858.  
  38859.                       function S'Truncation (X : T) return T
  38860.  
  38861.         c. The function yields the value Ceiling(X) when X is negative, and 
  38862.            Floor(X) otherwise. A zero result has the sign of X when 
  38863.            S'Signed_Zeros is True. See A.5.3. 
  38864.  
  38865.    1. S'Unbiased_Rounding  For every subtype S of a floating point type T: 
  38866.  
  38867.         a. S'Unbiased_Rounding denotes a function with the following 
  38868.            specification: 
  38869.  
  38870.                    b.
  38871.  
  38872.                       function S'Unbiased_Rounding (X : T) return T
  38873.  
  38874.         c. The function yields the integral value nearest to X, rounding toward 
  38875.            the even integer if X lies exactly halfway between two integers. A 
  38876.            zero result has the sign of X when S'Signed_Zeros is True. See 
  38877.            A.5.3. 
  38878.  
  38879.    1. X'Unchecked_Access  For a prefix X that denotes an aliased view of an 
  38880.       object: 
  38881.  
  38882.         a. All rules and semantics that apply to X'Access, see 3.10.2, apply 
  38883.            also to X'Unchecked_Access, except that, for the purposes of 
  38884.            accessibility rules and checks, it is as if X were declared 
  38885.            immediately within a library package. See 13.10. 
  38886.  
  38887.    1. S'Val  For every discrete subtype S: 
  38888.  
  38889.         a. S'Val denotes a function with the following specification: 
  38890.  
  38891.                    b.
  38892.  
  38893.                       function S'Val(Arg : universal_integer) return S'Base
  38894.  
  38895.         c. This function returns a value of the type of S whose position number 
  38896.            equals the value of Arg. See 3.5.5. 
  38897.  
  38898.    1. 262 X'Valid  For a prefix X that denotes a scalar object (after any 
  38899.       implicit dereference): 
  38900.  
  38901.         a. Yields True if and only if the object denoted by X is normal and has 
  38902.            a valid representation. The value of this attribute is of the 
  38903.            predefined type Boolean. See 13.9.2. 
  38904.  
  38905.    1. S'Value  For every scalar subtype S: 
  38906.  
  38907.         a. S'Value denotes a function with the following specification: 
  38908.  
  38909.                    b.
  38910.  
  38911.                       function S'Value(Arg : String) return S'Base
  38912.  
  38913.         c. This function returns a value given an image of the value as a 
  38914.            String, ignoring any leading or trailing spaces. See 3.5. 
  38915.  
  38916.    1. P'Version  For a prefix P that statically denotes a program unit: 
  38917.  
  38918.         a. Yields a value of the predefined type String that identifies the 
  38919.            version of the compilation unit that contains the declaration of the 
  38920.            program unit. See E.3. 
  38921.  
  38922.    1. S'Wide_Image  For every scalar subtype S: 
  38923.  
  38924.         a. S'Wide_Image denotes a function with the following specification: 
  38925.  
  38926.                    b.
  38927.  
  38928.                       function S'Wide_Image(Arg : S'Base) return Wide_String
  38929.  
  38930.         c. The function returns an image of the value of Arg, that is, a 
  38931.            sequence of characters representing the value in display form. See 
  38932.            3.5. 
  38933.  
  38934.    1. S'Wide_Value  For every scalar subtype S: 
  38935.  
  38936.         a. S'Wide_Value denotes a function with the following specification: 
  38937.  
  38938.                    b.
  38939.  
  38940.                       function S'Wide_Value(Arg : Wide_String) return S'Base
  38941.  
  38942.         c. This function returns a value given an image of the value as a 
  38943.            Wide_String, ignoring any leading or trailing spaces. See 3.5. 
  38944.  
  38945.    1. S'Wide_Width  For every scalar subtype S: 
  38946.  
  38947.         a. S'Wide_Width denotes the maximum length of a Wide_String returned by 
  38948.            S'Wide_Image over all values of the subtype S. It denotes zero for a 
  38949.            subtype that has a null range. Its type is universal_integer. See 
  38950.            3.5. 
  38951.  
  38952.    1. S'Width  For every scalar subtype S: 
  38953.  
  38954.         a. S'Width denotes the maximum length of a String returned by S'Image 
  38955.            over all values of the subtype S. It denotes zero for a subtype that 
  38956.            has a null range. Its type is universal_integer. See 3.5. 
  38957.  
  38958.    1. S'Class'Write  For every subtype S'Class of a class-wide type T'Class: 
  38959.  
  38960.         a. S'Class'Write denotes a procedure with the following specification: 
  38961.  
  38962.                    b.
  38963.  
  38964.                       procedure S'Class'Write
  38965.                        (Stream : access Ada.Streams.Root_Stream_Type'Class;
  38966.                         Item  : in T'Class)
  38967.  
  38968.         c. Dispatches to the subprogram denoted by the Write attribute of the 
  38969.            specific type identified by the tag of Item. See 13.13.2. 
  38970.  
  38971.    1. S'Write  For every subtype S of a specific type T: 
  38972.  
  38973.         a. S'Write denotes a procedure with the following specification: 
  38974.  
  38975.                    b.
  38976.  
  38977.                       procedure S'Write
  38978.                        (Stream : access Ada.Streams.Root_Stream_Type'Class;
  38979.                         Item : in T)
  38980.  
  38981.         c. S'Write writes the value of Item to Stream. See 13.13.2. 
  38982.  
  38983.  
  38984. ΓòÉΓòÉΓòÉ 27. Language-Defined Pragmas (informative) ΓòÉΓòÉΓòÉ
  38985.  
  38986.    1. This Annex summarizes the definitions given elsewhere of the 
  38987.       language-defined pragmas. 
  38988.  
  38989.          2.
  38990.  
  38991.             pragma All_Calls_Remote[(library_unit_name)];
  38992.             --  see E.2.3.
  38993.  
  38994.          3.
  38995.  
  38996.             pragma Asynchronous(local_name);
  38997.             --  see E.4.1.
  38998.  
  38999.          4.
  39000.  
  39001.             pragma Atomic(local_name);
  39002.             --  see C.6.
  39003.  
  39004.          5.
  39005.  
  39006.             pragma Atomic_Components(array_local_name);
  39007.             --  see C.6.
  39008.  
  39009.          6.
  39010.  
  39011.             pragma Attach_Handler(handler_name, expression);
  39012.             --  see C.3.1.
  39013.  
  39014.          7.
  39015.  
  39016.             pragma Controlled(first_subtype_local_name);
  39017.             --  see 13.11.3.
  39018.  
  39019.          8.
  39020.  
  39021.             pragma Convention([Convention =>] convention_identifier,
  39022.              [Entity =>] local_name);
  39023.             --  see B.1.
  39024.  
  39025.          9.
  39026.  
  39027.             pragma Discard_Names[([On => ] local_name)];
  39028.             --  see C.5.
  39029.  
  39030.         10.
  39031.  
  39032.             pragma Elaborate(library_unit_name{, library_unit_name});
  39033.             --  see 10.2.1.
  39034.  
  39035.         11.
  39036.  
  39037.             pragma Elaborate_All(library_unit_name{, library_unit_name});
  39038.             --  see 10.2.1.
  39039.  
  39040.         12.
  39041.  
  39042.             pragma Elaborate_Body[(library_unit_name)];
  39043.             --  see 10.2.1.
  39044.  
  39045.         13.
  39046.  
  39047.             pragma Export( [Convention =>] convention_identifier,
  39048.              [Entity =>] local_name [, [External_Name =>] string_expression]
  39049.              [, [Link_Name =>] string_expression]);
  39050.             --  see B.1.
  39051.  
  39052.         14.
  39053.  
  39054.             pragma Import( [Convention =>] convention_identifier,
  39055.              [Entity =>] local_name [, [External_Name =>] string_expression]
  39056.              [, [Link_Name =>] string_expression]);
  39057.             --  see B.1.
  39058.  
  39059.         15.
  39060.  
  39061.             pragma Inline(name {, name});
  39062.             --  see 6.3.2.
  39063.  
  39064.         16.
  39065.  
  39066.             pragma Inspection_Point[(object_name {, object_name})];
  39067.             --  see H.3.2.
  39068.  
  39069.         17.
  39070.  
  39071.             pragma Interrupt_Handler(handler_name);
  39072.             --  see C.3.1.
  39073.  
  39074.         18.
  39075.  
  39076.             pragma Interrupt_Priority[(expression)];
  39077.             --  see D.1.
  39078.  
  39079.         19.
  39080.  
  39081.             pragma Linker_Options(string_expression);
  39082.             --  see B.1.
  39083.  
  39084.         20.
  39085.  
  39086.             pragma List(identifier);
  39087.             --  see 2.8.
  39088.  
  39089.         21.
  39090.  
  39091.             pragma Locking_Policy(policy_identifier);
  39092.             --  see D.3.
  39093.  
  39094.         22.
  39095.  
  39096.             pragma Normalize_Scalars;
  39097.             --  see H.1.
  39098.  
  39099.         23.
  39100.  
  39101.             pragma Optimize(identifier);
  39102.             --  see 2.8.
  39103.  
  39104.         24.
  39105.  
  39106.             pragma Pack(first_subtype_local_name);
  39107.             --  see 13.2.
  39108.  
  39109.         25.
  39110.  
  39111.             pragma Page;
  39112.             --  see 2.8.
  39113.  
  39114.         26.
  39115.  
  39116.             pragma Preelaborate[(library_unit_name)];
  39117.             --  see 10.2.1.
  39118.  
  39119.         27.
  39120.  
  39121.             pragma Priority(expression);
  39122.             --  see D.1.
  39123.  
  39124.         28.
  39125.  
  39126.             pragma Pure[(library_unit_name)];
  39127.             --  see 10.2.1.
  39128.  
  39129.         29.
  39130.  
  39131.             pragma Queuing_Policy(policy_identifier);
  39132.             --  see D.4.
  39133.  
  39134.         30.
  39135.  
  39136.             pragma Remote_Call_Interface[(library_unit_name)];
  39137.             --  see E.2.3.
  39138.  
  39139.         31.
  39140.  
  39141.             pragma Remote_Types[(library_unit_name)];
  39142.             --  see E.2.2.
  39143.  
  39144.         32.
  39145.  
  39146.             pragma Restrictions(restriction{, restriction});
  39147.             --  see 13.12.
  39148.  
  39149.         33.
  39150.  
  39151.             pragma Reviewable;
  39152.             --  see H.3.1.
  39153.  
  39154.         34.
  39155.  
  39156.             pragma Shared_Passive[(library_unit_name)];
  39157.             --  see E.2.1.
  39158.  
  39159.         35.
  39160.  
  39161.             pragma Storage_Size(expression);
  39162.             --  see 13.3.
  39163.  
  39164.         36.
  39165.  
  39166.             pragma Suppress(identifier [, [On =>] name]);
  39167.             --  see 11.5.
  39168.  
  39169.         37.
  39170.  
  39171.             pragma Task_Dispatching_Policy(policy_identifier );
  39172.             --  see D.2.2.
  39173.  
  39174.         38.
  39175.  
  39176.             pragma Volatile(local_name);
  39177.             --  see C.6.
  39178.  
  39179.         39.
  39180.  
  39181.             pragma Volatile_Components(array_local_name);
  39182.             --  see C.6.
  39183.  
  39184.  
  39185. ΓòÉΓòÉΓòÉ 28. Implementation-Defined Characteristics (informative) ΓòÉΓòÉΓòÉ
  39186.  
  39187.    1. The Ada language allows for certain machine dependences in a controlled 
  39188.       manner. Each Ada implementation must document all implementation-defined 
  39189.       characteristics: 
  39190.  
  39191.         a. Whether or not each recommendation given in Implementation Advice is 
  39192.            followed. See 1.1.2(37). 
  39193.  
  39194.         b. Capacity limitations of the implementation. See 1.1.3(3). 
  39195.  
  39196.         c. Variations from the standard that are impractical to avoid given the 
  39197.            implementation's execution environment. See 1.1.3(6). 
  39198.  
  39199.         d. Which code_statements cause external interactions. See 1.1.3(10). 
  39200.  
  39201.         e. The coded representation for the text of an Ada program. See 2.1, 
  39202.            (4). 
  39203.  
  39204.         f. The control functions allowed in comments. See 2.1(14). 
  39205.  
  39206.         g. The representation for an end of line. See 2.2(2). 
  39207.  
  39208.         h. Maximum supported line length and lexical element length. See 2.2, 
  39209.            (15). 
  39210.  
  39211.         i. Implementation-defined pragmas. See 2.8(14). 
  39212.  
  39213.         j. Effect of pragma Optimize. See 2.8(27). 
  39214.  
  39215.         k. The sequence of characters of the value returned by S'Image when 
  39216.            some of the graphic characters of S'Wide_Image are not defined in 
  39217.            Character. See 3.5(37). 
  39218.  
  39219.         l. The predefined integer types declared in Standard. See 3.5.4(25). 
  39220.  
  39221.         m. Any nonstandard integer types and the operators defined for them. 
  39222.            See 3.5.4(26). 
  39223.  
  39224.         n. Any nonstandard real types and the operators defined for them. See 
  39225.            3.5.6(8). 
  39226.  
  39227.         o. What combinations of requested decimal precision and range are 
  39228.            supported for floating point types. See 3.5.7(7). 
  39229.  
  39230.         p. The predefined floating point types declared in Standard. See 3.5.7, 
  39231.            (16). 
  39232.  
  39233.         q. The small of an ordinary fixed point type. See 3.5.9(8). 
  39234.  
  39235.         r. What combinations of small, range, and digits are supported for 
  39236.            fixed point types. See 3.5.9(10). 
  39237.  
  39238.         s. The result of Tags.Expanded_Name for types declared within an 
  39239.            unnamed block_statement. See 3.9(10). 
  39240.  
  39241.         t. Implementation-defined attributes. See 4.1.4(12). 
  39242.  
  39243.         u. Any implementation-defined time types. See 9.6(6). 
  39244.  
  39245.         v. The time base associated with relative delays. See 9.6(20). 
  39246.  
  39247.         w. The time base of the type Calendar.Time. See 9.6(23). 
  39248.  
  39249.         x. The timezone used for package Calendar operations. See 9.6(24). 
  39250.  
  39251.         y. Any limit on delay_until_statements of select_statements. See 9.6, 
  39252.            (29). 
  39253.  
  39254.         z. Whether or not two nonoverlapping parts of a composite object are 
  39255.            independently addressable, in the case where packing, record layout, 
  39256.            or Component_Size is specified for the object. See 9.10(1). 
  39257.  
  39258.         a. The representation for a compilation. See 10.1(2). 
  39259.  
  39260.         b. Any restrictions on compilations that contain multiple 
  39261.            compilation_units. See 10.1(4). 
  39262.  
  39263.         c. The mechanisms for creating an environment and for adding and 
  39264.            replacing compilation units. See 10.1.4(3). 
  39265.  
  39266.         d. The manner of explicitly assigning library units to a partition. See 
  39267.            10.2(2). 
  39268.  
  39269.         e. The implementation-defined means, if any, of specifying which 
  39270.            compilation units are needed by a given compilation unit. See 10.2, 
  39271.            (2). 
  39272.  
  39273.         f. The manner of designating the main subprogram of a partition. See 
  39274.            10.2(7). 
  39275.  
  39276.         g. The order of elaboration of library_items. See 10.2(18). 
  39277.  
  39278.         h. Parameter passing and function return for the main subprogram. See 
  39279.            10.2(21). 
  39280.  
  39281.         i. The mechanisms for building and running partitions. See 10.2(24). 
  39282.  
  39283.         j. The details of program execution, including program termination. See 
  39284.            10.2(25). 
  39285.  
  39286.         k. The semantics of any nonactive partitions supported by the 
  39287.            implementation. See 10.2(28). 
  39288.  
  39289.         l. The information returned by Exception_Message. See 11.4.1(10). 
  39290.  
  39291.         m. The result of Exceptions.Exception_Name for types declared within an 
  39292.            unnamed block_statement. See 11.4.1(12). 
  39293.  
  39294.         n. The information returned by Exception_Information. See 11.4.1(13). 
  39295.  
  39296.         o. Implementation-defined check names. See 11.5(27). 
  39297.  
  39298.         p. The interpretation of each aspect of representation. See 13.1(20). 
  39299.  
  39300.         q. Any restrictions placed upon representation items. See 13.1(20). 
  39301.  
  39302.         r. The meaning of Size for indefinite subtypes. See 13.3(48). 
  39303.  
  39304.         s. The default external representation for a type tag. See 13.3(75). 
  39305.  
  39306.         t. What determines whether a compilation unit is the same in two 
  39307.            different partitions. See 13.3(76). 
  39308.  
  39309.         u. Implementation-defined components. See 13.5.1(15). 
  39310.  
  39311.         v. If Word_Size = Storage_Unit, the default bit ordering. See 13.5.3, 
  39312.            (5). 
  39313.  
  39314.         w. The contents of the visible part of package System and its 
  39315.            language-defined children. See 13.7(2). 
  39316.  
  39317.         x. The contents of the visible part of package System.Machine_Code, and 
  39318.            the meaning of code_statements. See 13.8(7). 
  39319.  
  39320.         y. The effect of unchecked conversion. See 13.9(11). 
  39321.  
  39322.         z. The manner of choosing a storage pool for an access type when 
  39323.            Storage_Pool is not specified for the type. See 13.11(17). 
  39324.  
  39325.         a. Whether or not the implementation provides user-accessible names for 
  39326.            the standard pool type(s). See 13.11(17). 
  39327.  
  39328.         b. The meaning of Storage_Size. See 13.11(18). 
  39329.  
  39330.         c. Implementation-defined aspects of storage pools. See 13.11(22). 
  39331.  
  39332.         d. The set of restrictions allowed in a pragma Restrictions. See 13.12, 
  39333.            (7). 
  39334.  
  39335.         e. The consequences of violating limitations on Restrictions pragmas. 
  39336.            See 13.12(9). 
  39337.  
  39338.         f. The representation used by the Read and Write attributes of 
  39339.            elementary types in terms of stream elements. See 13.13.2(9). 
  39340.  
  39341.         g. The names and characteristics of the numeric subtypes declared in 
  39342.            the visible part of package Standard. See A.1(3). 
  39343.  
  39344.         h. The accuracy actually achieved by the elementary functions. See 
  39345.            A.5.1(1). 
  39346.  
  39347.         i. The sign of a zero result from some of the operators or functions in 
  39348.            Numerics.Generic_Elementary_Functions, when Float_Type'Signed_Zeros 
  39349.            is True. See A.5.1(46). 
  39350.  
  39351.         j. The value of Numerics.Float_Random.Max_Image_Width. See A.5.2(27). 
  39352.  
  39353.         k. The value of Numerics.Discrete_Random.Max_Image_Width. See A.5.2, 
  39354.            (27). 
  39355.  
  39356.         l. The algorithms for random number generation. See  See 2(32). 
  39357.  
  39358.         m. The string representation of a random number generator's state. See 
  39359.            A.5.2(38). 
  39360.  
  39361.         n. The minimum time interval between calls to the time-dependent Reset 
  39362.            procedure that are guaranteed to initiate different random number 
  39363.            sequences. See A.5.2(45). 
  39364.  
  39365.         o. The values of the Model_Mantissa, Model_Emin, Model_Epsilon, Model, 
  39366.            Safe_First, and Safe_Last attributes, if the Numerics Annex is not 
  39367.            supported. See A.5.3(72). 
  39368.  
  39369.         p. Any implementation-defined characteristics of the input-output 
  39370.            packages. See A.7(14). 
  39371.  
  39372.         q. The value of Buffer_Size in Storage_IO. See A.9(10). 
  39373.  
  39374.         r. external files for standard input, standard output, and standard 
  39375.            error. See A.10(5). 
  39376.  
  39377.         s. The accuracy of the value produced by Put. See A.10.9(36). 
  39378.  
  39379.         t. The meaning of Argument_Count, Argument, and Command_Name. See A.15, 
  39380.            (1). 
  39381.  
  39382.         u. Implementation-defined convention names. See B.1(11). 
  39383.  
  39384.         v. The meaning of link names. See B.1(36). 
  39385.  
  39386.         w. The manner of choosing link names when neither the link name nor the 
  39387.            address of an imported or exported entity is specified. See B.1, 
  39388.            (36). 
  39389.  
  39390.         x. The effect of pragma Linker_Options. See B.1(37). 
  39391.  
  39392.         y. The contents of the visible part of package Interfaces and its 
  39393.            language-defined descendants. See B.2(1). 
  39394.  
  39395.         z. Implementation-defined children of package Interfaces. The contents 
  39396.            of the visible part of package Interfaces. See 11. 
  39397.  
  39398.         a. The types Floating, Long_Floating, Binary, Long_Binary, 
  39399.            Decimal_Element, and COBOL_Character; and the initializations of the 
  39400.            variables Ada_To_COBOL and COBOL_To_Ada, in Interfaces.COBOL  See 
  39401.            B.4(50). 
  39402.  
  39403.         b. Support for access to machine instructions. See C.1(1). 
  39404.  
  39405.         c. Implementation-defined aspects of access to machine operations. See 
  39406.            C.1(9). 
  39407.  
  39408.         d. Implementation-defined aspects of interrupts. See C.3(2). 
  39409.  
  39410.         e. Implementation-defined aspects of preelaboration. See C.4(13). 
  39411.  
  39412.         f. The semantics of pragma Discard_Names. See C.5(7). 
  39413.  
  39414.         g. The result of the Task_Identification.Image attribute. See C.7.1, 
  39415.            (7). 
  39416.  
  39417.         h. The value of Current_Task when in a protected entry or interrupt 
  39418.            handler. See C.7.1(17). 
  39419.  
  39420.         i. The effect of calling Current_Task from an entry body or interrupt 
  39421.            handler. See C.7.1(19). 
  39422.  
  39423.         j. Implementation-defined aspects of Task_Attributes. See C.7.2(19). 
  39424.  
  39425.         k. Values of all Metrics. See D(2). 
  39426.  
  39427.         l. The declarations of Any_Priority and Priority. See D.1(11). 
  39428.  
  39429.         m. Implementation-defined execution resources. See D.1(15). 
  39430.  
  39431.         n. Whether, on a multiprocessor, a task that is waiting for access to a 
  39432.            protected object keeps its processor busy. See D.2.1(3). 
  39433.  
  39434.         o. The affect of implementation defined execution resources on task 
  39435.            dispatching. See D.2.1(9). 
  39436.  
  39437.         p. Implementation-defined policy_identifiers allowed in a pragma 
  39438.            Task_Dispatching_Policy. See D.2.2(3). 
  39439.  
  39440.         q. Implementation-defined aspects of priority inversion. See D.2.2, 
  39441.            (16). 
  39442.  
  39443.         r. Implementation defined task dispatching. See D.2.2(18). 
  39444.  
  39445.         s. Implementation-defined policy_identifiers allowed in a pragma 
  39446.            Locking_Policy. See D.3(4). 
  39447.  
  39448.         t. Default ceiling priorities. See D.3(10). 
  39449.  
  39450.         u. The ceiling of any protected object used internally by the 
  39451.            implementation. See D.3(16). 
  39452.  
  39453.         v. Implementation-defined queuing policies. See D.4(1). 
  39454.  
  39455.         w. On a multiprocessor, any conditions that cause the completion of an 
  39456.            aborted construct to be delayed later than what is specified for a 
  39457.            single processor. See D.6(3). 
  39458.  
  39459.         x. Any operations that implicitly require heap storage allocation. See 
  39460.            D.7(8). 
  39461.  
  39462.         y. Implementation-defined aspects of pragma Restrictions. See D.7(20). 
  39463.  
  39464.         z. Implementation-defined aspects of package Real_Time. See D.8(17). 
  39465.  
  39466.         a. Implementation-defined aspects of delay_statements. See D.9(8). 
  39467.  
  39468.         b. The upper bound on the duration of interrupt blocking caused by the 
  39469.            implementation. See D.12(5). 
  39470.  
  39471.         c. The means for creating and executing distributed programs. See E, 
  39472.            (5). 
  39473.  
  39474.         d. Any events that can result in a partition becoming inaccessible. See 
  39475.            E.1(7). 
  39476.  
  39477.         e. The scheduling policies, treatment of priorities, and management of 
  39478.            shared resources between partitions in certain cases. See E.1(11). 
  39479.  
  39480.         f. Events that cause the version of a compilation unit to change. See 
  39481.            E.3(5). 
  39482.  
  39483.         g. Whether the execution of the remote subprogram is immediately 
  39484.            aborted as a result of cancellation. See E.4(13). 
  39485.  
  39486.         h. Implementation-defined aspects of the PCS. See E.5(25). 
  39487.  
  39488.         i. Implementation-defined interfaces in the PCS. See E.5(26). 
  39489.  
  39490.         j. The values of named numbers in the package Decimal. See F.2(7). 
  39491.  
  39492.         k. The value of Max_Picture_Length in the package Text_IO.Editing See 
  39493.            F.3.3(16). 
  39494.  
  39495.         l. The value of Max_Picture_Length in the package Wide_Text_IO.Editing 
  39496.            See F.3.4(5). 
  39497.  
  39498.         m. The accuracy actually achieved by the complex elementary functions 
  39499.            and by other complex arithmetic operations. See G.1(1). 
  39500.  
  39501.         n. The sign of a zero result (or a component thereof) from any operator 
  39502.            or function in Numerics.Generic_Complex_Types, when 
  39503.            Real'Signed_Zeros is True. See G.1.1(53). 
  39504.  
  39505.         o. The sign of a zero result (or a component thereof) from any operator 
  39506.            or function in Numerics.Generic_Complex_Elementary_Functions, when 
  39507.            Complex_Types.Real'Signed_Zeros is True. See G.1.2(45). 
  39508.  
  39509.         p. Whether the strict mode or the relaxed mode is the default. See G.2, 
  39510.            (2). 
  39511.  
  39512.         q. The result interval in certain cases of fixed-to-float conversion. 
  39513.            See G.2.1(10). 
  39514.  
  39515.         r. The result of a floating point arithmetic operation in overflow 
  39516.            situations, when the Machine_Overflows attribute of the result type 
  39517.            is False. See G.2.1(13). 
  39518.  
  39519.         s. The result interval for division (or exponentiation by a negative 
  39520.            exponent), when the floating point hardware implements division as 
  39521.            multiplication by a reciprocal. See G.2.1(16). 
  39522.  
  39523.         t. The definition of close result set, which determines the accuracy of 
  39524.            certain fixed point multiplications and divisions. See G.2.3(5). 
  39525.  
  39526.         u. Conditions on a universal_real operand of a fixed point 
  39527.            multiplication or division for which the result shall be in the 
  39528.            perfect result set. See G.2.3(22). 
  39529.  
  39530.         v. The result of a fixed point arithmetic operation in overflow 
  39531.            situations, when the Machine_Overflows attribute of the result type 
  39532.            is False. See G.2.3(27). 
  39533.  
  39534.         w. The result of an elementary function reference in overflow 
  39535.            situations, when the Machine_Overflows attribute of the result type 
  39536.            is False. See G.2.4(4). 
  39537.  
  39538.         x. The value of the angle threshold, within which certain elementary 
  39539.            functions, complex arithmetic operations, and complex elementary 
  39540.            functions yield results conforming to a maximum relative error 
  39541.            bound. See G.2.4(10). 
  39542.  
  39543.         y. The accuracy of certain elementary functions for parameters beyond 
  39544.            the angle threshold. See G.2.4(10). 
  39545.  
  39546.         z. The result of a complex arithmetic operation or complex elementary 
  39547.            function reference in overflow situations, when the 
  39548.            Machine_Overflows attribute of the corresponding real type is False. 
  39549.            See G.2.6(5). 
  39550.  
  39551.         a. The accuracy of certain complex arithmetic operations and certain 
  39552.            complex elementary functions for parameters (or components thereof) 
  39553.            beyond the angle threshold. See G.2.6(8). 
  39554.  
  39555.         b. Information regarding bounded errors and erroneous execution. See 
  39556.            H.2(1). 
  39557.  
  39558.         c. Implementation-defined aspects of pragma Inspection_Point. See 
  39559.            H.3.2, (8). 
  39560.  
  39561.         d. Implementation-defined aspects of pragma Restrictions. See H.4(25). 
  39562.  
  39563.         e. Any restrictions on pragma Restrictions. See H.4(27). 
  39564.  
  39565.  
  39566. ΓòÉΓòÉΓòÉ 29. Glossary (informative) ΓòÉΓòÉΓòÉ
  39567.  
  39568.    1. This Annex contains informal descriptions of some terms used in this 
  39569.       International Standard. To find more formal definitions, look the term up 
  39570.       in the index. 
  39571.  
  39572.    2. Access type. An access type has values that designate aliased objects. 
  39573.       Access types correspond to ``pointer types'' or ``reference types'' in 
  39574.       some other languages. 
  39575.  
  39576.    3. Aliased. An aliased view of an object is one that can be designated by an 
  39577.       access value. Objects allocated by allocators are aliased. Objects can 
  39578.       also be explicitly declared as aliased with the reserved word aliased. 
  39579.       The Access attribute can be used to create an access value designating an 
  39580.       aliased object. 
  39581.  
  39582.    4. Array type. An array type is a composite type whose components are all of 
  39583.       the same type. Components are selected by indexing. 
  39584.  
  39585.    5. Character type. A character type is an enumeration type whose values 
  39586.       include characters. 
  39587.  
  39588.    6. Class. A class is a set of types that is closed under derivation, which 
  39589.       means that if a given type is in the class, then all types derived from 
  39590.       that type are also in the class. The set of types of a class share common 
  39591.       properties, such as their primitive operations. 
  39592.  
  39593.    7. Compilation unit. The text of a program can be submitted to the compiler 
  39594.       in one or more compilations. Each compilation is a succession of 
  39595.       compilation_units. A compilation_unit contains either the declaration, 
  39596.       the body, or a renaming of a program unit. 
  39597.  
  39598.    8. Composite type. A composite type has components. 
  39599.  
  39600.    9. Construct. A construct is a piece of text (explicit or implicit) that is 
  39601.       an instance of a syntactic category defined under ``Syntax.'' 
  39602.  
  39603.   10. Controlled type. A controlled type supports user-defined assignment and 
  39604.       finalization. Objects are always finalized before being destroyed. 
  39605.  
  39606.       Declaration. A declaration is a language construct that associates a name 
  39607.       with (a view of) an entity. A declaration may appear explicitly in the 
  39608.       program text (an explicit declaration), or may be supposed to occur at a 
  39609.       given place in the text as a consequence of the semantics of another 
  39610.       construct (an implicit declaration). 
  39611.  
  39612.   11. Definition. All declarations contain a definition for a view of an 
  39613.       entity. A view consists of an identification of the entity (the entity of 
  39614.       the view), plus view-specific characteristics that affect the use of the 
  39615.       entity through that view (such as mode of access to an object, formal 
  39616.       parameter names and defaults for a subprogram, or visibility to 
  39617.       components of a type). In most cases, a declaration also contains the 
  39618.       definition for the entity itself (a renaming_declaration is an example of 
  39619.       a declaration that does not define a new entity, but instead defines a 
  39620.       view of an existing entity, see 8.5. 
  39621.  
  39622.   12. Derived type. A derived type is a type defined in terms of another type, 
  39623.       which is the parent type of the derived type. Each class containing the 
  39624.       parent type also contains the derived type. The derived type inherits 
  39625.       properties such as components and primitive operations from the parent. A 
  39626.       type together with the types derived from it (directly or indirectly) 
  39627.       form a derivation class. 
  39628.  
  39629.   13. Discrete type. A discrete type is either an integer type or an 
  39630.       enumeration type. Discrete types may be used, for example, in 
  39631.       case_statements and as array indices. 
  39632.  
  39633.   14. Discriminant. A discriminant is a parameter of a composite type. It can 
  39634.       control, for example, the bounds of a component of the type if that type 
  39635.       is an array type. A discriminant of a task type can be used to pass data 
  39636.       to a task of the type upon creation. 
  39637.  
  39638.   15. Elementary type. An elementary type does not have components. 
  39639.  
  39640.   16. Enumeration type. An enumeration type is defined by an enumeration of its 
  39641.       values, which may be named by identifiers or character literals. 
  39642.  
  39643.   17. Exception. An exception represents a kind of exceptional situation; an 
  39644.       occurrence of such a situation (at run time) is called an exception 
  39645.       occurrence. To raise an exception is to abandon normal program execution 
  39646.       so as to draw attention to the fact that the corresponding situation has 
  39647.       arisen. Performing some actions in response to the arising of an 
  39648.       exception is called handling the exception. 
  39649.  
  39650.   18. Execution. The process by which a construct achieves its run-time effect 
  39651.       is called execution. Execution of a declaration is also called 
  39652.       elaboration. Execution of an expression is also called evaluation. 
  39653.  
  39654.   19. Generic unit. A generic unit is a template for a (nongeneric) program 
  39655.       unit; the template can be parameterized by objects, types, subprograms, 
  39656.       and packages. An instance of a generic unit is created by a 
  39657.       generic_instantiation. The rules of the language are enforced when a 
  39658.       generic unit is compiled, using a generic contract model; additional 
  39659.       checks are performed upon instantiation to verify the contract is met. 
  39660.       That is, the declaration of a generic unit represents a contract between 
  39661.       the body of the generic and instances of the generic. Generic units can 
  39662.       be used to perform the role that macros sometimed play in other 
  39663.       languages. 
  39664.  
  39665.   20. Integer type. Integer types comprise the signed integer types and the 
  39666.       modular types. A signed integer type has a base range that includes both 
  39667.       positive and negative numbers, and has operations that may raise an 
  39668.       exception when the result is outside the base range. A modular type has a 
  39669.       base range whose lower bound is zero, and has operations with 
  39670.       ``wraparound'' semantics. Modular types subsume what are called 
  39671.       ``unsigned types'' in some other languages. 
  39672.  
  39673.   21. Library unit. A library unit is a separately compiled program unit, and 
  39674.       is always a package, subprogram, or generic unit. Library units may have 
  39675.       other (logically nested) library units as children, and may have other 
  39676.       program units physically nested within them. A root library unit, 
  39677.       together with its children and grandchildren and so on, form a subsystem. 
  39678.  
  39679.   22. Limited type. A limited type is (a view of) a type for which the 
  39680.       assignment operation is not allowed. A nonlimited type is a (view of a) 
  39681.       type for which the assignment operation is allowed. 
  39682.  
  39683.   23. Object. An object is either a constant or a variable. An object contains 
  39684.       a value. An object is created by an object_declaration or by an 
  39685.       allocator. A formal parameter is (a view of) an object. A subcomponent of 
  39686.       an object is an object. 
  39687.  
  39688.   24. Package. Packages are program units that allow the specification of 
  39689.       groups of logically related entities. Typically, a package contains the 
  39690.       declaration of a type (often a private type or private extension) along 
  39691.       with the declarations of primitive subprograms of the type, which can be 
  39692.       called from outside the package, while their inner workings remain hidden 
  39693.       from outside users. 
  39694.  
  39695.   25. Partition. A partition is a part of a program. Each partition consists of 
  39696.       a set of library units. Each partition may run in a separate address 
  39697.       space, possibly on a separate computer. A program may contain just one 
  39698.       partition. A distributed program typically contains multiple partitions, 
  39699.       which can execute concurrently. 
  39700.  
  39701.   26. Pragma. A pragma is a compiler directive. There are language-defined 
  39702.       pragmas that give instructions for optimization, listing control, etc. An 
  39703.       implementation may support additional (implementation-defined) pragmas. 
  39704.  
  39705.   27. Primitive operations. The primitive operations of a type are the 
  39706.       operations (such as subprograms) declared together with the type 
  39707.       declaration. They are inherited by other types in the same class of 
  39708.       types. For a tagged type, the primitive subprograms are dispatching 
  39709.       subprograms, providing run-time polymorphism. A dispatching subprogram 
  39710.       may be called with statically tagged operands, in which case the 
  39711.       subprogram body invoked is determined at compile time. Alternatively, a 
  39712.       dispatching subprogram may be called using a dispatching call, in which 
  39713.       case the subprogram body invoked is determined at run time. 
  39714.  
  39715.   28. Private extension. A private extension is like a record extension, except 
  39716.       that the components of the extension part are hidden from its clients. 
  39717.  
  39718.   29. Private type. A private type is a partial view of a type whose full view 
  39719.       is hidden from its clients. 
  39720.  
  39721.   30. Program unit. A program unit is either a package, a task unit, a 
  39722.       protected unit, a protected entry, a generic unit, or an explicitly 
  39723.       declared subprogram other than an enumeration literal. Certain kinds of 
  39724.       program units can be separately compiled. Alternatively, they can appear 
  39725.       physically nested within other program units. 
  39726.  
  39727.   31. Program. A program is a set of partitions, each of which may execute in a 
  39728.       separate address space, possibly on a separate computer. A partition 
  39729.       consists of a set of library units. 
  39730.  
  39731.   32. Protected type. A protected type is a composite type whose components are 
  39732.       protected from concurrent access by multiple tasks. 
  39733.  
  39734.   33. Real type. A real type has values that are approximations of the real 
  39735.       numbers. Floating point and fixed point types are real types. 
  39736.  
  39737.   34. Record extension. A record extension is a type that extends another type 
  39738.       by adding additional components. 
  39739.  
  39740.   35. Record type. A record type is a composite type consisting of zero or more 
  39741.       named components, possibly of different types. 
  39742.  
  39743.   36. Scalar type. A scalar type is either a discrete type or a real type. 
  39744.  
  39745.   37. Subtype. A subtype is a type together with a constraint, which constrains 
  39746.       the values of the subtype to satisfy a certain condition. The values of a 
  39747.       subtype are a subset of the values of its type. 
  39748.  
  39749.   38. Tagged type. The objects of a tagged type have a run-time type tag, which 
  39750.       indicates the specific type with which the object was originally created. 
  39751.       An operand of a class-wide tagged type can be used in a dispatching call; 
  39752.       the tag indicates which subprogram body to invoke. Nondispatching calls, 
  39753.       in which the subprogram body to invoke is determined at compile time, are 
  39754.       also allowed. Tagged types may be extended with additional components. 
  39755.  
  39756.   39. Task type. A task type is a composite type whose values are tasks, which 
  39757.       are active entities that may execute concurrently with other tasks. The 
  39758.       top-level task of a partition is called the environment task. 
  39759.  
  39760.   40. Type. Each object has a type. A type has an associated set of values, and 
  39761.       a set of primitive operations which implement the fundamental aspects of 
  39762.       its semantics. Types are grouped into classes. The types of a given class 
  39763.       share a set of primitive operations. Classes are closed under derivation; 
  39764.       that is, if a type is in a class, then all of its derivatives are in that 
  39765.       class. 
  39766.  
  39767.   41. View. (See Definition.) 
  39768.  
  39769.  
  39770. ΓòÉΓòÉΓòÉ 30. Syntax Summary (informative) ΓòÉΓòÉΓòÉ
  39771.  
  39772.    1. This Annex summarizes the complete syntax of the language. 1.1.4, for a 
  39773.       description of the notation used. 
  39774.  
  39775.             2.1
  39776.             character ::=
  39777.                graphic_character
  39778.               | format_effector
  39779.               | other_control_function
  39780.  
  39781.             2.1
  39782.             graphic_character ::=
  39783.                identifier_letter
  39784.               | digit
  39785.               | space_character
  39786.               | special_character
  39787.  
  39788.             2.3
  39789.             identifier ::= identifier_letter {[underline] letter_or_digit}
  39790.  
  39791.             2.3
  39792.             letter_or_digit ::= identifier_letter | digit
  39793.  
  39794.             2.4
  39795.             numeric_literal ::= decimal_literal | based_literal
  39796.  
  39797.             2.4.1
  39798.             decimal_literal ::= numeral [.numeral] [exponent]
  39799.  
  39800.             2.4.1
  39801.             numeral ::= digit {[underline] digit}
  39802.  
  39803.             2.4.1
  39804.             exponent ::= E [+] numeral | E - numeral
  39805.  
  39806.             2.4.2
  39807.             based_literal ::= base # based_numeral [.based_numeral] # [exponent]
  39808.  
  39809.             2.4.2
  39810.             base ::= numeral
  39811.  
  39812.             2.4.2
  39813.             based_numeral ::= extended_digit {[underline] extended_digit}
  39814.  
  39815.             2.4.2
  39816.             extended_digit ::= digit | A | B | C | D | E | F
  39817.  
  39818.             2.5
  39819.             character_literal ::= 'graphic_character'
  39820.  
  39821.             2.6
  39822.             string_literal ::= "{string_element}"
  39823.  
  39824.             2.6
  39825.             string_element ::= "" | non_quotation_mark_graphic_character
  39826.  
  39827.             A string_element is either a pair of quotation marks (""), or a
  39828.             single graphic_character other than a quotation mark.
  39829.  
  39830.             2.7
  39831.             comment ::= --{non_end_of_line_character}
  39832.  
  39833.             2.8
  39834.             pragma ::=
  39835.               pragma identifier [(pragma_argument_association
  39836.                {, pragma_argument_association})];
  39837.  
  39838.             2.8
  39839.             pragma_argument_association ::=
  39840.                [pragma_argument_identifier =>] name
  39841.               | [pragma_argument_identifier =>] expression
  39842.  
  39843.             3.1
  39844.             basic_declaration ::=
  39845.                type_declaration     | subtype_declaration
  39846.               | object_declaration    | number_declaration
  39847.               | subprogram_declaration  | abstract_subprogram_declaration
  39848.               | package_declaration    | renaming_declaration
  39849.               | exception_declaration   | generic_declaration
  39850.               | generic_instantiation
  39851.  
  39852.             3.1
  39853.             defining_identifier ::= identifier
  39854.  
  39855.             3.2.1
  39856.             type_declaration ::=
  39857.                full_type_declaration
  39858.               | incomplete_type_declaration
  39859.               | private_type_declaration
  39860.               | private_extension_declaration
  39861.  
  39862.             3.2.1
  39863.             full_type_declaration ::=
  39864.                type defining_identifier [known_discriminant_part]
  39865.                 is type_definition;
  39866.               | task_type_declaration
  39867.               | protected_type_declaration
  39868.  
  39869.             3.2.1
  39870.             type_definition ::=
  39871.                enumeration_type_definition | integer_type_definition
  39872.               | real_type_definition     | array_type_definition
  39873.               | record_type_definition    | access_type_definition
  39874.               | derived_type_definition
  39875.  
  39876.             3.2.2
  39877.             subtype_declaration ::=
  39878.               subtype defining_identifier is subtype_indication;
  39879.  
  39880.             3.2.2
  39881.             subtype_indication ::=  subtype_mark [constraint]
  39882.  
  39883.             3.2.2
  39884.             subtype_mark ::= subtype_name
  39885.  
  39886.             3.2.2
  39887.             constraint ::= scalar_constraint | composite_constraint
  39888.  
  39889.             3.2.2
  39890.             scalar_constraint ::=
  39891.               range_constraint | digits_constraint | delta_constraint
  39892.  
  39893.             3.2.2
  39894.             composite_constraint ::=
  39895.               index_constraint | discriminant_constraint
  39896.  
  39897.             3.3.1
  39898.             object_declaration ::=
  39899.               defining_identifier_list : [aliased] [constant]
  39900.                subtype_indication [:= expression];
  39901.              | defining_identifier_list : [aliased] [constant]
  39902.                array_type_definition [:= expression];
  39903.              | single_task_declaration
  39904.              | single_protected_declaration
  39905.  
  39906.             3.3.1
  39907.             defining_identifier_list ::=
  39908.               defining_identifier {, defining_identifier}
  39909.  
  39910.             3.3.2
  39911.             number_declaration ::=
  39912.               defining_identifier_list : constant := static_expression;
  39913.  
  39914.             3.4
  39915.             derived_type_definition ::= [abstract] new
  39916.              parent_subtype_indication [record_extension_part]
  39917.  
  39918.             3.5
  39919.             range_constraint ::= range range
  39920.  
  39921.             3.5
  39922.             range ::=
  39923.                range_attribute_reference
  39924.               | simple_expression ┬╖┬╖ simple_expression
  39925.  
  39926.             3.5.1
  39927.             enumeration_type_definition ::=
  39928.               (enumeration_literal_specification
  39929.                {, enumeration_literal_specification})
  39930.  
  39931.             3.5.1
  39932.             enumeration_literal_specification ::=
  39933.               defining_identifier | defining_character_literal
  39934.  
  39935.             3.5.1
  39936.             defining_character_literal ::= character_literal
  39937.  
  39938.             3.5.4
  39939.             integer_type_definition ::=
  39940.               signed_integer_type_definition | modular_type_definition
  39941.  
  39942.             3.5.4
  39943.             signed_integer_type_definition ::=
  39944.               range static_simple_expression ┬╖┬╖ static_simple_expression
  39945.  
  39946.             3.5.4
  39947.             modular_type_definition ::= mod static_expression
  39948.  
  39949.             3.5.6
  39950.             real_type_definition ::=
  39951.               floating_point_definition | fixed_point_definition
  39952.  
  39953.             3.5.7
  39954.             floating_point_definition ::=
  39955.               digits static_expression [real_range_specification]
  39956.  
  39957.             3.5.7
  39958.             real_range_specification ::=
  39959.               range static_simple_expression ┬╖┬╖ static_simple_expression
  39960.  
  39961.             3.5.9
  39962.             fixed_point_definition ::=
  39963.               ordinary_fixed_point_definition | decimal_fixed_point_definition
  39964.  
  39965.             3.5.9
  39966.             ordinary_fixed_point_definition ::=
  39967.               delta static_expression real_range_specification
  39968.  
  39969.             3.5.9
  39970.             decimal_fixed_point_definition ::=
  39971.               delta static_expression digits static_expression
  39972.                [real_range_specification]
  39973.  
  39974.             3.5.9
  39975.             digits_constraint ::=
  39976.               digits static_expression [range_constraint]
  39977.  
  39978.             3.6
  39979.             array_type_definition ::=
  39980.               unconstrained_array_definition | constrained_array_definition
  39981.  
  39982.             3.6
  39983.             unconstrained_array_definition ::=
  39984.               array(index_subtype_definition {, index_subtype_definition})
  39985.                of component_definition
  39986.  
  39987.             3.6
  39988.             index_subtype_definition ::= subtype_mark range <>
  39989.  
  39990.             3.6
  39991.             constrained_array_definition ::=
  39992.               array (discrete_subtype_definition
  39993.                {, discrete_subtype_definition}) of component_definition
  39994.  
  39995.             3.6
  39996.             discrete_subtype_definition ::= discrete_subtype_indication | range
  39997.  
  39998.             3.6
  39999.             component_definition ::= [aliased] subtype_indication
  40000.  
  40001.             3.6.1
  40002.             index_constraint ::= (discrete_range {, discrete_range})
  40003.  
  40004.             3.6.1
  40005.             discrete_range ::= discrete_subtype_indication | range
  40006.  
  40007.             3.7
  40008.             discriminant_part ::=
  40009.               unknown_discriminant_part | known_discriminant_part
  40010.  
  40011.             3.7
  40012.             unknown_discriminant_part ::= (<>)
  40013.  
  40014.             3.7
  40015.             known_discriminant_part ::=
  40016.               (discriminant_specification {; discriminant_specification})
  40017.  
  40018.             3.7
  40019.             discriminant_specification ::=
  40020.                defining_identifier_list : subtype_mark
  40021.                 [:= default_expression]
  40022.               | defining_identifier_list : access_definition
  40023.                 [:= default_expression]
  40024.  
  40025.             3.7
  40026.             default_expression ::= expression
  40027.  
  40028.             3.7.1
  40029.             discriminant_constraint ::=
  40030.               (discriminant_association {, discriminant_association})
  40031.  
  40032.             3.7.1
  40033.             discriminant_association ::=
  40034.               [discriminant_selector_name
  40035.                {| discriminant_selector_name} =>] expression
  40036.  
  40037.             3.8
  40038.             record_type_definition ::=
  40039.               [[abstract] tagged] [limited] record_definition
  40040.  
  40041.             3.8
  40042.             record_definition ::=
  40043.                record
  40044.                 component_list
  40045.                end record
  40046.               | null record
  40047.  
  40048.             3.8
  40049.             component_list ::=
  40050.                component_item {component_item}
  40051.               | {component_item} variant_part
  40052.               |  null;
  40053.  
  40054.             3.8
  40055.             component_item ::= component_declaration | representation_clause
  40056.  
  40057.             3.8
  40058.             component_declaration ::=
  40059.               defining_identifier_list : component_definition
  40060.                [:= default_expression];
  40061.  
  40062.             3.8.1
  40063.             variant_part ::=
  40064.               case discriminant_direct_name is
  40065.                variant
  40066.                {variant}
  40067.               end case;
  40068.  
  40069.             3.8.1
  40070.             variant ::=
  40071.               when discrete_choice_list =>
  40072.                component_list
  40073.  
  40074.             3.8.1
  40075.             discrete_choice_list ::= discrete_choice {| discrete_choice}
  40076.  
  40077.             3.8.1
  40078.             discrete_choice ::= expression | discrete_range | others
  40079.  
  40080.             3.9.1
  40081.             record_extension_part ::= with record_definition
  40082.  
  40083.             3.10
  40084.             access_type_definition ::=
  40085.                access_to_object_definition
  40086.               | access_to_subprogram_definition
  40087.  
  40088.             3.10
  40089.             access_to_object_definition ::=
  40090.               access [general_access_modifier] subtype_indication
  40091.  
  40092.             3.10
  40093.             general_access_modifier ::= all | constant
  40094.  
  40095.             3.10
  40096.             access_to_subprogram_definition ::=
  40097.                access [protected] procedure parameter_profile
  40098.               | access [protected] function  parameter_and_result_profile
  40099.  
  40100.             3.10
  40101.             access_definition ::= access subtype_mark
  40102.  
  40103.             3.10.1
  40104.             incomplete_type_declaration ::=
  40105.               type defining_identifier [discriminant_part];
  40106.  
  40107.             3.11
  40108.             declarative_part ::= {declarative_item}
  40109.  
  40110.             3.11
  40111.             declarative_item ::= basic_declarative_item | body
  40112.  
  40113.             3.11
  40114.             basic_declarative_item ::=
  40115.               basic_declaration | representation_clause | use_clause
  40116.  
  40117.             3.11
  40118.             body ::= proper_body | body_stub
  40119.  
  40120.             3.11
  40121.             proper_body ::=
  40122.               subprogram_body | package_body | task_body | protected_body
  40123.  
  40124.             4.1
  40125.             name ::=
  40126.                direct_name         | explicit_dereference
  40127.               | indexed_component      | slice
  40128.               | selected_component     | attribute_reference
  40129.               | type_conversion       | function_call
  40130.               | character_literal
  40131.  
  40132.             4.1
  40133.             direct_name ::= identifier | operator_symbol
  40134.  
  40135.             4.1
  40136.             prefix ::= name | implicit_dereference
  40137.  
  40138.             4.1
  40139.             explicit_dereference ::= name.all
  40140.  
  40141.             4.1
  40142.             implicit_dereference ::= name
  40143.  
  40144.             4.1.1
  40145.             indexed_component ::= prefix(expression {, expression})
  40146.  
  40147.             4.1.2
  40148.             slice ::= prefix(discrete_range)
  40149.  
  40150.             4.1.3
  40151.             selected_component ::= prefix . selector_name
  40152.  
  40153.             4.1.3
  40154.             selector_name ::= identifier | character_literal | operator_symbol
  40155.  
  40156.             4.1.4
  40157.             attribute_reference ::= prefix'attribute_designator
  40158.  
  40159.             4.1.4
  40160.             attribute_designator ::=
  40161.                identifier[(static_expression)]
  40162.               | Access | Delta | Digits
  40163.  
  40164.             4.1.4
  40165.             range_attribute_reference ::= prefix'range_attribute_designator
  40166.  
  40167.             4.1.4
  40168.             range_attribute_designator ::= Range[(static_expression)]
  40169.  
  40170.             4.3
  40171.             aggregate ::=
  40172.               record_aggregate | extension_aggregate | array_aggregate
  40173.  
  40174.             4.3.1
  40175.             record_aggregate ::= (record_component_association_list)
  40176.  
  40177.             4.3.1
  40178.             record_component_association_list ::=
  40179.                record_component_association {, record_component_association}
  40180.               | null record
  40181.  
  40182.             4.3.1
  40183.             record_component_association ::=
  40184.               [ component_choice_list => ] expression
  40185.  
  40186.             4.3.1
  40187.             component_choice_list ::=
  40188.                component_selector_name {| component_selector_name}
  40189.               | others
  40190.  
  40191.             4.3.2
  40192.             extension_aggregate ::=
  40193.             (ancestor_part with record_component_association_list)
  40194.  
  40195.             4.3.2
  40196.             ancestor_part ::= expression | subtype_mark
  40197.  
  40198.             4.3.3
  40199.             array_aggregate ::=
  40200.               positional_array_aggregate | named_array_aggregate
  40201.  
  40202.             4.3.3
  40203.             positional_array_aggregate ::=
  40204.                (expression, expression {, expression})
  40205.               | (expression {, expression}, others => expression)
  40206.  
  40207.             4.3.3
  40208.             named_array_aggregate ::=
  40209.               (array_component_association {, array_component_association})
  40210.  
  40211.             4.3.3
  40212.             array_component_association ::=
  40213.               discrete_choice_list => expression
  40214.  
  40215.             4.4
  40216.             expression ::=
  40217.                relation {and relation} | relation {and then relation}
  40218.               | relation {or relation}  | relation {or else relation}
  40219.               | relation {xor relation}
  40220.  
  40221.             4.4
  40222.             relation ::=
  40223.                simple_expression [relational_operator simple_expression]
  40224.               | simple_expression [not] in range
  40225.               | simple_expression [not] in subtype_mark
  40226.  
  40227.             4.4
  40228.             simple_expression ::=
  40229.               [unary_adding_operator] term {binary_adding_operator term}
  40230.  
  40231.             4.4
  40232.             term ::= factor {multiplying_operator factor}
  40233.  
  40234.             4.4
  40235.             factor ::= primary [** primary] | abs primary | not primary
  40236.  
  40237.             4.4
  40238.             primary ::=
  40239.                numeric_literal  | null
  40240.               | string_literal   | aggregate
  40241.               | name        | qualified_expression
  40242.               | allocator     | (expression)
  40243.  
  40244.             4.5
  40245.             logical_operator       ::=  and | or  | xor
  40246.  
  40247.             4.5
  40248.             relational_operator      ::=  =  | /=  | <  | <= | > | >=
  40249.  
  40250.             4.5
  40251.             binary_adding_operator    ::=  +  | -  | &
  40252.  
  40253.             4.5
  40254.             unary_adding_operator     ::=  +  | -
  40255.  
  40256.             4.5
  40257.             multiplying_operator     ::=  *  | /  | mod | rem
  40258.  
  40259.             4.5
  40260.             highest_precedence_operator  ::=  **  | abs | not
  40261.  
  40262.             4.6
  40263.             type_conversion ::=
  40264.                subtype_mark(expression)
  40265.               | subtype_mark(name)
  40266.  
  40267.             4.7
  40268.             qualified_expression ::=
  40269.               subtype_mark'(expression) | subtype_mark'aggregate
  40270.  
  40271.             4.8
  40272.             allocator ::=
  40273.               new subtype_indication | new qualified_expression
  40274.  
  40275.             5.1
  40276.             sequence_of_statements ::= statement {statement}
  40277.  
  40278.             5.1
  40279.             statement ::=
  40280.               {label} simple_statement | {label} compound_statement
  40281.  
  40282.             5.1
  40283.             simple_statement ::= null_statement
  40284.               | assignment_statement  | exit_statement
  40285.               | goto_statement     | procedure_call_statement
  40286.               | return_statement    | entry_call_statement
  40287.               | requeue_statement    | delay_statement
  40288.               | abort_statement     | raise_statement
  40289.               | code_statement
  40290.  
  40291.             5.1
  40292.             compound_statement ::=
  40293.                if_statement      | case_statement
  40294.               | loop_statement     | block_statement
  40295.               | accept_statement    | select_statement
  40296.  
  40297.             5.1
  40298.             null_statement ::= null;
  40299.  
  40300.             5.1
  40301.             label ::= <<label_statement_identifier>>
  40302.  
  40303.             5.1
  40304.             statement_identifier ::= direct_name
  40305.  
  40306.             5.2
  40307.             assignment_statement ::= variable_name := expression;
  40308.  
  40309.             5.3
  40310.             if_statement ::=
  40311.               if condition then
  40312.                sequence_of_statements
  40313.               {elsif condition then
  40314.                sequence_of_statements}
  40315.               [else
  40316.                sequence_of_statements]
  40317.               end if;
  40318.  
  40319.             5.3
  40320.             condition ::= boolean_expression
  40321.  
  40322.             5.4
  40323.             case_statement ::=
  40324.               case expression is
  40325.                case_statement_alternative
  40326.                {case_statement_alternative}
  40327.               end case;
  40328.  
  40329.             5.4
  40330.             case_statement_alternative ::=
  40331.               when discrete_choice_list =>
  40332.                sequence_of_statements
  40333.  
  40334.             5.5
  40335.             loop_statement ::=
  40336.               [loop_statement_identifier:]
  40337.                [iteration_scheme] loop
  40338.                  sequence_of_statements
  40339.                end loop [loop_identifier];
  40340.  
  40341.             5.5
  40342.             iteration_scheme ::= while condition
  40343.               | for loop_parameter_specification
  40344.  
  40345.             5.5
  40346.             loop_parameter_specification ::=
  40347.               defining_identifier in [reverse] discrete_subtype_definition
  40348.  
  40349.             5.6
  40350.             block_statement ::=
  40351.               [block_statement_identifier:]
  40352.                [declare
  40353.                  declarative_part]
  40354.                begin
  40355.                  handled_sequence_of_statements
  40356.                end [block_identifier];
  40357.  
  40358.             5.7
  40359.             exit_statement ::= exit [loop_name] [when condition];
  40360.  
  40361.             5.8
  40362.             goto_statement ::= goto label_name;
  40363.  
  40364.             6.1
  40365.             subprogram_declaration ::= subprogram_specification;
  40366.  
  40367.             6.1
  40368.             abstract_subprogram_declaration ::= subprogram_specification is abstract;
  40369.  
  40370.             6.1
  40371.             subprogram_specification ::=
  40372.                procedure defining_program_unit_name parameter_profile
  40373.               | function defining_designator parameter_and_result_profile
  40374.  
  40375.             6.1
  40376.             designator ::= [parent_unit_name . ]identifier | operator_symbol
  40377.  
  40378.             6.1
  40379.             defining_designator ::=
  40380.               defining_program_unit_name | defining_operator_symbol
  40381.  
  40382.             6.1
  40383.             defining_program_unit_name ::=
  40384.               [parent_unit_name . ]defining_identifier
  40385.  
  40386.             6.1
  40387.             operator_symbol ::= string_literal
  40388.  
  40389.             6.1
  40390.             defining_operator_symbol ::= operator_symbol
  40391.  
  40392.             6.1
  40393.             parameter_profile ::= [formal_part]
  40394.  
  40395.             6.1
  40396.             parameter_and_result_profile ::= [formal_part] return subtype_mark
  40397.  
  40398.             6.1
  40399.             formal_part ::=
  40400.               (parameter_specification {; parameter_specification})
  40401.  
  40402.             6.1
  40403.             parameter_specification ::=
  40404.                defining_identifier_list : mode subtype_mark
  40405.                 [:= default_expression]
  40406.               | defining_identifier_list : access_definition
  40407.                 [:= default_expression]
  40408.  
  40409.             6.1
  40410.             mode ::= [in] | in out | out
  40411.  
  40412.             6.3
  40413.             subprogram_body ::=
  40414.               subprogram_specification is
  40415.                declarative_part
  40416.               begin
  40417.                handled_sequence_of_statements
  40418.               end [designator];
  40419.  
  40420.             6.4
  40421.             procedure_call_statement ::=
  40422.                procedure_name;
  40423.               | procedure_prefix actual_parameter_part;
  40424.  
  40425.             6.4
  40426.             function_call ::=
  40427.                function_name
  40428.               | function_prefix actual_parameter_part
  40429.  
  40430.             6.4
  40431.             actual_parameter_part ::=
  40432.               (parameter_association {, parameter_association})
  40433.  
  40434.             6.4
  40435.             parameter_association ::=
  40436.               [formal_parameter_selector_name =>] explicit_actual_parameter
  40437.  
  40438.             6.4
  40439.             explicit_actual_parameter ::= expression | variable_name
  40440.  
  40441.             6.5
  40442.             return_statement ::= return [expression];
  40443.  
  40444.             7.1
  40445.             package_declaration ::= package_specification;
  40446.  
  40447.             7.1
  40448.             package_specification ::=
  40449.               package defining_program_unit_name is
  40450.                {basic_declarative_item}
  40451.               [private
  40452.                {basic_declarative_item}]
  40453.               end [[parent_unit_name.]identifier]
  40454.  
  40455.             7.2
  40456.             package_body ::=
  40457.               package body defining_program_unit_name is
  40458.                declarative_part
  40459.               [begin
  40460.                handled_sequence_of_statements]
  40461.               end [[parent_unit_name.]identifier];
  40462.  
  40463.             7.3
  40464.             private_type_declaration ::=
  40465.               type defining_identifier [discriminant_part] is
  40466.                [[abstract] tagged] [limited] private;
  40467.  
  40468.             7.3
  40469.             private_extension_declaration ::=
  40470.               type defining_identifier [discriminant_part] is
  40471.                [abstract] new ancestor_subtype_indication with private;
  40472.  
  40473.             8.4
  40474.             use_clause ::= use_package_clause | use_type_clause
  40475.  
  40476.             8.4
  40477.             use_package_clause ::= use package_name {, package_name};
  40478.  
  40479.             8.4
  40480.             use_type_clause ::= use type subtype_mark {, subtype_mark};
  40481.  
  40482.             8.5
  40483.             renaming_declaration ::=
  40484.                object_renaming_declaration
  40485.               | exception_renaming_declaration
  40486.               | package_renaming_declaration
  40487.               | subprogram_renaming_declaration
  40488.               | generic_renaming_declaration
  40489.  
  40490.             8.5.1
  40491.             object_renaming_declaration ::=
  40492.               defining_identifier : subtype_mark renames object_name;
  40493.  
  40494.             8.5.2
  40495.             exception_renaming_declaration ::=
  40496.               defining_identifier : exception renames exception_name;
  40497.  
  40498.             8.5.3
  40499.             package_renaming_declaration ::=
  40500.               package defining_program_unit_name renames package_name;
  40501.  
  40502.             8.5.4
  40503.             subprogram_renaming_declaration ::=
  40504.               subprogram_specification renames callable_entity_name;
  40505.  
  40506.             8.5.5
  40507.             generic_renaming_declaration ::=
  40508.                generic package defining_program_unit_name renames
  40509.                 generic_package_name;
  40510.               | generic procedure defining_program_unit_name renames
  40511.                 generic_procedure_name;
  40512.               | generic function defining_program_unit_name renames
  40513.                 generic_function_name;
  40514.  
  40515.             9.1
  40516.             task_type_declaration ::=
  40517.               task type defining_identifier [known_discriminant_part]
  40518.                [is task_definition];
  40519.  
  40520.             9.1
  40521.             single_task_declaration ::=
  40522.               task defining_identifier [is task_definition];
  40523.  
  40524.             9.1
  40525.             task_definition ::=
  40526.                {task_item}
  40527.               [ private
  40528.                {task_item}]
  40529.               end [task_identifier]
  40530.  
  40531.             9.1
  40532.             task_item ::= entry_declaration | representation_clause
  40533.  
  40534.             9.1
  40535.             task_body ::=
  40536.               task body defining_identifier is
  40537.                declarative_part
  40538.               begin
  40539.                handled_sequence_of_statements
  40540.               end [task_identifier];
  40541.  
  40542.             9.4
  40543.             protected_type_declaration ::=
  40544.               protected type defining_identifier [known_discriminant_part] is
  40545.                protected_definition;
  40546.  
  40547.             9.4
  40548.             single_protected_declaration ::=
  40549.               protected defining_identifier is protected_definition;
  40550.  
  40551.             9.4
  40552.             protected_definition ::=
  40553.                { protected_operation_declaration }
  40554.               [ private
  40555.                { protected_element_declaration } ]
  40556.               end [protected_identifier]
  40557.  
  40558.             9.4
  40559.             protected_operation_declaration ::=
  40560.                subprogram_declaration
  40561.               | entry_declaration
  40562.               | representation_clause
  40563.  
  40564.             9.4
  40565.             protected_element_declaration ::=
  40566.               protected_operation_declaration | component_declaration
  40567.  
  40568.             9.4
  40569.             protected_body ::=
  40570.               protected body defining_identifier is
  40571.                { protected_operation_item }
  40572.               end [protected_identifier];
  40573.  
  40574.             9.4
  40575.             protected_operation_item ::=
  40576.                subprogram_declaration
  40577.               | subprogram_body
  40578.               | entry_body
  40579.               | representation_clause
  40580.  
  40581.             9.5.2
  40582.             entry_declaration ::=
  40583.               entry defining_identifier [(discrete_subtype_definition)]
  40584.                parameter_profile;
  40585.  
  40586.             9.5.2
  40587.             accept_statement ::=
  40588.               accept entry_direct_name [(entry_index)] parameter_profile [do
  40589.                handled_sequence_of_statements
  40590.               end [entry_identifier]];
  40591.  
  40592.             9.5.2
  40593.             entry_index ::= expression
  40594.  
  40595.             9.5.2
  40596.             entry_body ::=
  40597.               entry defining_identifier entry_body_formal_part entry_barrier is
  40598.                declarative_part
  40599.               begin
  40600.                handled_sequence_of_statements
  40601.               end [entry_identifier];
  40602.  
  40603.             9.5.2
  40604.             entry_body_formal_part ::=
  40605.               [(entry_index_specification)] parameter_profile
  40606.  
  40607.             9.5.2
  40608.             entry_barrier ::= when condition
  40609.  
  40610.             9.5.2
  40611.             entry_index_specification ::=
  40612.               for defining_identifier in discrete_subtype_definition
  40613.  
  40614.             9.5.3
  40615.             entry_call_statement ::= entry_name [actual_parameter_part];
  40616.  
  40617.             9.5.4
  40618.             requeue_statement ::= requeue entry_name [with abort];
  40619.  
  40620.             9.6
  40621.             delay_statement ::= delay_until_statement | delay_relative_statement
  40622.  
  40623.             9.6
  40624.             delay_until_statement ::= delay until delay_expression;
  40625.  
  40626.             9.6
  40627.             delay_relative_statement ::= delay delay_expression;
  40628.  
  40629.             9.7
  40630.             select_statement ::=
  40631.                selective_accept
  40632.               | timed_entry_call
  40633.               | conditional_entry_call
  40634.               | asynchronous_select
  40635.  
  40636.             9.7.1
  40637.             selective_accept ::=
  40638.               select
  40639.                [guard]
  40640.                select_alternative
  40641.               { or
  40642.                [guard]
  40643.                select_alternative }
  40644.               [ else
  40645.                sequence_of_statements ]
  40646.              end select;
  40647.  
  40648.             9.7.1
  40649.             guard ::= when condition =>
  40650.  
  40651.             9.7.1
  40652.             select_alternative ::=
  40653.                accept_alternative
  40654.               | delay_alternative
  40655.               | terminate_alternative
  40656.  
  40657.             9.7.1
  40658.             accept_alternative ::=
  40659.             accept_statement [sequence_of_statements]
  40660.  
  40661.             9.7.1
  40662.             delay_alternative ::=
  40663.             delay_statement [sequence_of_statements]
  40664.  
  40665.             9.7.1
  40666.             terminate_alternative ::= terminate;
  40667.  
  40668.             9.7.2
  40669.             timed_entry_call ::=
  40670.               select
  40671.                entry_call_alternative
  40672.               or
  40673.                delay_alternative
  40674.               end select;
  40675.  
  40676.             9.7.2
  40677.             entry_call_alternative ::=
  40678.               entry_call_statement [sequence_of_statements]
  40679.  
  40680.             9.7.3
  40681.             conditional_entry_call ::=
  40682.               select
  40683.                entry_call_alternative
  40684.               else
  40685.                sequence_of_statements
  40686.               end select;
  40687.  
  40688.             9.7.4
  40689.             asynchronous_select ::=
  40690.               select
  40691.                triggering_alternative
  40692.               then abort
  40693.                abortable_part
  40694.               end select;
  40695.  
  40696.             9.7.4
  40697.             triggering_alternative ::=
  40698.               triggering_statement [sequence_of_statements]
  40699.  
  40700.             9.7.4
  40701.             triggering_statement ::= entry_call_statement | delay_statement
  40702.  
  40703.             9.7.4
  40704.             abortable_part ::= sequence_of_statements
  40705.  
  40706.             9.8
  40707.             abort_statement ::= abort task_name {, task_name};
  40708.  
  40709.             10.1.1
  40710.             compilation ::= {compilation_unit}
  40711.  
  40712.             10.1.1
  40713.             compilation_unit ::=
  40714.                context_clause library_item
  40715.               | context_clause subunit
  40716.  
  40717.             10.1.1
  40718.             library_item ::= [private] library_unit_declaration
  40719.               | library_unit_body
  40720.               | [private] library_unit_renaming_declaration
  40721.  
  40722.             10.1.1
  40723.             library_unit_declaration ::=
  40724.                subprogram_declaration | package_declaration
  40725.               | generic_declaration   | generic_instantiation
  40726.  
  40727.             10.1.1
  40728.             library_unit_renaming_declaration ::=
  40729.                package_renaming_declaration
  40730.               | generic_renaming_declaration
  40731.               | subprogram_renaming_declaration
  40732.  
  40733.             10.1.1
  40734.             library_unit_body ::= subprogram_body | package_body
  40735.  
  40736.             10.1.1
  40737.             parent_unit_name ::= name
  40738.  
  40739.             10.1.2
  40740.             context_clause ::= {context_item}
  40741.  
  40742.             10.1.2
  40743.             context_item ::= with_clause | use_clause
  40744.  
  40745.             10.1.2
  40746.             with_clause ::= with library_unit_name {, library_unit_name};
  40747.  
  40748.             10.1.3
  40749.             body_stub ::=
  40750.                subprogram_body_stub
  40751.               | package_body_stub
  40752.               | task_body_stub
  40753.               | protected_body_stub
  40754.  
  40755.             10.1.3
  40756.             subprogram_body_stub ::= subprogram_specification is separate;
  40757.  
  40758.             10.1.3
  40759.             package_body_stub ::= package body defining_identifier is separate;
  40760.  
  40761.             10.1.3
  40762.             task_body_stub ::= task body defining_identifier is separate;
  40763.  
  40764.             10.1.3
  40765.             protected_body_stub ::=
  40766.               protected body defining_identifier is separate;
  40767.  
  40768.             10.1.3
  40769.             subunit ::= separate (parent_unit_name) proper_body
  40770.  
  40771.             11.1
  40772.             exception_declaration ::= defining_identifier_list : exception;
  40773.  
  40774.             11.2
  40775.             handled_sequence_of_statements ::=
  40776.                sequence_of_statements
  40777.               [exception
  40778.                exception_handler
  40779.                {exception_handler}]
  40780.  
  40781.             11.2
  40782.             exception_handler ::=
  40783.              when [choice_parameter_specification:] exception_choice
  40784.               {| exception_choice} =>
  40785.                sequence_of_statements
  40786.  
  40787.             11.2
  40788.             choice_parameter_specification ::= defining_identifier
  40789.  
  40790.             11.2
  40791.             exception_choice ::= exception_name | others
  40792.  
  40793.             11.3
  40794.             raise_statement ::= raise [exception_name];
  40795.  
  40796.             12.1
  40797.             generic_declaration ::=
  40798.               generic_subprogram_declaration | generic_package_declaration
  40799.  
  40800.             12.1
  40801.             generic_subprogram_declaration ::=
  40802.               generic_formal_part subprogram_specification;
  40803.  
  40804.             12.1
  40805.             generic_package_declaration ::=
  40806.               generic_formal_part package_specification;
  40807.  
  40808.             12.1
  40809.             generic_formal_part ::=
  40810.               generic {generic_formal_parameter_declaration | use_clause}
  40811.  
  40812.             12.1
  40813.             generic_formal_parameter_declaration ::=
  40814.                formal_object_declaration
  40815.               | formal_type_declaration
  40816.               | formal_subprogram_declaration
  40817.               | formal_package_declaration
  40818.  
  40819.             12.3
  40820.             generic_instantiation ::=
  40821.                package defining_program_unit_name is
  40822.                 new generic_package_name [generic_actual_part];
  40823.               | procedure defining_program_unit_name is
  40824.                 new generic_procedure_name [generic_actual_part];
  40825.               | function defining_designator is
  40826.                 new generic_function_name [generic_actual_part];
  40827.  
  40828.             12.3
  40829.             generic_actual_part ::=
  40830.               (generic_association {, generic_association})
  40831.  
  40832.             12.3
  40833.             generic_association ::=
  40834.               [generic_formal_parameter_selector_name =>]
  40835.                explicit_generic_actual_parameter
  40836.  
  40837.             12.3
  40838.             explicit_generic_actual_parameter ::= expression | variable_name
  40839.               | subprogram_name | entry_name | subtype_mark
  40840.               | package_instance_name
  40841.  
  40842.             12.4
  40843.             formal_object_declaration ::=
  40844.               defining_identifier_list : mode subtype_mark
  40845.                [:= default_expression];
  40846.  
  40847.             12.5
  40848.             formal_type_declaration ::=
  40849.               type defining_identifier[discriminant_part] is
  40850.                formal_type_definition;
  40851.  
  40852.             12.5
  40853.             formal_type_definition ::=
  40854.                formal_private_type_definition
  40855.               | formal_derived_type_definition
  40856.               | formal_discrete_type_definition
  40857.               | formal_signed_integer_type_definition
  40858.               | formal_modular_type_definition
  40859.               | formal_floating_point_definition
  40860.               | formal_ordinary_fixed_point_definition
  40861.               | formal_decimal_fixed_point_definition
  40862.               | formal_array_type_definition
  40863.               | formal_access_type_definition
  40864.  
  40865.             12.5.1
  40866.             formal_private_type_definition ::=
  40867.               [[abstract] tagged] [limited] private
  40868.  
  40869.             12.5.1
  40870.             formal_derived_type_definition ::=
  40871.               [abstract] new subtype_mark [with private]
  40872.  
  40873.             12.5.2
  40874.             formal_discrete_type_definition ::= (<>)
  40875.  
  40876.             12.5.2
  40877.             formal_signed_integer_type_definition ::= range <>
  40878.  
  40879.             12.5.2
  40880.             formal_modular_type_definition ::= mod <>
  40881.  
  40882.             12.5.2
  40883.             formal_floating_point_definition ::= digits <>
  40884.  
  40885.             12.5.2
  40886.             formal_ordinary_fixed_point_definition ::= delta <>
  40887.  
  40888.             12.5.2
  40889.             formal_decimal_fixed_point_definition ::= delta <> digits <>
  40890.  
  40891.             12.5.3
  40892.             formal_array_type_definition ::= array_type_definition
  40893.  
  40894.             12.5.4
  40895.             formal_access_type_definition ::= access_type_definition
  40896.  
  40897.             12.6
  40898.             formal_subprogram_declaration ::=
  40899.               with subprogram_specification [is subprogram_default];
  40900.  
  40901.             12.6
  40902.             subprogram_default ::= default_name | <>
  40903.  
  40904.             12.6
  40905.             default_name ::= name
  40906.  
  40907.             12.7
  40908.             formal_package_declaration ::=
  40909.               with package defining_identifier is new
  40910.                generic_package_name formal_package_actual_part;
  40911.  
  40912.             12.7
  40913.             formal_package_actual_part ::= (<>) | [generic_actual_part]
  40914.  
  40915.             13.1
  40916.             representation_clause ::=
  40917.                attribute_definition_clause
  40918.               | enumeration_representation_clause
  40919.               | record_representation_clause
  40920.               | at_clause
  40921.  
  40922.             13.1
  40923.             local_name ::=
  40924.                direct_name
  40925.               | direct_name'attribute_designator
  40926.               | library_unit_name
  40927.  
  40928.             13.3
  40929.             attribute_definition_clause ::=
  40930.                for local_name'attribute_designator use expression;
  40931.               | for local_name'attribute_designator use name;
  40932.  
  40933.             13.4
  40934.             enumeration_representation_clause ::=
  40935.               for first_subtype_local_name use enumeration_aggregate;
  40936.  
  40937.             13.4
  40938.             enumeration_aggregate ::= array_aggregate
  40939.  
  40940.             13.5.1
  40941.             record_representation_clause ::=
  40942.               for first_subtype_local_name use
  40943.                record [mod_clause]
  40944.                  {component_clause}
  40945.                end record;
  40946.  
  40947.             13.5.1
  40948.             component_clause ::=
  40949.               component_local_name at position range first_bit ┬╖┬╖ last_bit;
  40950.  
  40951.             13.5.1
  40952.             position ::= static_expression
  40953.  
  40954.             13.5.1
  40955.             first_bit ::= static_simple_expression
  40956.  
  40957.             13.5.1
  40958.             last_bit ::= static_simple_expression
  40959.  
  40960.             13.8
  40961.             code_statement ::= qualified_expression;
  40962.  
  40963.             13.12
  40964.             restriction ::= restriction_identifier
  40965.               | restriction_parameter_identifier => expression
  40966.  
  40967.             J.3
  40968.             delta_constraint ::= delta static_expression [range_constraint]
  40969.  
  40970.             J.7
  40971.             at_clause ::= for direct_name use at expression;
  40972.  
  40973.             J.8
  40974.             mod_clause ::= at mod static_expression;
  40975.  
  40976.  
  40977.             SYNTAX CROSS REFERENCE
  40978.  
  40979.          2.
  40980.  
  40981.             abort_statement
  40982.               simple_statement            5.1
  40983.  
  40984.             abortable_part
  40985.               asynchronous_select          9.7.4
  40986.  
  40987.             abstract_subprogram_declaration
  40988.               basic_declaration           3.1
  40989.  
  40990.             accept_alternative
  40991.               select_alternative           9.7.1
  40992.  
  40993.             accept_statement
  40994.               accept_alternative           9.7.1
  40995.               compound_statement           5.1
  40996.  
  40997.             access_definition
  40998.               discriminant_specification       3.7
  40999.               parameter_specification        6.1
  41000.  
  41001.             access_type_definition
  41002.               formal_access_type_definition     12.5.4
  41003.               type_definition            3.2.1
  41004.  
  41005.             access_to_object_definition
  41006.               access_type_definition         3.10
  41007.  
  41008.             access_to_subprogram_definition
  41009.               access_type_definition         3.10
  41010.  
  41011.             actual_parameter_part
  41012.               entry_call_statement          9.5.3
  41013.               function_call             6.4
  41014.               procedure_call_statement        6.4
  41015.  
  41016.             aggregate
  41017.               primary                4.4
  41018.               qualified_expression          4.7
  41019.  
  41020.             allocator
  41021.               primary                4.4
  41022.  
  41023.             ancestor_part
  41024.               extension_aggregate          4.3.2
  41025.  
  41026.             array_aggregate
  41027.               aggregate               4.3
  41028.               enumeration_aggregate         13.4
  41029.  
  41030.             array_component_association
  41031.               named_array_aggregate         4.3.3
  41032.  
  41033.             array_type_definition
  41034.               formal_array_type_definition      12.5.3
  41035.               object_declaration           3.3.1
  41036.               type_definition            3.2.1
  41037.  
  41038.             assignment_statement
  41039.               simple_statement            5.1
  41040.  
  41041.             asynchronous_select
  41042.               select_statement            9.7
  41043.  
  41044.             at_clause
  41045.               representation_clause         13.1
  41046.  
  41047.             attribute_definition_clause
  41048.               representation_clause         13.1
  41049.  
  41050.             attribute_designator
  41051.               attribute_definition_clause      13.3
  41052.               attribute_reference          4.1.4
  41053.               local_name               13.1
  41054.  
  41055.             attribute_reference
  41056.               name                  4.1
  41057.  
  41058.             base
  41059.               based_literal             2.4.2
  41060.  
  41061.             based_literal
  41062.               numeric_literal            2.4
  41063.  
  41064.             based_numeral
  41065.               based_literal             2.4.2
  41066.  
  41067.             basic_declaration
  41068.               basic_declarative_item         3.11
  41069.  
  41070.             basic_declarative_item
  41071.               declarative_item            3.11
  41072.               package_specification         7.1
  41073.  
  41074.             binary_adding_operator
  41075.               simple_expression           4.4
  41076.  
  41077.             block_statement
  41078.               compound_statement           5.1
  41079.  
  41080.             body
  41081.               declarative_item            3.11
  41082.  
  41083.             body_stub
  41084.               body                  3.11
  41085.  
  41086.             case_statement
  41087.               compound_statement           5.1
  41088.  
  41089.             case_statement_alternative
  41090.               case_statement             5.4
  41091.  
  41092.             character
  41093.               comment                2.7
  41094.  
  41095.             character_literal
  41096.               defining_character_literal       3.5.1
  41097.               name                  4.1
  41098.               selector_name             4.1.3
  41099.  
  41100.             choice_parameter_specification
  41101.               exception_handler           11.2
  41102.  
  41103.             code_statement
  41104.               simple_statement            5.1
  41105.  
  41106.             compilation_unit
  41107.               compilation              10.1.1
  41108.  
  41109.             component_choice_list
  41110.               record_component_association      4.3.1
  41111.  
  41112.             component_clause
  41113.               record_representation_clause      13.5.1
  41114.  
  41115.             component_declaration
  41116.               component_item             3.8
  41117.               protected_element_declaration     9.4
  41118.  
  41119.             component_definition
  41120.               component_declaration         3.8
  41121.               constrained_array_definition      3.6
  41122.               unconstrained_array_definition     3.6
  41123.  
  41124.             component_item
  41125.               component_list             3.8
  41126.  
  41127.             component_list
  41128.               record_definition           3.8
  41129.               variant                3.8.1
  41130.  
  41131.             composite_constraint
  41132.               constraint               3.2.2
  41133.  
  41134.             compound_statement
  41135.               statement               5.1
  41136.  
  41137.             condition
  41138.               entry_barrier             9.5.2
  41139.               exit_statement             5.7
  41140.               guard                 9.7.1
  41141.               if_statement              5.3
  41142.               iteration_scheme            5.5
  41143.  
  41144.             conditional_entry_call
  41145.               select_statement            9.7
  41146.  
  41147.             constrained_array_definition
  41148.               array_type_definition         3.6
  41149.  
  41150.             constraint
  41151.               subtype_indication           3.2.2
  41152.  
  41153.             context_clause
  41154.               compilation_unit            10.1.1
  41155.  
  41156.             context_item
  41157.               context_clause             10.1.2
  41158.  
  41159.             decimal_fixed_point_definition
  41160.               fixed_point_definition         3.5.9
  41161.  
  41162.             decimal_literal
  41163.               numeric_literal            2.4
  41164.  
  41165.             declarative_item
  41166.               declarative_part            3.11
  41167.  
  41168.             declarative_part
  41169.               block_statement            5.6
  41170.               entry_body               9.5.2
  41171.               package_body              7.2
  41172.               subprogram_body            6.3
  41173.               task_body               9.1
  41174.             default_expression
  41175.               component_declaration         3.8
  41176.               discriminant_specification       3.7
  41177.               formal_object_declaration       12.4
  41178.               parameter_specification        6.1
  41179.  
  41180.             default_name
  41181.               subprogram_default           12.6
  41182.  
  41183.             defining_character_literal
  41184.               enumeration_literal_specification   3.5.1
  41185.  
  41186.             defining_designator
  41187.               generic_instantiation         12.3
  41188.               subprogram_specification        6.1
  41189.  
  41190.             defining_identifier
  41191.               choice_parameter_specification     11.2
  41192.               defining_identifier_list        3.3.1
  41193.               defining_program_unit_name       6.1
  41194.               entry_body               9.5.2
  41195.               entry_declaration           9.5.2
  41196.               entry_index_specification       9.5.2
  41197.               enumeration_literal_specification   3.5.1
  41198.               exception_renaming_declaration     8.5.2
  41199.               formal_package_declaration       12.7
  41200.               formal_type_declaration        12.5
  41201.               full_type_declaration         3.2.1
  41202.               incomplete_type_declaration      3.10.1
  41203.               loop_parameter_specification      5.5
  41204.               object_renaming_declaration      8.5.1
  41205.               package_body_stub           10.1.3
  41206.               private_extension_declaration     7.3
  41207.               private_type_declaration        7.3
  41208.               protected_body             9.4
  41209.               protected_body_stub          10.1.3
  41210.               protected_type_declaration       9.4
  41211.               single_protected_declaration      9.4
  41212.               single_task_declaration        9.1
  41213.               subtype_declaration          3.2.2
  41214.               task_body               9.1
  41215.               task_body_stub             10.1.3
  41216.               task_type_declaration         9.1
  41217.  
  41218.             defining_identifier_list
  41219.               component_declaration         3.8
  41220.               discriminant_specification       3.7
  41221.               exception_declaration         11.1
  41222.               formal_object_declaration       12.4
  41223.               number_declaration           3.3.2
  41224.               object_declaration           3.3.1
  41225.               parameter_specification        6.1
  41226.  
  41227.             defining_operator_symbol
  41228.               defining_designator          6.1
  41229.  
  41230.             defining_program_unit_name
  41231.               defining_designator          6.1
  41232.               generic_instantiation         12.3
  41233.               generic_renaming_declaration      8.5.5
  41234.               package_body              7.2
  41235.               package_renaming_declaration      8.5.3
  41236.               package_specification         7.1
  41237.               subprogram_specification        6.1
  41238.  
  41239.             delay_alternative
  41240.               select_alternative           9.7.1
  41241.               timed_entry_call            9.7.2
  41242.  
  41243.             delay_relative_statement
  41244.               delay_statement            9.6
  41245.  
  41246.             delay_statement
  41247.               delay_alternative           9.7.1
  41248.               simple_statement            5.1
  41249.               triggering_statement          9.7.4
  41250.  
  41251.             delay_until_statement
  41252.               delay_statement            9.6
  41253.  
  41254.             delta_constraint
  41255.               scalar_constraint           3.2.2
  41256.  
  41257.             derived_type_definition
  41258.               type_definition            3.2.1
  41259.  
  41260.             designator
  41261.               subprogram_body            6.3
  41262.  
  41263.             digit
  41264.               extended_digit             2.4.2
  41265.               graphic_character           2.1
  41266.               letter_or_digit            2.3
  41267.               numeral                2.4.1
  41268.  
  41269.             digits_constraint
  41270.               scalar_constraint           3.2.2
  41271.  
  41272.             direct_name
  41273.               accept_statement            9.5.2
  41274.               at_clause               J.7
  41275.               local_name               13.1
  41276.               name                  4.1
  41277.               statement_identifier          5.1
  41278.               variant_part              3.8.1
  41279.  
  41280.             discrete_choice
  41281.               discrete_choice_list          3.8.1
  41282.  
  41283.             discrete_choice_list
  41284.               array_component_association      4.3.3
  41285.               case_statement_alternative       5.4
  41286.               variant                3.8.1
  41287.  
  41288.             discrete_range
  41289.               discrete_choice            3.8.1
  41290.               index_constraint            3.6.1
  41291.               slice                 4.1.2
  41292.  
  41293.             discrete_subtype_definition
  41294.               constrained_array_definition      3.6
  41295.               entry_declaration           9.5.2
  41296.               entry_index_specification       9.5.2
  41297.               loop_parameter_specification      5.5
  41298.  
  41299.             discriminant_association
  41300.               discriminant_constraint        3.7.1
  41301.  
  41302.             discriminant_constraint
  41303.               composite_constraint          3.2.2
  41304.  
  41305.             discriminant_part
  41306.               formal_type_declaration        12.5
  41307.               incomplete_type_declaration      3.10.1
  41308.               private_extension_declaration     7.3
  41309.               private_type_declaration        7.3
  41310.  
  41311.             discriminant_specification
  41312.               known_discriminant_part        3.7
  41313.  
  41314.             entry_barrier
  41315.               entry_body               9.5.2
  41316.  
  41317.             entry_body
  41318.               protected_operation_item        9.4
  41319.  
  41320.             entry_body_formal_part
  41321.               entry_body               9.5.2
  41322.  
  41323.             entry_call_alternative
  41324.               conditional_entry_call         9.7.3
  41325.               timed_entry_call            9.7.2
  41326.  
  41327.             entry_call_statement
  41328.               entry_call_alternative         9.7.2
  41329.               simple_statement            5.1
  41330.               triggering_statement          9.7.4
  41331.  
  41332.             entry_declaration
  41333.               protected_operation_declaration    9.4
  41334.               task_item               9.1
  41335.  
  41336.             entry_index
  41337.               accept_statement            9.5.2
  41338.  
  41339.             entry_index_specification
  41340.               entry_body_formal_part         9.5.2
  41341.  
  41342.             enumeration_aggregate
  41343.               enumeration_representation_clause   13.4
  41344.  
  41345.             enumeration_literal_specification
  41346.               enumeration_type_definition      3.5.1
  41347.  
  41348.             enumeration_representation_clause
  41349.               representation_clause         13.1
  41350.  
  41351.             enumeration_type_definition
  41352.               type_definition            3.2.1
  41353.  
  41354.             exception_choice
  41355.               exception_handler           11.2
  41356.  
  41357.             exception_declaration
  41358.               basic_declaration           3.1
  41359.  
  41360.             exception_handler
  41361.               handled_sequence_of_statements     11.2
  41362.  
  41363.             exception_renaming_declaration
  41364.               renaming_declaration          8.5
  41365.  
  41366.             exit_statement
  41367.               simple_statement            5.1
  41368.  
  41369.             explicit_actual_parameter
  41370.               parameter_association         6.4
  41371.  
  41372.             explicit_dereference
  41373.               name                  4.1
  41374.  
  41375.             explicit_generic_actual_parameter
  41376.               generic_association          12.3
  41377.  
  41378.             exponent
  41379.               based_literal             2.4.2
  41380.               decimal_literal            2.4.1
  41381.  
  41382.             expression
  41383.               ancestor_part             4.3.2
  41384.               array_component_association      4.3.3
  41385.               assignment_statement          5.2
  41386.               at_clause               J.7
  41387.               attribute_definition_clause      13.3
  41388.               attribute_designator          4.1.4
  41389.               case_statement             5.4
  41390.               condition               5.3
  41391.               decimal_fixed_point_definition     3.5.9
  41392.               default_expression           3.7
  41393.               delay_relative_statement        9.6
  41394.               delay_until_statement         9.6
  41395.               delta_constraint            J.3
  41396.               digits_constraint           3.5.9
  41397.               discrete_choice            3.8.1
  41398.               discriminant_association        3.7.1
  41399.               entry_index              9.5.2
  41400.               explicit_actual_parameter       6.4
  41401.               explicit_generic_actual_parameter   12.3
  41402.               floating_point_definition       3.5.7
  41403.               indexed_component           4.1.1
  41404.               mod_clause               J.8
  41405.               modular_type_definition        3.5.4
  41406.               number_declaration           3.3.2
  41407.               object_declaration           3.3.1
  41408.               ordinary_fixed_point_definition    3.5.9
  41409.               position                13.5.1
  41410.               positional_array_aggregate       4.3.3
  41411.               pragma_argument_association      2.8
  41412.               primary                4.4
  41413.               qualified_expression          4.7
  41414.               range_attribute_designator       4.1.4
  41415.               record_component_association      4.3.1
  41416.               restriction              13.12
  41417.               return_statement            6.5
  41418.               type_conversion            4.6
  41419.  
  41420.             extended_digit
  41421.               based_numeral             2.4.2
  41422.  
  41423.             extension_aggregate
  41424.               aggregate               4.3
  41425.  
  41426.             factor
  41427.               term                  4.4
  41428.  
  41429.             first_bit
  41430.               component_clause            13.5.1
  41431.  
  41432.             fixed_point_definition
  41433.               real_type_definition          3.5.6
  41434.  
  41435.             floating_point_definition
  41436.               real_type_definition          3.5.6
  41437.  
  41438.             formal_access_type_definition
  41439.               formal_type_definition         12.5
  41440.  
  41441.             formal_array_type_definition
  41442.               formal_type_definition         12.5
  41443.  
  41444.             formal_decimal_fixed_point_definition
  41445.               formal_type_definition         12.5
  41446.  
  41447.             formal_derived_type_definition
  41448.               formal_type_definition         12.5
  41449.  
  41450.             formal_discrete_type_definition
  41451.               formal_type_definition         12.5
  41452.  
  41453.             formal_floating_point_definition
  41454.               formal_type_definition         12.5
  41455.  
  41456.             formal_modular_type_definition
  41457.               formal_type_definition         12.5
  41458.  
  41459.             formal_object_declaration
  41460.               generic_formal_parameter_declaration  12.1
  41461.  
  41462.             formal_ordinary_fixed_point_definition
  41463.               formal_type_definition         12.5
  41464.  
  41465.             formal_package_actual_part
  41466.               formal_package_declaration       12.7
  41467.  
  41468.             formal_package_declaration
  41469.               generic_formal_parameter_declaration  12.1
  41470.  
  41471.             formal_part
  41472.               parameter_and_result_profile      6.1
  41473.               parameter_profile           6.1
  41474.  
  41475.             formal_private_type_definition
  41476.               formal_type_definition         12.5
  41477.  
  41478.             formal_signed_integer_type_definition
  41479.               formal_type_definition         12.5
  41480.  
  41481.             formal_subprogram_declaration
  41482.               generic_formal_parameter_declaration  12.1
  41483.  
  41484.             formal_type_declaration
  41485.               generic_formal_parameter_declaration  12.1
  41486.  
  41487.             formal_type_definition
  41488.               formal_type_declaration        12.5
  41489.  
  41490.             format_effector
  41491.               character               2.1
  41492.  
  41493.             full_type_declaration
  41494.               type_declaration            3.2.1
  41495.  
  41496.             function_call
  41497.               name                  4.1
  41498.  
  41499.             general_access_modifier
  41500.               access_to_object_definition      3.10
  41501.  
  41502.             generic_actual_part
  41503.               formal_package_actual_part       12.7
  41504.               generic_instantiation         12.3
  41505.  
  41506.             generic_association
  41507.               generic_actual_part          12.3
  41508.  
  41509.             generic_declaration
  41510.               basic_declaration           3.1
  41511.               library_unit_declaration        10.1.1
  41512.  
  41513.             generic_formal_parameter_declaration
  41514.               generic_formal_part          12.1
  41515.  
  41516.             generic_formal_part
  41517.               generic_package_declaration      12.1
  41518.               generic_subprogram_declaration     12.1
  41519.  
  41520.             generic_instantiation
  41521.               basic_declaration           3.1
  41522.               library_unit_declaration        10.1.1
  41523.  
  41524.             generic_package_declaration
  41525.               generic_declaration          12.1
  41526.  
  41527.             generic_renaming_declaration
  41528.               library_unit_renaming_declaration   10.1.1
  41529.               renaming_declaration          8.5
  41530.  
  41531.             generic_subprogram_declaration
  41532.               generic_declaration          12.1
  41533.  
  41534.             goto_statement
  41535.               simple_statement            5.1
  41536.  
  41537.             graphic_character
  41538.               character               2.1
  41539.               character_literal           2.5
  41540.               string_element             2.6
  41541.  
  41542.             guard
  41543.               selective_accept            9.7.1
  41544.  
  41545.             handled_sequence_of_statements
  41546.               accept_statement            9.5.2
  41547.               block_statement            5.6
  41548.               entry_body               9.5.2
  41549.               package_body              7.2
  41550.               subprogram_body            6.3
  41551.               task_body               9.1
  41552.  
  41553.             identifier
  41554.               accept_statement            9.5.2
  41555.               attribute_designator          4.1.4
  41556.               block_statement            5.6
  41557.               defining_identifier          3.1
  41558.               designator               6.1
  41559.               direct_name              4.1
  41560.               entry_body               9.5.2
  41561.               loop_statement             5.5
  41562.               package_body              7.2
  41563.               package_specification         7.1
  41564.               pragma                 2.8
  41565.               pragma_argument_association      2.8
  41566.               protected_body             9.4
  41567.               protected_definition          9.4
  41568.               restriction              13.12
  41569.               selector_name             4.1.3
  41570.               task_body               9.1
  41571.               task_definition            9.1
  41572.  
  41573.             identifier_letter
  41574.               graphic_character           2.1
  41575.               identifier               2.3
  41576.               letter_or_digit            2.3
  41577.  
  41578.             if_statement
  41579.               compound_statement           5.1
  41580.  
  41581.             implicit_dereference
  41582.               prefix                 4.1
  41583.  
  41584.             incomplete_type_declaration
  41585.               type_declaration            3.2.1
  41586.  
  41587.             index_constraint
  41588.               composite_constraint          3.2.2
  41589.  
  41590.             index_subtype_definition
  41591.               unconstrained_array_definition     3.6
  41592.  
  41593.             indexed_component
  41594.               name                  4.1
  41595.  
  41596.             integer_type_definition
  41597.               type_definition            3.2.1
  41598.  
  41599.             iteration_scheme
  41600.               loop_statement             5.5
  41601.  
  41602.             known_discriminant_part
  41603.               discriminant_part           3.7
  41604.               full_type_declaration         3.2.1
  41605.               protected_type_declaration       9.4
  41606.               task_type_declaration         9.1
  41607.  
  41608.             label
  41609.               statement               5.1
  41610.  
  41611.             last_bit
  41612.               component_clause            13.5.1
  41613.  
  41614.             letter_or_digit
  41615.               identifier               2.3
  41616.  
  41617.             library_item
  41618.               compilation_unit            10.1.1
  41619.  
  41620.             library_unit_body
  41621.               library_item              10.1.1
  41622.  
  41623.             library_unit_declaration
  41624.               library_item              10.1.1
  41625.  
  41626.             library_unit_renaming_declaration
  41627.               library_item              10.1.1
  41628.  
  41629.             local_name
  41630.               attribute_definition_clause      13.3
  41631.               component_clause            13.5.1
  41632.               enumeration_representation_clause   13.4
  41633.               record_representation_clause      13.5.1
  41634.  
  41635.             loop_parameter_specification
  41636.               iteration_scheme            5.5
  41637.  
  41638.             loop_statement
  41639.               compound_statement           5.1
  41640.  
  41641.             mod_clause
  41642.               record_representation_clause      13.5.1
  41643.  
  41644.             mode
  41645.               formal_object_declaration       12.4
  41646.               parameter_specification        6.1
  41647.  
  41648.             modular_type_definition
  41649.               integer_type_definition        3.5.4
  41650.  
  41651.             multiplying_operator
  41652.               term                  4.4
  41653.  
  41654.             name
  41655.               abort_statement            9.8
  41656.               assignment_statement          5.2
  41657.               attribute_definition_clause      13.3
  41658.               default_name              12.6
  41659.               entry_call_statement          9.5.3
  41660.               exception_choice            11.2
  41661.               exception_renaming_declaration     8.5.2
  41662.               exit_statement             5.7
  41663.               explicit_actual_parameter       6.4
  41664.               explicit_dereference          4.1
  41665.               explicit_generic_actual_parameter   12.3
  41666.               formal_package_declaration       12.7
  41667.               function_call             6.4
  41668.               generic_instantiation         12.3
  41669.               generic_renaming_declaration      8.5.5
  41670.               goto_statement             5.8
  41671.               implicit_dereference          4.1
  41672.               local_name               13.1
  41673.               object_renaming_declaration      8.5.1
  41674.               package_renaming_declaration      8.5.3
  41675.               parent_unit_name            10.1.1
  41676.               pragma_argument_association      2.8
  41677.               prefix                 4.1
  41678.               primary                4.4
  41679.               procedure_call_statement        6.4
  41680.               raise_statement            11.3
  41681.               requeue_statement           9.5.4
  41682.               subprogram_renaming_declaration    8.5.4
  41683.               subtype_mark              3.2.2
  41684.               type_conversion            4.6
  41685.               use_package_clause           8.4
  41686.               with_clause              10.1.2
  41687.  
  41688.             named_array_aggregate
  41689.               array_aggregate            4.3.3
  41690.  
  41691.             null_statement
  41692.               simple_statement            5.1
  41693.  
  41694.             number_declaration
  41695.               basic_declaration           3.1
  41696.  
  41697.             numeral
  41698.               base                  2.4.2
  41699.               decimal_literal            2.4.1
  41700.               exponent                2.4.1
  41701.  
  41702.             numeric_literal
  41703.               primary                4.4
  41704.  
  41705.             object_declaration
  41706.               basic_declaration           3.1
  41707.  
  41708.             object_renaming_declaration
  41709.               renaming_declaration          8.5
  41710.  
  41711.             operator_symbol
  41712.               defining_operator_symbol        6.1
  41713.               designator               6.1
  41714.               direct_name              4.1
  41715.               selector_name             4.1.3
  41716.  
  41717.             ordinary_fixed_point_definition
  41718.               fixed_point_definition         3.5.9
  41719.  
  41720.             other_control_function
  41721.               character               2.1
  41722.  
  41723.             package_body
  41724.               library_unit_body           10.1.1
  41725.               proper_body              3.11
  41726.  
  41727.             package_body_stub
  41728.               body_stub               10.1.3
  41729.  
  41730.             package_declaration
  41731.               basic_declaration           3.1
  41732.               library_unit_declaration        10.1.1
  41733.  
  41734.             package_renaming_declaration
  41735.               library_unit_renaming_declaration   10.1.1
  41736.               renaming_declaration          8.5
  41737.  
  41738.             package_specification
  41739.               generic_package_declaration      12.1
  41740.               package_declaration          7.1
  41741.  
  41742.             parameter_and_result_profile
  41743.               access_to_subprogram_definition    3.10
  41744.               subprogram_specification        6.1
  41745.  
  41746.             parameter_association
  41747.               actual_parameter_part         6.4
  41748.  
  41749.             parameter_profile
  41750.               accept_statement            9.5.2
  41751.               access_to_subprogram_definition    3.10
  41752.               entry_body_formal_part         9.5.2
  41753.               entry_declaration           9.5.2
  41754.               subprogram_specification        6.1
  41755.  
  41756.             parameter_specification
  41757.               formal_part              6.1
  41758.  
  41759.             parent_unit_name
  41760.               defining_program_unit_name       6.1
  41761.               designator               6.1
  41762.               package_body              7.2
  41763.               package_specification         7.1
  41764.               subunit                10.1.3
  41765.  
  41766.             position
  41767.               component_clause            13.5.1
  41768.  
  41769.             positional_array_aggregate
  41770.               array_aggregate            4.3.3
  41771.  
  41772.             pragma_argument_association
  41773.               pragma                 2.8
  41774.  
  41775.             prefix
  41776.               attribute_reference          4.1.4
  41777.               function_call             6.4
  41778.               indexed_component           4.1.1
  41779.               procedure_call_statement        6.4
  41780.               range_attribute_reference       4.1.4
  41781.               selected_component           4.1.3
  41782.               slice                 4.1.2
  41783.  
  41784.             primary
  41785.               factor                 4.4
  41786.  
  41787.             private_extension_declaration
  41788.               type_declaration            3.2.1
  41789.  
  41790.             private_type_declaration
  41791.               type_declaration            3.2.1
  41792.  
  41793.             procedure_call_statement
  41794.               simple_statement            5.1
  41795.  
  41796.             proper_body
  41797.               body                  3.11
  41798.               subunit                10.1.3
  41799.  
  41800.             protected_body
  41801.               proper_body              3.11
  41802.  
  41803.             protected_body_stub
  41804.               body_stub               10.1.3
  41805.  
  41806.             protected_definition
  41807.               protected_type_declaration       9.4
  41808.               single_protected_declaration      9.4
  41809.  
  41810.             protected_element_declaration
  41811.               protected_definition          9.4
  41812.  
  41813.             protected_operation_declaration
  41814.               protected_definition          9.4
  41815.               protected_element_declaration     9.4
  41816.  
  41817.             protected_operation_item
  41818.               protected_body             9.4
  41819.  
  41820.             protected_type_declaration
  41821.               full_type_declaration         3.2.1
  41822.  
  41823.             qualified_expression
  41824.               allocator               4.8
  41825.               code_statement             13.8
  41826.               primary                4.4
  41827.  
  41828.             raise_statement
  41829.               simple_statement            5.1
  41830.  
  41831.             range
  41832.               discrete_range             3.6.1
  41833.               discrete_subtype_definition      3.6
  41834.               range_constraint            3.5
  41835.               relation                4.4
  41836.  
  41837.             range_attribute_designator
  41838.               range_attribute_reference       4.1.4
  41839.  
  41840.             range_attribute_reference
  41841.               range                 3.5
  41842.  
  41843.             range_constraint
  41844.               delta_constraint            J.3
  41845.               digits_constraint           3.5.9
  41846.               scalar_constraint           3.2.2
  41847.  
  41848.             real_range_specification
  41849.               decimal_fixed_point_definition     3.5.9
  41850.               floating_point_definition       3.5.7
  41851.               ordinary_fixed_point_definition    3.5.9
  41852.  
  41853.             real_type_definition
  41854.               type_definition            3.2.1
  41855.  
  41856.             record_aggregate
  41857.               aggregate               4.3
  41858.  
  41859.             record_component_association
  41860.               record_component_association_list   4.3.1
  41861.  
  41862.             record_component_association_list
  41863.               extension_aggregate          4.3.2
  41864.               record_aggregate            4.3.1
  41865.  
  41866.             record_definition
  41867.               record_extension_part         3.9.1
  41868.               record_type_definition         3.8
  41869.  
  41870.             record_extension_part
  41871.               derived_type_definition        3.4
  41872.  
  41873.             record_representation_clause
  41874.               representation_clause         13.1
  41875.  
  41876.             record_type_definition
  41877.               type_definition            3.2.1
  41878.  
  41879.             relation
  41880.               expression               4.4
  41881.  
  41882.             relational_operator
  41883.               relation                4.4
  41884.  
  41885.             renaming_declaration
  41886.               basic_declaration           3.1
  41887.  
  41888.             representation_clause
  41889.               basic_declarative_item         3.11
  41890.               component_item             3.8
  41891.               protected_operation_declaration    9.4
  41892.               protected_operation_item        9.4
  41893.               task_item               9.1
  41894.  
  41895.             requeue_statement
  41896.               simple_statement            5.1
  41897.  
  41898.             return_statement
  41899.               simple_statement            5.1
  41900.  
  41901.             scalar_constraint
  41902.               constraint               3.2.2
  41903.  
  41904.             select_alternative
  41905.               selective_accept            9.7.1
  41906.  
  41907.             select_statement
  41908.               compound_statement           5.1
  41909.  
  41910.             selected_component
  41911.               name                  4.1
  41912.  
  41913.             selective_accept
  41914.               select_statement            9.7
  41915.  
  41916.             selector_name
  41917.               component_choice_list         4.3.1
  41918.               discriminant_association        3.7.1
  41919.               generic_association          12.3
  41920.               parameter_association         6.4
  41921.               selected_component           4.1.3
  41922.  
  41923.             sequence_of_statements
  41924.               abortable_part             9.7.4
  41925.               accept_alternative           9.7.1
  41926.               case_statement_alternative       5.4
  41927.               conditional_entry_call         9.7.3
  41928.               delay_alternative           9.7.1
  41929.               entry_call_alternative         9.7.2
  41930.               exception_handler           11.2
  41931.               handled_sequence_of_statements     11.2
  41932.               if_statement              5.3
  41933.               loop_statement             5.5
  41934.               selective_accept            9.7.1
  41935.               triggering_alternative         9.7.4
  41936.  
  41937.             signed_integer_type_definition
  41938.               integer_type_definition        3.5.4
  41939.  
  41940.             simple_expression
  41941.               first_bit               13.5.1
  41942.               last_bit                13.5.1
  41943.               range                 3.5
  41944.               real_range_specification        3.5.7
  41945.               relation                4.4
  41946.               signed_integer_type_definition     3.5.4
  41947.  
  41948.             simple_statement
  41949.               statement               5.1
  41950.  
  41951.             single_protected_declaration
  41952.               object_declaration           3.3.1
  41953.  
  41954.             single_task_declaration
  41955.               object_declaration           3.3.1
  41956.  
  41957.             slice
  41958.               name                  4.1
  41959.  
  41960.             space_character
  41961.               graphic_character           2.1
  41962.  
  41963.             special_character
  41964.               graphic_character           2.1
  41965.  
  41966.             statement
  41967.               sequence_of_statements         5.1
  41968.  
  41969.             statement_identifier
  41970.               block_statement            5.6
  41971.               label                 5.1
  41972.               loop_statement             5.5
  41973.             string_element
  41974.               string_literal             2.6
  41975.  
  41976.             string_literal
  41977.               operator_symbol            6.1
  41978.               primary                4.4
  41979.  
  41980.             subprogram_body
  41981.               library_unit_body           10.1.1
  41982.               proper_body              3.11
  41983.               protected_operation_item        9.4
  41984.  
  41985.             subprogram_body_stub
  41986.               body_stub               10.1.3
  41987.  
  41988.             subprogram_declaration
  41989.               basic_declaration           3.1
  41990.               library_unit_declaration        10.1.1
  41991.               protected_operation_declaration    9.4
  41992.               protected_operation_item        9.4
  41993.  
  41994.             subprogram_default
  41995.               formal_subprogram_declaration     12.6
  41996.  
  41997.             subprogram_renaming_declaration
  41998.               library_unit_renaming_declaration   10.1.1
  41999.               renaming_declaration          8.5
  42000.  
  42001.             subprogram_specification
  42002.               abstract_subprogram_declaration    6.1
  42003.               formal_subprogram_declaration     12.6
  42004.               generic_subprogram_declaration     12.1
  42005.               subprogram_body            6.3
  42006.               subprogram_body_stub          10.1.3
  42007.               subprogram_declaration         6.1
  42008.               subprogram_renaming_declaration    8.5.4
  42009.  
  42010.             subtype_declaration
  42011.               basic_declaration           3.1
  42012.  
  42013.             subtype_indication
  42014.               access_to_object_definition      3.10
  42015.               allocator               4.8
  42016.               component_definition          3.6
  42017.               derived_type_definition        3.4
  42018.               discrete_range             3.6.1
  42019.               discrete_subtype_definition      3.6
  42020.               object_declaration           3.3.1
  42021.               private_extension_declaration     7.3
  42022.               subtype_declaration          3.2.2
  42023.  
  42024.             subtype_mark
  42025.               access_definition           3.10
  42026.               ancestor_part             4.3.2
  42027.               discriminant_specification       3.7
  42028.               explicit_generic_actual_parameter   12.3
  42029.               formal_derived_type_definition     12.5.1
  42030.               formal_object_declaration       12.4
  42031.               index_subtype_definition        3.6
  42032.               object_renaming_declaration      8.5.1
  42033.               parameter_and_result_profile      6.1
  42034.               parameter_specification        6.1
  42035.               qualified_expression          4.7
  42036.               relation                4.4
  42037.               subtype_indication           3.2.2
  42038.               type_conversion            4.6
  42039.               use_type_clause            8.4
  42040.  
  42041.             subunit
  42042.               compilation_unit            10.1.1
  42043.  
  42044.             task_body
  42045.               proper_body              3.11
  42046.  
  42047.             task_body_stub
  42048.               body_stub               10.1.3
  42049.  
  42050.             task_definition
  42051.               single_task_declaration        9.1
  42052.               task_type_declaration         9.1
  42053.  
  42054.             task_item
  42055.               task_definition            9.1
  42056.  
  42057.             task_type_declaration
  42058.               full_type_declaration         3.2.1
  42059.  
  42060.             term
  42061.               simple_expression           4.4
  42062.  
  42063.             terminate_alternative
  42064.               select_alternative           9.7.1
  42065.  
  42066.             timed_entry_call
  42067.               select_statement            9.7
  42068.  
  42069.             triggering_alternative
  42070.               asynchronous_select          9.7.4
  42071.  
  42072.             triggering_statement
  42073.               triggering_alternative         9.7.4
  42074.  
  42075.             type_conversion
  42076.               name                  4.1
  42077.  
  42078.             type_declaration
  42079.               basic_declaration           3.1
  42080.  
  42081.             type_definition
  42082.               full_type_declaration         3.2.1
  42083.  
  42084.             unary_adding_operator
  42085.               simple_expression           4.4
  42086.  
  42087.             unconstrained_array_definition
  42088.               array_type_definition         3.6
  42089.  
  42090.             underline
  42091.               based_numeral             2.4.2
  42092.               identifier               2.3
  42093.               numeral                2.4.1
  42094.  
  42095.             unknown_discriminant_part
  42096.               discriminant_part           3.7
  42097.  
  42098.             use_clause
  42099.               basic_declarative_item         3.11
  42100.               context_item              10.1.2
  42101.               generic_formal_part          12.1
  42102.  
  42103.             use_package_clause
  42104.               use_clause               8.4
  42105.  
  42106.             use_type_clause
  42107.               use_clause               8.4
  42108.  
  42109.             variant
  42110.               variant_part              3.8.1
  42111.  
  42112.             variant_part
  42113.               component_list             3.8
  42114.  
  42115.             with_clause
  42116.               context_item              10.1.2
  42117.  
  42118.  
  42119. ΓòÉΓòÉΓòÉ 30.1. Index ΓòÉΓòÉΓòÉ
  42120.  
  42121.                       Index entries are given by paragraph number. A list of all
  42122.                       language-defined library units may be found under Language-Defined
  42123.                       Library Units. A list of all language-defined types may be found under
  42124.                       Language-Defined Types.
  42125.  
  42126.  Index.Operators               Index.Operators 
  42127.  Index.Digits                  Index.Digits 
  42128.  Index.A                       Index.A 
  42129.  Index.B                       Index.B 
  42130.  Index.C                       Index.C 
  42131.  Index.D                       Index.D 
  42132.  Index.E                       Index.E 
  42133.  Index.F                       Index.F 
  42134.  Index.G                       Index.G 
  42135.  Index.H                       Index.H 
  42136.  Index.I                       Index.I 
  42137.  Index.J                       Index.J 
  42138.  Index.K                       Index.K 
  42139.  Index.L                       Index.L 
  42140.  Index.M                       Index.M 
  42141.  Index.N                       Index.N 
  42142.  Index.O                       Index.O 
  42143.  Index.P                       Index.P 
  42144.  Index.Q                       Index.Q 
  42145.  Index.R                       Index.R 
  42146.  Index.S                       Index.S 
  42147.  Index.T                       Index.T 
  42148.  Index.U                       Index.U 
  42149.  Index.V                       Index.V 
  42150.  Index.W                       Index.W 
  42151.  Index.X                       Index.X 
  42152.  Index.Y                       Index.Y 
  42153.  
  42154.  
  42155. ΓòÉΓòÉΓòÉ 30.2. Operator index ΓòÉΓòÉΓòÉ
  42156.  
  42157.   &  operator   4.4(1), 4.5.3(1), 4.5.3(3)
  42158.  
  42159.   *  operator   4.4(1), 4.5.5(1), 4.5.5(1)
  42160.   ** operator   4.4(1), 4.5.6(1), 4.5.6(7)
  42161.  
  42162.   +  operator   4.4(1), 4.5.3(1), 4.5.4(1), see 4.5.3(1), see 4.5.4(1)
  42163.  
  42164.   =  operator   4.4(1), 4.5.2(1), 4.5.2(1)
  42165.  
  42166.   -  operator   4.4(1), 4.5.3(1), 4.5.4(1), see 4.5.3(1), see 4.5.4(1)
  42167.  
  42168.   /  operator   4.4(1), 4.5.5(1), 4.5.5(1)
  42169.   /= operator   4.4(1), 4.5.2(1), 4.5.2(1)
  42170.  
  42171.   <  operator   4.4(1), 4.5.2(1), 4.5.2(1)
  42172.   <= operator   4.4(1), 4.5.2(1), 4.5.2(1)
  42173.  
  42174.   >  operator   4.4(1), 4.5.2(1), 4.5.2(1)
  42175.   >= operator   4.4(1), 4.5.2(1), 4.5.2(1)
  42176.  
  42177.  
  42178. ΓòÉΓòÉΓòÉ 30.3. Digits index ΓòÉΓòÉΓòÉ
  42179.  
  42180.   10646-1:1993, ISO/IEC standard   1.2(8).
  42181.   1539:1991,   ISO/IEC standard   1.2(3).
  42182.   1989:1985,   ISO standard     1.2(4).
  42183.  
  42184.   6429:1992,   ISO/IEC standard   1.2(5).
  42185.   646:1991,   ISO/IEC standard   1.2(2).
  42186.  
  42187.   8859-1:1987,  ISO/IEC standard   1.2(6).
  42188.  
  42189.   9899:1990,   ISO/IEC standard   1.2(7).
  42190.  
  42191.  
  42192. ΓòÉΓòÉΓòÉ 31. index ΓòÉΓòÉΓòÉ
  42193.  
  42194.   A_Form   4.6.
  42195.   abnormal completion   7.6.1.
  42196.   abnormal state of an object   13.9.1.
  42197.     [partial]   9.8(21), see 11.6(6), see A.13(21), see 11.6(6), see A.13(17).
  42198.   abnormal task   9.8.
  42199.   abort
  42200.     of a partition   E.1.
  42201.     of a task   9.8.
  42202.     of the execution of a construct   9.8.
  42203.   abort completion point   9.8.
  42204.   abort-deferred operation   9.8.
  42205.   abort_statement   9.8.
  42206.     used   5.1(4), see P(4), see P(1).
  42207.   Abort_Task   C.7.1.
  42208.   abortable_part   9.7.4.
  42209.     used   9.7.4(2), see P(2), see P(1).
  42210.   abs operator   4.4(1), see 4.5.6(1), see 4.5.6(1).
  42211.   absolute value   4.4(1), see 4.5.6(1), see 4.5.6(1).
  42212.   abstract data type (ADT)
  42213.     See also abstract type   3.9.3.
  42214.     See private types and private extensions   7.3.
  42215.   abstract subprogram   3.9.3(1), see 3.9.3(1), see 3.9.3(3).
  42216.   abstract type   3.9.3(1), see 3.9.3(1), see 3.9.3(2).
  42217.   abstract_subprogram_declaration   6.1.
  42218.     used   3.1(3), see P(3), see P(1).
  42219.   Acc   13.11.
  42220.   accept_alternative   9.7.1.
  42221.     used   9.7.1(4), see P(4), see P(1).
  42222.   accept_statement   9.5.2.
  42223.     used   5.1(5), see 9.7.1(5), see P(5), see 9.7.1(5), see P(1).
  42224.   acceptable interpretation   8.6.
  42225.   Access attribute   3.10.2(24), see 3.10.2(24), see 3.10.2(32),
  42226.             K(2),     K(2),     K(4).
  42227.     See also Unchecked_Access attribute   13.10.
  42228.   access discriminant   3.7.
  42229.   access parameter   6.1.
  42230.   access paths
  42231.     distinct   6.2.
  42232.   access type   3.10(1), see N(1), see N(2).
  42233.   access types
  42234.     input-output unspecified   A.7.
  42235.   access value   3.10.
  42236.   access-to-constant type   3.10.
  42237.   access-to-object type   3.10.
  42238.   access-to-subprogram type   3.10(7), see 3.10(7), see 3.10(11).
  42239.   access-to-variable type   3.10.
  42240.   Access_Check   11.5.
  42241.     [partial]   4.1(13), see 4.6(13), see 4.6(49).
  42242.   access_definition   3.10.
  42243.     used   3.7(5), see 6.1(15), see P(5), see 6.1(15), see P(1).
  42244.   access_type_definition   3.10.
  42245.     used   3.2.1(4), see 12.5.4(2), see P(4), see 12.5.4(2), see P(1).
  42246.   access_to_object_definition   3.10.
  42247.     used   3.10(2), see P(2), see P(1).
  42248.   access_to_subprogram_definition   3.10.
  42249.     used   3.10(2), see P(2), see P(1).
  42250.   accessibility
  42251.     from shared passive library units   E.2.1.
  42252.   accessibility level   3.10.2.
  42253.   accessibility rule
  42254.     Access attribute   3.10.2(28), see 3.10.2(28), see 3.10.2(32).
  42255.     record extension   3.9.1.
  42256.     requeue statement   9.5.4.
  42257.     type conversion   4.6(17), see 4.6(17), see 4.6(20).
  42258.   Accessibility_Check   11.5.
  42259.     [partial]   3.10.2(29), see 4.6(48), see 6.5(29), see 4.6(48), see 6.5(17),
  42260.           E.4.
  42261.   accessible partition   E.1.
  42262.   accuracy   4.6(32), see G.2(32), see G.2(1).
  42263.   ACK   A.3.3(5), see J.5(5), see J.5(4).
  42264.   acquire
  42265.     execution resource associated with protected object
  42266.        9.5.1.
  42267.   Activate   6.4.
  42268.   activation
  42269.     of a task   9.2.
  42270.   activation failure   9.2.
  42271.   activator
  42272.     of a task   9.2.
  42273.   active partition   10.2(28), see E.1(28), see E.1(2).
  42274.   active priority   D.1.
  42275.   actual   12.3.
  42276.   actual duration   D.9.
  42277.   actual parameter
  42278.     for a formal parameter   6.4.1.
  42279.   actual subtype   3.3(23), see 12.5(23), see 12.5(4).
  42280.     of an object   3.3.1.
  42281.   actual type   12.5.
  42282.   actual_parameter_part   6.4.
  42283.     used   6.4(2), see 6.4(3), see 9.5.3(2), see P(2), see 6.4(3), see 9.5.3(2), see P(1).
  42284.   Acute   A.3.3.
  42285.   Ada   A.2.
  42286.   Ada calling convention   6.3.1.
  42287.   Ada.Asynchronous_Task_Control   D.11.
  42288.   Ada.Calendar   9.6.
  42289.   Ada.Characters   A.3.1.
  42290.   Ada.Characters.Handling   A.3.2.
  42291.   Ada.Characters.Latin_1   A.3.3.
  42292.   Ada.Command_Line   A.15.
  42293.   Ada.Decimal   F.2.
  42294.   Ada.Direct_IO   A.8.4.
  42295.   Ada.Dynamic_Priorities   D.5.
  42296.   Ada.Exceptions   11.4.1.
  42297.   Ada.Finalization   7.6.
  42298.   Ada.Float_Text_IO   A.10.9.
  42299.   Ada.Float_Wide_Text_IO   A.11.
  42300.   Ada.Integer_Text_IO   A.10.8.
  42301.   Ada.Integer_Wide_Text_IO   A.11.
  42302.   Ada.Interrupts   C.3.2.
  42303.   Ada.Interrupts.Names   C.3.2.
  42304.   Ada.Numerics   A.5.
  42305.   Ada.Numerics.Complex_Elementary_Functions   G.1.2.
  42306.   Ada.Numerics.Complex_Types   G.1.1.
  42307.   Ada.Numerics.Discrete_Random   A.5.2.
  42308.   Ada.Numerics.Elementary_Functions   A.5.1.
  42309.   Ada.Numerics.Float_Random   A.5.2.
  42310.   Ada.Numerics.Generic_Complex_Elementary_Functions   G.1.2.
  42311.   Ada.Numerics.Generic_Complex_Types   G.1.1.
  42312.   Ada.Numerics.Generic_Elementary_Functions   A.5.1.
  42313.   Ada.Real_Time   D.8.
  42314.   Ada.Sequential_IO   A.8.1.
  42315.   Ada.Storage_IO   A.9.
  42316.   Ada.Streams   13.13.1.
  42317.   Ada.Streams.Stream_IO   A.12.1.
  42318.   Ada.Strings   A.4.1.
  42319.   Ada.Strings.Bounded   A.4.4.
  42320.   Ada.Strings.Fixed   A.4.3.
  42321.   Ada.Strings.Maps   A.4.2.
  42322.   Ada.Strings.Maps.Constants   A.4.6.
  42323.   Ada.Strings.Unbounded   A.4.5.
  42324.   Ada.Strings.Wide_Bounded   A.4.7.
  42325.   Ada.Strings.Wide_Fixed   A.4.7.
  42326.   Ada.Strings.Wide_Maps   A.4.7.
  42327.   Ada.Strings.Wide_Maps.Wide_Constants   A.4.7.
  42328.   Ada.Strings.Wide_Unbounded   A.4.7.
  42329.   Ada.Synchronous_Task_Control   D.10.
  42330.   Ada.Tags   3.9.
  42331.   Ada.Task_Attributes   C.7.2.
  42332.   Ada.Task_Identification   C.7.1.
  42333.   Ada.Text_IO   A.10.1.
  42334.   Ada.Text_IO.Complex_IO   G.1.3.
  42335.   Ada.Text_IO.Editing   F.3.3.
  42336.   Ada.Text_IO.Text_Streams   A.12.2.
  42337.   Ada.Unchecked_Conversion   13.9.
  42338.   Ada.Unchecked_Deallocation   13.11.2.
  42339.   Ada.Wide_Text_IO   A.11.
  42340.   Ada.Wide_Text_IO.Complex_IO   G.1.4.
  42341.   Ada.Wide_Text_IO.Editing   F.3.4.
  42342.   Ada.Wide_Text_IO.Text_Streams   A.12.3.
  42343.   Ada.IO_Exceptions   A.13.
  42344.   Ada_Application   B.5.
  42345.   Ada_Employee_Record_Type   B.4.
  42346.   Addition   3.9.1.
  42347.   Address   13.7.
  42348.     arithmetic   13.7.1.
  42349.     comparison   13.7.
  42350.     null   13.7.
  42351.   Address attribute   13.3(11), see J.7.1(5), see K(11), see J.7.1(5), see K(6).
  42352.   Address clause   13.3(7), see 13.3(7), see 13.3(12).
  42353.   Address_To_Access_Conversions
  42354.     child of System   13.7.2.
  42355.   Adjacent attribute   A.5.3(48), see K(48), see K(8).
  42356.   Adjust   7.6(2), see 7.6(2), see 7.6(6).
  42357.   adjusting the value of an object   7.6(15), see 7.6(15), see 7.6(16).
  42358.   adjustment   7.6(15), see 7.6(15), see 7.6(16).
  42359.     as part of assignment   5.2.
  42360.   Adjustments_Conversions   B.4.
  42361.   Adjustments_Type   B.4.
  42362.   ADT (abstract data type)
  42363.     See also abstract type   3.9.3.
  42364.     See private types and private extensions   7.3.
  42365.   advice   1.1.2.
  42366.   Aft attribute   3.5.10(5), see K(5), see K(12).
  42367.   aggregate   4.3(1), see 4.3(1), see 4.3(2).
  42368.     used   4.4(7), see 4.7(2), see P(7), see 4.7(2), see P(1).
  42369.     See also composite type   3.2.
  42370.   aliased   3.10(9), see N(9), see N(3).
  42371.   aliasing
  42372.     See distinct access paths   6.2.
  42373.   Alignment   A.4.1.
  42374.   Alignment attribute   13.3(23), see K(23), see K(14).
  42375.   Alignment clause   13.3(7), see 13.3(7), see 13.3(25).
  42376.   All_Calls_Remote pragma   E.2.3(5), see L(5), see L(2).
  42377.   All_Checks   11.5.
  42378.   Allocate   13.11.
  42379.   allocator   4.8.
  42380.     used   4.4(7), see P(7), see P(1).
  42381.   Alphanumeric   B.4.
  42382.   alphanumeric character
  42383.     a category of Character   A.3.2.
  42384.   Alphanumeric_Set   A.4.6.
  42385.   ambiguous   8.6.
  42386.   ampersand 2.1(15), see A.3.3(8)
  42387.   ampersand operator   4.4(1), see 4.5.3(1), see 4.5.3(3).
  42388.   ancestor
  42389.     of a library unit   10.1.1.
  42390.     of a type   3.4.1.
  42391.     ultimate   3.4.1.
  42392.   ancestor subtype
  42393.     of a private_extension_declaration   7.3.
  42394.     of a formal derived type   12.5.1.
  42395.   ancestor_part   4.3.2.
  42396.     used   4.3.2(2), see P(2), see P(1).
  42397.   and operator   4.4(1), see 4.5.1(1), see 4.5.1(2).
  42398.   and then (short-circuit control form)   4.4,
  42399.                        4.5.1.
  42400.   Angle   12.5.
  42401.   angle threshold   G.2.4.
  42402.   Annex
  42403.     informative   1.1.2.
  42404.     normative   1.1.2.
  42405.     Specialized Needs   1.1.2.
  42406.   anonymous access type   3.10.
  42407.   anonymous array type   3.3.1.
  42408.   anonymous protected type   3.3.1.
  42409.   anonymous task type   3.3.1.
  42410.   anonymous type   3.2.1.
  42411.   Any_Priority   13.7(16), see D.1(16), see D.1(10).
  42412.   APC   A.3.3.
  42413.   apostrophe   2.1(15), see A.3.3(15), see A.3.3(8).
  42414.   Append   A.4.4(13), see A.4.4(14), see A.4.4(13), see A.4.4(14), see A.4.4(15),
  42415.        A.4.4(16), see A.4.4(17), see A.4.4(16), see A.4.4(17), see A.4.4(18),
  42416.        A.4.4(19), see A.4.4(20), see A.4.5(19), see A.4.4(20), see A.4.5(12),
  42417.        A.4.5(13), see A.4.5(13), see A.4.5(14).
  42418.   applicable index constraint   4.3.3.
  42419.   application areas   1.1.2.
  42420.   apply
  42421.     to a loop_statement by an exit_statement   5.7.
  42422.     to a callable construct by a return_statement   6.5.
  42423.     to a program unit by a program unit pragma   10.1.5.
  42424.   arbitrary order   1.1.4.
  42425.   Arccos   A.5.1(6), see G.1.2(6), see G.1.2(5).
  42426.   Arccosh   A.5.1(7), see G.1.2(7), see G.1.2(7).
  42427.   Arccot   A.5.1(6), see G.1.2(6), see G.1.2(5).
  42428.   Arccoth   A.5.1(7), see G.1.2(7), see G.1.2(7).
  42429.   Arcsin A.5.1(6), see G.1.2(5)
  42430.   Arcsinh   A.5.1(7), see G.1.2(7), see G.1.2(7).
  42431.   Arctan   A.5.1(6), see G.1.2(6), see G.1.2(5).
  42432.   Arctanh   A.5.1(7), see G.1.2(7), see G.1.2(7).
  42433.   Argument   A.15(5), see G.1.1(5), see G.1.1(10).
  42434.   argument of a pragma   2.8.
  42435.   Argument_Count   A.15.
  42436.   Argument_Error   A.5.
  42437.   array   3.6.
  42438.   array component expression   4.3.3.
  42439.   array indexing
  42440.     See indexed_component   4.1.1.
  42441.   array slice   4.1.2.
  42442.   array type   3.6(1), see N(1), see N(4).
  42443.   array_aggregate   4.3.3.
  42444.     used   4.3(2), see 13.4(3), see P(2), see 13.4(3), see P(1).
  42445.   array_component_association   4.3.3.
  42446.     used   4.3.3(4), see P(4), see P(1).
  42447.   array_type_definition   3.6.
  42448.     used   3.2.1(4), see 3.3.1(2), see 12.5.3(4), see 3.3.1(2), see 12.5.3(2),
  42449.         P.
  42450.   ASCII   A.1(36), see J.5(36), see J.5(2).
  42451.     package physically nested within the declaration of Standard
  42452.        A.1.
  42453.   aspect of representation   13.1.
  42454.     coding   13.4.
  42455.     controlled   13.11.3.
  42456.     convention, calling convention   B.1.
  42457.     exported   B.1.
  42458.     imported   B.1.
  42459.     layout   13.5.
  42460.     packing   13.2.
  42461.     record layout   13.5.
  42462.     specifiable attributes   13.3.
  42463.     storage place   13.5.
  42464.   assembly language   C.1.
  42465.   assign
  42466.     See assignment operation   5.2.
  42467.   assigning back of parameters   6.4.1.
  42468.   assignment
  42469.     user-defined   7.6.
  42470.   assignment operation   5.2(3), see 5.2(12), see 7.6(3), see 5.2(12), see 7.6(13).
  42471.     during elaboration of an object_declaration   3.3.1.
  42472.     during evaluation of a generic_association for a formal object
  42473.      of mode in 12.4(11)
  42474.     during evaluation of a parameter_association   6.4.1.
  42475.     during evaluation of an aggregate   4.3.
  42476.     during evaluation of an initialized allocator   4.8.
  42477.     during evaluation of an uninitialized allocator   4.8,
  42478.        4.8.
  42479.     during evaluation of concatenation   4.5.3.
  42480.     during execution of a for loop   5.5.
  42481.     during execution of a return_statement   6.5.
  42482.     during execution of an assignment_statement   5.2.
  42483.     during parameter copy back   6.4.1.
  42484.   assignment_statement   5.2.
  42485.     used   5.1(4), see P(4), see P(1).
  42486.   associated components
  42487.     of a record_component_association   4.3.1.
  42488.   associated discriminants
  42489.     of a named discriminant_association   3.7.1.
  42490.     of a positional discriminant_association   3.7.1.
  42491.   associated object
  42492.     of a value of a by-reference type   6.2.
  42493.   asterisk   2.1(15), see A.3.3(15), see A.3.3(8).
  42494.   asynchronous
  42495.     remote procedure call   E.4.1.
  42496.   Asynchronous pragma   E.4.1(3), see L(3), see L(3).
  42497.   asynchronous remote procedure call   E.4.
  42498.   asynchronous_select   9.7.4.
  42499.     used   9.7(2), see P(2), see P(1).
  42500.   Asynchronous_Task_Control
  42501.     child of Ada   D.11.
  42502.   at-most-once execution   E.4.
  42503.   at_clause   J.7.
  42504.     used   13.1(2), see P(2), see P(1).
  42505.   atomic   C.6.
  42506.   Atomic pragma   C.6(3), see L(3), see L(4).
  42507.   Atomic_Components pragma   C.6(5), see L(5), see L(5).
  42508.   Attach_Handler   C.3.2.
  42509.   Attach_Handler pragma   C.3.1, L(6)
  42510.   attaching
  42511.     to an interrupt   C.3.
  42512.   attribute   4.1.4(1), see C.7.2(2), see K(1), see C.7.2(2), see K(1).
  42513.     representation   13.3.
  42514.     specifiable   13.3.
  42515.     specifying   13.3.
  42516.   attribute_definition_clause   13.3.
  42517.     used   13.1(2), see P(2), see P(1).
  42518.   attribute_designator   4.1.4.
  42519.     used   4.1.4(2), see 13.1(3), see 13.3(2), see 13.1(3), see 13.3(2),
  42520.         P.
  42521.   Attribute_Handle   C.7.2.
  42522.   attribute_reference   4.1.4.
  42523.     used   4.1(2), see P(2), see P(1).
  42524.   attributes
  42525.     Access   3.10.2(24), see 3.10.2(32), see K(24), see 3.10.2(32), see K(2),
  42526.          K.
  42527.     Address   13.3(11), see J.7.1(5), see K(11), see J.7.1(5), see K(6).
  42528.     Adjacent   A.5.3(48), see K(48), see K(8).
  42529.     Aft   3.5.10(5), see K(5), see K(12).
  42530.     Alignment   13.3(23), see K(23), see K(14).
  42531.     Base   3.5(15), see K(15), see K(17).
  42532.     Bit_Order   13.5.3(4), see K(4), see K(19).
  42533.     Body_Version   E.3(4), see K(4), see K(21).
  42534.     Callable   9.9(2), see K(2), see K(23).
  42535.     Caller   C.7.1(14), see K(14), see K(25).
  42536.     Ceiling   A.5.3(33), see K(33), see K(27).
  42537.     Class   3.9(14), see 7.3.1(9), see K(14), see 7.3.1(9), see K(31),
  42538.         K.
  42539.     Component_Size   13.3(69), see K(69), see K(36).
  42540.     Compose   A.5.3(24), see K(24), see K(38).
  42541.     Constrained   3.7.2(3), see J.4(2), see K(3), see J.4(2), see K(42).
  42542.     Copy_Sign   A.5.3(51), see K(51), see K(44).
  42543.     Count   9.9(5), see K(5), see K(48).
  42544.     Definite   12.5.1(23), see K(23), see K(50).
  42545.     Delta   3.5.10(3), see K(3), see K(52).
  42546.     Denorm   A.5.3(9), see K(9), see K(54).
  42547.     Digits   3.5.8(2), see 3.5.10(7), see K(2), see 3.5.10(7), see K(56),
  42548.          K.
  42549.     Exponent   A.5.3(18), see K(18), see K(60).
  42550.     External_Tag   13.3(75), see K(75), see K(64).
  42551.     First   3.5(12), see 3.6.2(3), see K(12), see 3.6.2(3), see K(68),
  42552.         K.
  42553.     First(N)   3.6.2(4), see K(4), see K(66).
  42554.     First_Bit   13.5.2(3), see K(3), see K(72).
  42555.     Floor   A.5.3(30), see K(30), see K(74).
  42556.     Fore   3.5.10(4), see K(4), see K(78).
  42557.     Fraction   A.5.3(21), see K(21), see K(80).
  42558.     Identity   11.4.1(9), see C.7.1(12), see K(9), see C.7.1(12), see K(84),
  42559.           K.
  42560.     Image   3.5(35), see K(35), see K(88).
  42561.     Input   13.13.2(22), see 13.13.2(32), see K(22), see 13.13.2(32), see K(92),
  42562.         K.
  42563.     Last   3.5(13), see 3.6.2(5), see K(13), see 3.6.2(5), see K(102),
  42564.         K.
  42565.     Last(N)   3.6.2(6), see K(6), see K(100).
  42566.     Last_Bit   13.5.2(4), see K(4), see K(106).
  42567.     Leading_Part   A.5.3(54), see K(54), see K(108).
  42568.     Length   3.6.2(9), see K(9), see K(117).
  42569.     Length(N)   3.6.2(10), see K(10), see K(115).
  42570.     Machine   A.5.3(60), see K(60), see K(119).
  42571.     Machine_Emax   A.5.3(8), see K(8), see K(123).
  42572.     Machine_Emin A.5.3(7), see K(125)
  42573.     Machine_Mantissa   A.5.3(6), see K(6), see K(127).
  42574.     Machine_Overflows   A.5.3(12), see A.5.4(12), see A.5.4(4),
  42575.               K(129),   K(129),   K(131).
  42576.     Machine_Radix   A.5.3(2), see A.5.4(2), see K(2), see A.5.4(2), see K(133),
  42577.             K.
  42578.     Machine_Rounds   A.5.3(11), see A.5.4(11), see A.5.4(3),
  42579.              K(137),   K(137),   K(139).
  42580.     Max   3.5(19), see K(19), see K(141).
  42581.     Max_Size_In_Storage_Elements   13.11.1(3), see K(3), see K(145).
  42582.     Min 3.5(16), see K(147)
  42583.     Model   A.5.3(68), see G.2.2(7), see K(68), see G.2.2(7), see K(151).
  42584.     Model_Emin A.5.3(65), see G.2.2(4), see K(155)
  42585.     Model_Epsilon   A.5.3(66), see K(66), see K(157).
  42586.     Model_Mantissa   A.5.3(64), see G.2.2(3), see K(64), see G.2.2(3), see K(159).
  42587.     Model_Small   A.5.3(67), see K(67), see K(161).
  42588.     Modulus   3.5.4(17), see K(17), see K(163).
  42589.     Output   13.13.2(19), see 13.13.2(29), see K(19), see 13.13.2(29), see K(165),
  42590.          K.
  42591.     Partition_ID   E.1(9), see K(9), see K(173).
  42592.     Pos   3.5.5(2), see K(2), see K(175).
  42593.     Position   13.5.2(2), see K(2), see K(179).
  42594.     Pred   3.5(25), see K(25), see K(181).
  42595.     Range   3.5(14), see 3.6.2(7), see K(14), see 3.6.2(7), see K(187),
  42596.         K.
  42597.     Range(N)   3.6.2(8), see K(8), see K(185).
  42598.     Read   13.13.2(6), see 13.13.2(14), see K(6), see 13.13.2(14), see K(191),
  42599.         K.
  42600.     Remainder   A.5.3(45), see K(45), see K(199).
  42601.     Round   3.5.10(12), see K(12), see K(203).
  42602.     Rounding   A.5.3(36), see K(36), see K(207).
  42603.     Safe_First   A.5.3(71), see G.2.2(5), see K(71), see G.2.2(5), see K(211).
  42604.     Safe_Last   A.5.3(72), see G.2.2(6), see K(72), see G.2.2(6), see K(213).
  42605.     Scale   3.5.10(11), see K(11), see K(215).
  42606.     Scaling   A.5.3(27), see K(27), see K(217).
  42607.     Signed_Zeros   A.5.3(13), see K(13), see K(221).
  42608.     Size   13.3(40), see 13.3(45), see K(40), see 13.3(45), see K(223),
  42609.         K.
  42610.     Small   3.5.10(2), see K(2), see K(230).
  42611.     Storage_Pool   13.11(13), see K(13), see K(232).
  42612.     Storage_Size   13.3(60), see 13.11(14), see J.9(60), see 13.11(14), see J.9(2),
  42613.             K(234), see K(234), see K(236).
  42614.     Succ   3.5(22), see K(22), see K(238).
  42615.     Tag   3.9(16), see 3.9(18), see K(16), see 3.9(18), see K(242),
  42616.        K.
  42617.     Terminated   9.9(3), see K(3), see K(246).
  42618.     Truncation   A.5.3(42), see K(42), see K(248).
  42619.     Unbiased_Rounding   A.5.3(39), see K(39), see K(252).
  42620.     Unchecked_Access   13.10(3), see H.4(18), see K(3), see H.4(18), see K(256).
  42621.     Val   3.5.5(5), see K(5), see K(258).
  42622.     Valid   13.9.2(3), see H(6), see K(3), see H(6), see K(262).
  42623.     Value   3.5(52), see K(52), see K(264).
  42624.     Version   E.3(3), see K(3), see K(268).
  42625.     Wide_Image   3.5(28), see K(28), see K(270).
  42626.     Wide_Value   3.5(40), see K(40), see K(274).
  42627.     Wide_Width   3.5(38), see K(38), see K(278).
  42628.     Width   3.5(39), see K(39), see K(280).
  42629.     Write   13.13.2(3), see 13.13.2(11), see K(3), see 13.13.2(11), see K(282),
  42630.         K.
  42631.  
  42632.  
  42633. ΓòÉΓòÉΓòÉ 32. index ΓòÉΓòÉΓòÉ
  42634.  
  42635.   Backus-Naur Form (BNF)
  42636.     complete listing   P.
  42637.     cross reference   P.
  42638.     notation   1.1.4.
  42639.     under Syntax heading   1.1.2.
  42640.   base   2.4.2(3), see 2.4.2(3), see 2.4.2(6).
  42641.   base 16 literal   2.4.2.
  42642.     used   2.4.2(2), see P(2), see P(1).
  42643.   base 2 literal   2.4.2.
  42644.   base 8 literal   2.4.2.
  42645.   Base attribute   3.5(15), see K(15), see K(17).
  42646.   base decimal precision
  42647.     of a floating point type   3.5.7(9), see 3.5.7(9), see 3.5.7(10).
  42648.   base priority   D.1.
  42649.   base range
  42650.     of a decimal fixed point type   3.5.9.
  42651.     of a fixed point type   3.5.9.
  42652.     of a floating point type   3.5.7(8), see 3.5.7(8), see 3.5.7(10).
  42653.     of a modular type   3.5.4.
  42654.     of a scalar type   3.5.
  42655.     of a signed integer type   3.5.4.
  42656.     of an ordinary fixed point type   3.5.9.
  42657.   base subtype
  42658.     of a type   3.5.
  42659.   based_literal   2.4.2.
  42660.     used   2.4(2), see P(2), see P(1).
  42661.   based_numeral   2.4.2.
  42662.     used   2.4.2(2), see P(2), see P(1).
  42663.   basic letter
  42664.     a category of Character   A.3.2.
  42665.   basic_declaration   3.1.
  42666.     used   3.11(4), see P(4), see P(1).
  42667.   basic_declarative_item   3.11.
  42668.     used   3.11(3), see 7.1(3), see P(3), see 7.1(3), see P(1).
  42669.   Basic_Map   A.4.6.
  42670.   Basic_Set   A.4.6.
  42671.   become nonlimited   7.3.1(5), see 7.5(5), see 7.5(16).
  42672.   BEL   A.3.3.
  42673.   belong
  42674.     to a range   3.5.
  42675.     to a subtype   3.2.
  42676.   Bias   12.2.
  42677.   bibliography   1.2.
  42678.   big endian   13.5.3.
  42679.   binary   B.4.
  42680.     literal   2.4.2.
  42681.   binary adding operator   4.5.3.
  42682.   binary literal   2.4.2.
  42683.   binary operator   4.5.
  42684.   binary_adding_operator   4.5.
  42685.     used   4.4(4), see P(4), see P(1).
  42686.   Binary_Format   B.4.
  42687.   Binary_Operation   3.9.1.
  42688.   Binop_Ptr   3.10.
  42689.   bit field
  42690.     See record_representation_clause   13.5.1.
  42691.   bit ordering   13.5.3.
  42692.   bit string
  42693.     See logical operators on boolean arrays   4.5.1.
  42694.   Bit_Order   13.7.
  42695.   Bit_Order attribute   13.5.3(4), see K(4), see K(19).
  42696.   Bit_Order clause   13.3(7), see 13.5.3(7), see 13.5.3(4).
  42697.   Bit_Vector   3.6.
  42698.   blank
  42699.     in text input for enumeration and numeric types  A.10.6.
  42700.   block_statement   5.6.
  42701.     used   5.1(5), see P(5), see P(1).
  42702.   blocked
  42703.     [partial]   D.2.1.
  42704.     a task state   9.
  42705.     during an entry call   9.5.3.
  42706.     execution of a selective_accept   9.7.1.
  42707.     on a delay_statement   9.6.
  42708.     on an accept_statement   9.5.2.
  42709.     waiting for activations to complete   9.2.
  42710.     waiting for dependents to terminate   9.3.
  42711.   blocked interrupt   C.3.
  42712.   blocking, potentially  .see 9.5.1(8)
  42713.     Abort_Task   C.7.1.
  42714.     delay_statement   9.6(34), see D.9(34), see D.9(5).
  42715.     remote subprogram call   E.4.
  42716.     RPC operations   E.5.
  42717.     Suspend_Until_True   D.10.
  42718.   BMP   3.5.2(2), see 3.5.2(2), see 3.5.2(3).
  42719.   BNF (Backus-Naur Form)
  42720.     complete listing   P.
  42721.     cross reference   P.
  42722.     notation   1.1.4.
  42723.     under Syntax heading   1.1.2.
  42724.   body   3.11.
  42725.     used   3.11(3), see P(3), see P(1).
  42726.   body_stub   10.1.3.
  42727.     used   3.11(5), see P(5), see P(1).
  42728.   Body_Version attribute   E.3(4), see K(4), see K(21).
  42729.   Boolean   3.5.3(1), see A.1(1), see A.1(5).
  42730.   boolean type   3.5.3.
  42731.   Bounded
  42732.     child of Ada.Strings   A.4.4.
  42733.   bounded error   1.1.2(31),   1.1.5(8),  6.2(31),   1.1.5(8),  6.2(12),
  42734.            7.6.1(14),   9.5.1(8),  9.8(14),   9.5.1(8),  9.8(20),
  42735.            10.2(26),   13.9.1(26),   13.9.1(9),
  42736.            13.11.2(11), see C.7.1(17), see D.5(11), see C.7.1(17), see D.5(11),
  42737.            E.1(10),    E.3(6),   J.7.1(10),    E.3(6),   J.7.1(11).
  42738.   Bounded_String   A.4.4.
  42739.   bounds
  42740.     of a discrete_range   3.6.1.
  42741.     of an array   3.6.
  42742.     of the index range of an array_aggregate   4.3.3.
  42743.   box
  42744.     compound delimiter   3.6.
  42745.   broadcast signal
  42746.     See protected object   9.4.
  42747.     See requeue   9.5.4.
  42748.   Broken_Bar   A.3.3.
  42749.   BS   A.3.3(5), see J.5(5), see J.5(4).
  42750.   Buffer   3.7(33), see 9.11(8), see 9.11(33), see 9.11(8), see 9.11(9),
  42751.        12.5.
  42752.   Buffer_Size   3.5.4(35), see A.9(35), see A.9(4).
  42753.   Buffer_Type   A.9.
  42754.   by copy parameter passing   6.2.
  42755.   by reference parameter passing   6.2.
  42756.   by-copy type   6.2.
  42757.   by-reference type   6.2.
  42758.     atomic or volatile   C.6.
  42759.   Byte   3.5.4(36), see 13.3(80), see B.4(36), see 13.3(80), see B.4(29).
  42760.     See storage element   13.3.
  42761.   byte sex
  42762.     See ordering of storage elements in a word   13.5.3.
  42763.   Byte_Array   B.4.
  42764.   Byte_Mask   13.5.1.
  42765.  
  42766.  
  42767. ΓòÉΓòÉΓòÉ 33. index ΓòÉΓòÉΓòÉ
  42768.  
  42769.   C  4.3.3(42), see B.3(77), see B.3.2(42), see B.3(77), see B.3.2(46).
  42770.     child of Interfaces   B.3.
  42771.   C interface   B.3.
  42772.   C standard   1.2.
  42773.   C_float   B.3.
  42774.   Calendar   J.1.
  42775.     child of Ada   9.6.
  42776.   call   6.
  42777.   call on a dispatching operation   3.9.2.
  42778.   callable   9.9.
  42779.   Callable attribute   9.9(2), see K(2), see K(23).
  42780.   callable construct   6.
  42781.   callable entity   6.
  42782.   called partition   E.4.
  42783.   Caller attribute   C.7.1(14), see K(14), see K(25).
  42784.   calling convention   6.3.1(2), see B.1(2), see B.1(11).
  42785.     Ada   6.3.1.
  42786.     associated with a designated profile   3.10.
  42787.     entry   6.3.1.
  42788.     Intrinsic   6.3.1.
  42789.     protected   6.3.1.
  42790.   calling partition   E.4.
  42791.   calling stub   E.4.
  42792.   CAN   A.3.3(6), see J.5(6), see J.5(4).
  42793.   cancellation
  42794.     of a delay_statement   9.6.
  42795.     of an entry call   9.5.3.
  42796.   cancellation of a remote subprogram call   E.4.
  42797.   canonical form   A.5.3.
  42798.   canonical semantics   11.6.
  42799.   canonical-form representation   A.5.3.
  42800.   Car   3.10.1(19), see 3.10.1(21), see 12.5.4(19), see 3.10.1(21), see 12.5.4(10),
  42801.      12.5.4.
  42802.   Car_Name   3.10.1(20), see 12.5.4(20), see 12.5.4(10).
  42803.   case insensitive   2.3.
  42804.   case_statement   5.4.
  42805.     used   5.1(5), see P(5), see P(1).
  42806.   case_statement_alternative   5.4.
  42807.     used   5.4(2), see P(2), see P(1).
  42808.   cast
  42809.     See type conversion   4.6.
  42810.     See unchecked type conversion   13.9.
  42811.   catch (an exception)
  42812.     See handle   11.
  42813.   categorization pragma   E.2.
  42814.     Remote_Call_Interface   E.2.3.
  42815.     Remote_Types   E.2.2.
  42816.     Shared_Passive   E.2.1.
  42817.   categorized library unit   E.2.
  42818.   catenation operator
  42819.     See concatenation operator   4.4(1), see 4.5.3(1), see 4.5.3(3).
  42820.   CCH   A.3.3.
  42821.   Cedilla   A.3.3.
  42822.   Ceiling attribute   A.5.3(33), see K(33), see K(27).
  42823.   ceiling priority
  42824.     of a protected object   D.3.
  42825.   Ceiling_Check
  42826.     [partial]   C.3.1(11), see D.3(11), see D.3(13).
  42827.   Cell   3.10.1(15), see 3.10.1(15), see 3.10.1(16).
  42828.   Cent_Sign   A.3.3.
  42829.   change of representation   13.6.
  42830.   char   B.3.
  42831.   char_array   B.3.
  42832.   CHAR_BIT   B.3.
  42833.   Char_Ptrs   B.3.2.
  42834.   Char_Star   B.3.2.
  42835.   Char_IO   A.10.10.
  42836.   character   2.1(2), see 3.5.2(2), see A.1(2), see 3.5.2(2), see A.1(35).
  42837.     used   2.7(2), see P(2), see P(1).
  42838.   character set   2.1.
  42839.   character set standard
  42840.     16-bit   1.2.
  42841.     7-bit   1.2.
  42842.     8-bit   1.2.
  42843.     control functions   1.2.
  42844.   character type   3.5.2(1), see N(1), see N(5).
  42845.   character_literal   2.5.
  42846.     used   3.5.1(4), see 4.1(2), see 4.1.3(4), see 4.1(2), see 4.1.3(3),
  42847.         P.
  42848.   Character_Mapping   A.4.2.
  42849.   Character_Mapping_Function   A.4.2.
  42850.   Character_Range   A.4.2.
  42851.   Character_Ranges   A.4.2.
  42852.   Character_Sequence   A.4.2.
  42853.   Character_Set   A.4.2(4), see A.4.7(46), see B.5(4), see A.4.7(46), see B.5(11).
  42854.   characteristics   7.3.
  42855.   Characters
  42856.     child of Ada   A.3.1.
  42857.   chars_ptr   B.3.1.
  42858.   check
  42859.     language-defined   11.5(2), see 11.6(2), see 11.6(1).
  42860.   check, language-defined
  42861.     Access_Check   4.1(13), see 4.6(13), see 4.6(49).
  42862.     Accessibility_Check   3.10.2(29), see 4.6(29), see 4.6(48),
  42863.        6.5(17), see E.4(17), see E.4(18).
  42864.     Ceiling_Check   C.3.1(11), see D.3(11), see D.3(13).
  42865.     Discriminant_Check   4.1.3(15), see 4.3(15), see 4.3(6),
  42866.                4.3.2(8),  4.6(8),  4.6(43),
  42867.                4.6(45),   4.6(45),   4.6(51),
  42868.                4.6(52),   4.7(52),   4.7(4),
  42869.                4.8.
  42870.     Division_Check   3.5.4(20), see 4.5.5(20), see 4.5.5(22),
  42871.              A.5.1(28), see A.5.3(28), see A.5.3(47),
  42872.              G.1.1(40), see G.1.2(40), see G.1.2(28),
  42873.              K.
  42874.     Elaboration_Check   3.11.
  42875.     Index_Check   4.1.1(7),  4.1.2(7), see 4.3.3(7),  4.1.2(7), see 4.3.3(29),
  42876.            4.3.3(30), see 4.5.3(8), see 4.6(30), see 4.5.3(8), see 4.6(51),
  42877.            4.7(4),   4.8(4),   4.8(10).
  42878.     Length_Check   4.5.1(8), see 4.6(37), see 4.6(8), see 4.6(37), see 4.6(52).
  42879.     Overflow_Check   3.5.4(20), see 4.4(20), see 4.4(11),
  42880.              5.4(13),   G.2.1(13),   G.2.1(11),
  42881.              G.2.2(7),  G.2.3(7),  G.2.3(25),
  42882.              G.2.4(2),  G.2.6(2),  G.2.6(3).
  42883.     Partition_Check  E.4(19)
  42884.     Range_Check   3.2.2(11), see 3.5(11), see 3.5(24),
  42885.            3.5(27),   3.5(27),   3.5(43),
  42886.            3.5(44),   3.5(44),   3.5(51),
  42887.            3.5(55),   3.5.5(55),   3.5.5(7),
  42888.            3.5.9(19), see 4.2(19), see 4.2(11),
  42889.            4.3.3(28), see 4.5.1(28), see 4.5.1(8),
  42890.            4.5.6(6),  4.5.6(6),  4.5.6(13),
  42891.            4.6(28),   4.6(28),   4.6(38),
  42892.            4.6(46),   4.6(46),   4.6(51),
  42893.            4.7(4),   13.13.2(4),   13.13.2(35),
  42894.            A.5.2(39), see A.5.2(39), see A.5.2(40),
  42895.            A.5.3(26), see A.5.3(26), see A.5.3(29),
  42896.            A.5.3(50), see A.5.3(50), see A.5.3(53),
  42897.            A.5.3(59), see A.5.3(59), see A.5.3(62),
  42898.            K(11),    K(11),    K(41),
  42899.            K(47),    K(47),    K(114),
  42900.            K(122),   K(122),   K(184),
  42901.            K(220),   K(220),   K(241).
  42902.     Reserved_Check   C.3.1.
  42903.     Storage_Check   11.1(6),   13.3(6),   13.3(67),
  42904.             13.11(17), see D.7(17), see D.7(15).
  42905.     Tag_Check   3.9.2(16), see 4.6(42), see 4.6(16), see 4.6(42), see 4.6(52),
  42906.           5.2(10),   6.5(10),   6.5(9).
  42907.   child
  42908.     of a library unit   10.1.1.
  42909.   choice parameter   11.2.
  42910.   choice_parameter_specification   11.2.
  42911.     used   11.2(3), see P(3), see P(1).
  42912.   Circumflex   A.3.3.
  42913.   class   N.
  42914.     See also package   7.
  42915.     See also tag   3.9.
  42916.     of types   3.2.
  42917.   Class attribute   3.9(14), see 7.3.1(9), see K(14), see 7.3.1(9), see K(31),
  42918.             K.
  42919.   class determined for a formal type   12.5.
  42920.   class-wide type   3.4.1(4), see 3.7(4), see 3.7(26).
  42921.   cleanup
  42922.     See finalization   7.6.1.
  42923.   clock   9.6(6), see 9.6(12), see D.8(6), see 9.6(12), see D.8(7).
  42924.   clock jump   D.8.
  42925.   clock tick   D.8.
  42926.   Close   7.5(19),  7.5(20),   A.8.1(19),  7.5(20),   A.8.1(8),
  42927.        A.8.4(8), see A.10.1(11), see A.12.1(8), see A.10.1(11), see A.12.1(10).
  42928.   close result set   G.2.3.
  42929.   closed entry   9.5.3.
  42930.     of a protected object   9.5.3.
  42931.     of a task   9.5.3.
  42932.   closed under derivation   3.4(28), see N(6), see N(28), see N(6), see N(41).
  42933.   closure
  42934.     downward   3.10.2.
  42935.   COBOL   B.4(104), see B.4(104), see B.4(113).
  42936.     child of Interfaces   B.4.
  42937.   COBOL interface   B.4.
  42938.   COBOL standard   1.2.
  42939.   COBOL_Character   B.4.
  42940.   COBOL_Employee_Record_Type   B.4.
  42941.   COBOL_Employee_IO   B.4.
  42942.   COBOL_Record   B.4.
  42943.   Code   4.7.
  42944.   code_statement   13.8.
  42945.     used   5.1(4), see P(4), see P(1).
  42946.   coding
  42947.     aspect of representation   13.4.
  42948.   Coefficient   3.5.7.
  42949.   Coin A.5.2(58)
  42950.   Col   A.10.1.
  42951.   colon   2.1(15), see A.3.3(10), see J.5(15), see A.3.3(10), see J.5(6).
  42952.   Color   3.2.1(15), see 3.5.1(15), see 3.5.1(14).
  42953.   Column   3.2.1.
  42954.   column number   A.10.
  42955.   Column_Ptr   3.5.4.
  42956.   comma   2.1(15), see A.3.3(15), see A.3.3(8).
  42957.   Command_Line
  42958.     child of Ada   A.15.
  42959.   Command_Name   A.15.
  42960.   comment   2.7.
  42961.   comments, instructions for submission   Introduction.
  42962.   Commercial_At   A.3.3.
  42963.   Communication_Error   E.5.
  42964.   comparison operator
  42965.     See relational operator   4.5.2.
  42966.   compatibility
  42967.     composite_constraint with an access subtype   3.10.
  42968.     constraint with a subtype   3.2.2.
  42969.     delta_constraint with an ordinary fixed point subtype
  42970.        J.3.
  42971.     digits_constraint with a decimal fixed point subtype
  42972.        3.5.9.
  42973.     digits_constraint with a floating point subtype   J.3.
  42974.     discriminant constraint with a subtype   3.7.1.
  42975.     index constraint with a subtype   3.6.1.
  42976.     range with a scalar subtype   3.5.
  42977.     range_constraint with a scalar subtype   3.5.
  42978.   compatible
  42979.     a type, with a convention   B.1.
  42980.   compilation   10.1.1.
  42981.     separate   10.1.
  42982.   Compilation unit   10.1(2), see 10.1.1(9), see N(2), see 10.1.1(9), see N(7).
  42983.   compilation units needed
  42984.     by a compilation unit   10.2.
  42985.     remote call interface   E.2.3.
  42986.     shared passive library unit   E.2.1.
  42987.   compilation_unit   10.1.1.
  42988.     used   10.1.1(2), see P(2), see P(1).
  42989.   compile-time error   1.1.2(27), see 1.1.5(27), see 1.1.5(4).
  42990.   compile-time semantics   1.1.2.
  42991.   complete context   8.6.
  42992.   completely defined   3.11.1.
  42993.   completion
  42994.     abnormal   7.6.1.
  42995.     compile-time concept   3.11.1.
  42996.     normal   7.6.1.
  42997.     run-time concept   7.6.1.
  42998.   completion and leaving (completed and left)   7.6.1.
  42999.   completion legality
  43000.     entry_body   9.5.2.
  43001.      [partial]   3.10.1.
  43002.   Complex   3.8(28), see B.5(9), see G.1.1(28), see B.5(9), see G.1.1(3).
  43003.   Complex_Elementary_Functions
  43004.     child of Ada.Numerics   G.1.2.
  43005.   Complex_Types
  43006.     child of Ada.Numerics   G.1.1.
  43007.   Complex_IO
  43008.     child of Ada.Text_IO   G.1.3.
  43009.     child of Ada.Wide_Text_IO   G.1.4.
  43010.   component   3.2(2), see 9.4(31), see 9.4(2), see 9.4(31), see 9.4(32).
  43011.   component subtype   3.6.
  43012.   component_choice_list   4.3.1.
  43013.     used   4.3.1(4), see P(4), see P(1).
  43014.   component_clause   13.5.1.
  43015.     used   13.5.1(2), see P(2), see P(1).
  43016.   component_declaration   3.8.
  43017.     used   3.8(5), see 9.4(6), see P(5), see 9.4(6), see P(1).
  43018.   component_definition   3.6.
  43019.     used   3.6(3), see 3.6(5), see 3.8(6), see P(3), see 3.6(5), see 3.8(6), see P(1).
  43020.   component_item   3.8.
  43021.     used   3.8(4), see P(4), see P(1).
  43022.   component_list   3.8.
  43023.     used   3.8(3), see 3.8.1(3), see P(3), see 3.8.1(3), see P(1).
  43024.   Component_Size attribute   13.3(69), see K(69), see K(36).
  43025.   Component_Size clause   13.3(7), see 13.3(7), see 13.3(70).
  43026.   components
  43027.     of a record type   3.8.
  43028.   Compose attribute   A.5.3(24), see K(24), see K(38).
  43029.   Compose_From_Cartesian   G.1.1.
  43030.   Compose_From_Polar   G.1.1.
  43031.   composite type   3.2(2), see N(2), see N(8).
  43032.   composite_constraint   3.2.2.
  43033.     used   3.2.2(5), see P(5), see P(1).
  43034.   compound delimiter   2.2.
  43035.   compound_statement   5.1.
  43036.     used   5.1(3), see P(3), see P(1).
  43037.   concatenation operator   4.4(1), see 4.5.3(1), see 4.5.3(3).
  43038.   concrete subprogram
  43039.     See nonabstract subprogram   3.9.3.
  43040.   concrete type
  43041.     See nonabstract type   3.9.3.
  43042.   concurrent processing
  43043.     See task   9.
  43044.   condition   5.3.
  43045.     used   5.3(2),   5.5(3),   5.7(2),   5.5(3),   5.7(2),
  43046.         9.5.2(7), see 9.7.1(3), see P(7), see 9.7.1(3), see P(1).
  43047.     See also exception   11.
  43048.   conditional_entry_call   9.7.3.
  43049.     used   9.7(2), see P(2), see P(1).
  43050.   configuration
  43051.     of the partitions of a program   E.
  43052.   configuration pragma   10.1.5.
  43053.     Locking_Policy   D.3.
  43054.     Normalize_Scalars   H.1.
  43055.     Queuing_Policy   D.4.
  43056.     Restrictions   13.12.
  43057.     Reviewable   H.3.1.
  43058.     Suppress   11.5.
  43059.     Task_Dispatching_Policy   D.2.2.
  43060.   conformance   6.3.1.
  43061.     of an implementation with the Standard   1.1.3.
  43062.     See also  full conformance, mode conformance,
  43063.      subtype conformance, type conformance
  43064.   Conjugate   G.1.1(12), see G.1.1(12), see G.1.1(15).
  43065.   consistency
  43066.     among compilation units   10.1.4.
  43067.   constant   3.3.
  43068.     See also literal   4.2.
  43069.     See also static   4.9.
  43070.     result of a function_call   6.4.
  43071.   constant object   3.3.
  43072.   constant view   3.3.
  43073.   Constants
  43074.     child of Ada.Strings.Maps   A.4.6.
  43075.   constituent
  43076.     of a construct   1.1.4.
  43077.   constrained   3.2.
  43078.     object   3.3.1(9), see 3.10(9), see 6.4.1(9), see 3.10(9), see 6.4.1(16).
  43079.     subtype   3.2(9),   3.4(6),   3.5(9),   3.4(6),   3.5(7),
  43080.          3.5.1(10), see 3.5.4(9),  3.5.4(10), see 3.5.4(9),  3.5.4(10),
  43081.          3.5.7(11), see 3.5.9(13), see 3.5.9(11), see 3.5.9(13), see 3.5.9(16),
  43082.          3.6(15),   3.6(16),   3.7(15),   3.6(16),   3.7(26),
  43083.          3.9(15),   3.10(14),  K(15),   3.10(14),  K(33).
  43084.   Constrained attribute   3.7.2(3), see J.4(2), see K(3), see J.4(2), see K(42).
  43085.   constrained by its initial value   3.3.1(9), see 3.10(9), see 3.10(9).
  43086.     [partial]   4.8.
  43087.   constrained_array_definition   3.6.
  43088.     used   3.6(2), see P(2), see P(1).
  43089.   constraint   3.2.2.
  43090.     used   3.2.2(3), see P(3), see P(1).
  43091.     [partial]   3.2.
  43092.     of a first array subtype   3.6.
  43093.     of an object   3.3.1.
  43094.   Constraint_Error   A.1.
  43095.     raised by failure of run-time check
  43096.        3.2.2(12),  3.5(24),   3.5(12),  3.5(24),   3.5(27),
  43097.        3.5(43),   3.5(44),   3.5(43),   3.5(44),   3.5(51),
  43098.        3.5(55),   3.5.4(20), see 3.5.5(55),   3.5.4(20), see 3.5.5(7),
  43099.        3.5.9(19),  3.9.2(16), see 4.1(19),  3.9.2(16), see 4.1(13),
  43100.        4.1.1(7),   4.1.2(7),  4.1.3(7),   4.1.2(7),  4.1.3(15),
  43101.        4.2(11),   4.3(6),   4.3.2(11),   4.3(6),   4.3.2(8),
  43102.        4.3.3(31),  4.4(11),   4.5(31),  4.4(11),   4.5(10),
  43103.        4.5(11),   4.5(12),   4.5.1(11),   4.5(12),   4.5.1(8),
  43104.        4.5.3(8),   4.5.5(22), see 4.5.6(8),   4.5.5(22), see 4.5.6(6),
  43105.        4.5.6(12),  4.5.6(13), see 4.6(12),  4.5.6(13), see 4.6(28),
  43106.        4.6(57),   4.6(60),   4.7(57),   4.6(60),   4.7(4),
  43107.        4.8(10),   5.2(10),   5.4(10),   5.2(10),   5.4(13),
  43108.        6.5(9),    11.1(4),   11.4.1(9),    11.1(4),   11.4.1(14),
  43109.        11.5(10),   13.9.1(9), see 13.13.2(10),   13.9.1(9), see 13.13.2(35),
  43110.        A.4.3(109), see A.4.7(47), see A.5.1(109), see A.4.7(47), see A.5.1(28),
  43111.        A.5.1(34),  A.5.2(39), see A.5.2(34),  A.5.2(39), see A.5.2(40),
  43112.        A.5.3(26),  A.5.3(29), see A.5.3(26),  A.5.3(29), see A.5.3(47),
  43113.        A.5.3(50),  A.5.3(53), see A.5.3(50),  A.5.3(53), see A.5.3(59),
  43114.        A.5.3(62),  A.15(14),  B.3(62),  A.15(14),  B.3(53),
  43115.        B.3(54),   B.4(58),   E.4(54),   B.4(58),   E.4(19),
  43116.        G.1.1(40),  G.1.2(28), see G.2.1(40),  G.1.2(28), see G.2.1(12),
  43117.        G.2.2(7),   G.2.3(26), see G.2.4(7),   G.2.3(26), see G.2.4(3),
  43118.        G.2.6(4),   K(11),    K(4),   K(11),    K(41),
  43119.        K(47),    K(114),   K(47),    K(114),   K(122),
  43120.        K(184),    K(202),   K(184),    K(202),   K(220),
  43121.        K(241),    K(241),    K(261).
  43122.   Construct   1.1.4(16), see N(16), see N(9).
  43123.   constructor
  43124.     See initialization   3.3.1(19), see 7.6(19), see 7.6(1).
  43125.     See initialization expression   3.3.1.
  43126.     See Initialize   7.6.
  43127.     See initialized alligator   4.8.
  43128.   Consumer   9.11(5), see 9.11(5), see 9.11(6).
  43129.   context free grammar
  43130.     complete listing   P.
  43131.     cross reference   P.
  43132.     notation   1.1.4.
  43133.     under Syntax heading   1.1.2.
  43134.   context_clause   10.1.2.
  43135.     used   10.1.1(3), see P(3), see P(1).
  43136.   context_item   10.1.2.
  43137.     used   10.1.2(2), see P(2), see P(1).
  43138.   contiguous representation
  43139.     [partial]   13.5.2(5), see 13.7.1(12), see 13.9(5), see 13.7.1(12), see 13.9(9),
  43140.           13.9(17),  13.11(17),  13.11(16).
  43141.   Continue   D.11.
  43142.   control character
  43143.     See also format_effector   2.1.
  43144.     See also other_control_function   2.1.
  43145.     a category of Character   A.3.2(22), see A.3.3(22), see A.3.3(4),
  43146.                  A.3.3.
  43147.   Control_Set   A.4.6.
  43148.   Controlled   7.6.
  43149.     aspect of representation   13.11.3.
  43150.   Controlled pragma   13.11.3(3), see L(3), see L(7).
  43151.   controlled type   7.6(2), see 7.6(9), see N(2), see 7.6(9), see N(10).
  43152.   Controller   9.1.
  43153.   controlling formal parameter   3.9.2.
  43154.   controlling operand 3.9.2(2)
  43155.   controlling result   3.9.2.
  43156.   controlling tag
  43157.     for a call on a dispatching operation   3.9.2.
  43158.   controlling tag value   3.9.2.
  43159.     for the expression in an assignment_statement   5.2.
  43160.   convention   6.3.1(2), see B.1(2), see B.1(11).
  43161.     aspect of representation   B.1.
  43162.   Convention pragma   B.1(7), see L(7), see L(8).
  43163.   conversion   4.6(1), see 4.6(1), see 4.6(28).
  43164.     access   4.6(13), see 4.6(18), see 4.6(13), see 4.6(18), see 4.6(47).
  43165.     arbitrary order   1.1.4.
  43166.     array   4.6(9), see 4.6(9), see 4.6(36).
  43167.     composite (non-array)   4.6(21), see 4.6(21), see 4.6(40).
  43168.     enumeration   4.6(21), see 4.6(21), see 4.6(34).
  43169.     numeric   4.6(8), see 4.6(8), see 4.6(29).
  43170.     unchecked   13.9.
  43171.     value   4.6.
  43172.     view   4.6.
  43173.   Conversion_Error   B.4.
  43174.   convertible   4.6.
  43175.     required   3.7(16), see 3.7.1(9), see 4.6(16), see 3.7.1(9), see 4.6(11),
  43176.           4.6(15), see 6.4.1(15), see 6.4.1(6).
  43177.   Copy   E.4.2(2), see E.4.2(2), see E.4.2(5).
  43178.   copy back of parameters   6.4.1.
  43179.   copy parameter passing   6.2.
  43180.   Copy_Array   B.3.2.
  43181.   Copy_Sign attribute   A.5.3(51), see K(51), see K(44).
  43182.   Copy_Terminated_Array   B.3.2.
  43183.   Copyright_Sign   A.3.3.
  43184.   core language   1.1.2.
  43185.   corresponding constraint   3.4.
  43186.   corresponding discriminants   3.7.
  43187.   corresponding index
  43188.     for an array_aggregate   4.3.3.
  43189.   corresponding subtype   3.4.
  43190.   corresponding value
  43191.     of the target type of a conversion   4.6.
  43192.   Cos   A.5.1(5), see G.1.2(5), see G.1.2(4).
  43193.   Cosh   A.5.1(7), see G.1.2(7), see G.1.2(6).
  43194.   Cot   A.5.1(5), see G.1.2(5), see G.1.2(4).
  43195.   Coth   A.5.1(7), see G.1.2(7), see G.1.2(6).
  43196.   Count   A.4.3(13), see A.4.3(14), see A.4.3(13), see A.4.3(14), see A.4.3(15),
  43197.        A.4.4(48), see A.4.4(49), see A.4.4(48), see A.4.4(49), see A.4.4(50),
  43198.        A.4.5(43), see A.4.5(44), see A.4.5(43), see A.4.5(44), see A.4.5(45),
  43199.        A.8.4(4),  A.10(10),  A.10.1(4),  A.10(10),  A.10.1(5),
  43200.        A.12.1.
  43201.   Count attribute   9.9(5), see K(5), see K(48).
  43202.   Counter   3.4.
  43203.   cover
  43204.     a type   3.4.1.
  43205.     of a choice and an exception   11.2.
  43206.   cover a value
  43207.     by a discrete_choice_list   3.8.1.
  43208.     by a discrete_choice   3.8.1.
  43209.   CPU_Identifier   7.4.
  43210.   CR   A.3.3.
  43211.   create   3.1(12),   A.8.1(6), see A.8.4(12),   A.8.1(6), see A.8.4(6),
  43212.        A.10.1(9), see A.12.1(9), see A.12.1(8).
  43213.   creation
  43214.     of a protected object   C.3.1.
  43215.     of a task object   D.1.
  43216.     of an object   3.3.
  43217.   critical section
  43218.     See intertask communication   9.5.
  43219.   CSI   A.3.3.
  43220.   Currency_Sign   A.3.3.
  43221.   current column number   A.10.
  43222.   current index
  43223.     of an open direct file   A.8.
  43224.   current instance
  43225.     of a generic unit   8.6.
  43226.     of a type   8.6.
  43227.   current line number   A.10.
  43228.   current mode
  43229.     of an open file   A.7.
  43230.   current page number   A.10.
  43231.   current size
  43232.     of an external file   A.8.
  43233.   Current_Error   A.10.1(17), see A.10.1(17), see A.10.1(20).
  43234.   Current_Handler   C.3.2.
  43235.   Current_Input   A.10.1(17), see A.10.1(17), see A.10.1(20).
  43236.   Current_Output   A.10.1(17), see A.10.1(17), see A.10.1(20).
  43237.   Current_State   D.10.
  43238.   Current_Task   C.7.1.
  43239.  
  43240.  
  43241. ΓòÉΓòÉΓòÉ 34. index ΓòÉΓòÉΓòÉ
  43242.  
  43243.   dangling references
  43244.     prevention via accessibility rules   3.10.2.
  43245.   Data_Error   A.8.1(15),  A.8.4(18),  A.9(15),  A.8.4(18),  A.9(9),
  43246.          A.10.1(85), see A.12.1(26), see A.13(85), see A.12.1(26), see A.13(4).
  43247.   Date   3.8.
  43248.   Day   3.5.1(14), see 9.6(14), see 9.6(13).
  43249.   Day_Duration   9.6.
  43250.   Day_Number   9.6.
  43251.   DC1   A.3.3.
  43252.   DC2   A.3.3(6), see J.5(6), see J.5(4).
  43253.   DC3   A.3.3.
  43254.   DC4   A.3.3(6), see J.5(6), see J.5(4).
  43255.   DCS   A.3.3.
  43256.   Deallocate   13.11.
  43257.   deallocation of storage   13.11.2.
  43258.   Decimal
  43259.     child of Ada   F.2.
  43260.   decimal digit
  43261.     a category of Character   A.3.2.
  43262.   decimal fixed point type   3.5.9(1), see 3.5.9(1), see 3.5.9(6).
  43263.   Decimal_Conversions   B.4.
  43264.   Decimal_Digit_Set   A.4.6.
  43265.   Decimal_Element   B.4.
  43266.   decimal_fixed_point_definition   3.5.9.
  43267.     used   3.5.9(2), see P(2), see P(1).
  43268.   decimal_literal   2.4.1.
  43269.     used   2.4(2), see P(2), see P(1).
  43270.   Decimal_Output   F.3.3.
  43271.   Decimal_IO   A.10.1.
  43272.   Declaration   3.1(5), see 3.1(6), see N(5), see 3.1(6), see N(11).
  43273.   declarative region
  43274.     of a construct   8.1.
  43275.   declarative_item   3.11.
  43276.     used   3.11(2), see P(2), see P(1).
  43277.   declarative_part   3.11.
  43278.     used   5.6(2), see 6.3(2),   7.2(2), see 6.3(2),   7.2(2),
  43279.         9.1(6), see 9.5.2(5), see P(6), see 9.5.2(5), see P(1).
  43280.   declare   3.1(8), see 3.1(8), see 3.1(12).
  43281.   declared pure   10.2.1.
  43282.   Decrement   B.3.2.
  43283.   deeper
  43284.     accessibility level   3.10.2.
  43285.     statically   3.10.2(4), see 3.10.2(4), see 3.10.2(17).
  43286.   default entry queuing policy   9.5.3.
  43287.   default treatment   C.3.
  43288.   Default_Bit_Order   13.7.
  43289.   Default_Currency   F.3.3.
  43290.   default_expression   3.7.
  43291.     used   3.7(5),  3.8(6), see 6.1(5),  3.8(6), see 6.1(15),
  43292.         12.4(2), see P(2), see P(1).
  43293.   Default_Fill   F.3.3.
  43294.   Default_Message_Procedure   3.10.
  43295.   default_name   12.6.
  43296.     used   12.6(3), see P(3), see P(1).
  43297.   Default_Priority   13.7(17), see D.1(17), see D.1(11).
  43298.   Default_Radix_Mark   F.3.3.
  43299.   Default_Separator   F.3.3.
  43300.   deferred constant   7.4.
  43301.   deferred constant declaration   3.3.1(6), see 7.4(6), see 7.4(2).
  43302.   defining name   3.1.
  43303.   defining_character_literal   3.5.1.
  43304.     used   3.5.1(3), see P(3), see P(1).
  43305.   defining_designator   6.1.
  43306.     used   6.1(4), see 12.3(2), see P(4), see 12.3(2), see P(1).
  43307.   defining_identifier   3.1.
  43308.     used   3.2.1(3),  3.2.2(2),  3.3.1(3),  3.2.2(2),  3.3.1(3),
  43309.         3.5.1(3),  3.10.1(2), see 5.5(3),  3.10.1(2), see 5.5(4),
  43310.         6.1(7),   7.3(2),   7.3(7),   7.3(2),   7.3(3),
  43311.         8.5.1(2),  8.5.2(2),  9.1(2),  8.5.2(2),  9.1(2),
  43312.         9.1(3),   9.1(6),   9.4(3),   9.1(6),   9.4(2),
  43313.         9.4(3),   9.4(7),   9.5.2(3),   9.4(7),   9.5.2(2),
  43314.         9.5.2(5),  9.5.2(8),  10.1.3(5),  9.5.2(8),  10.1.3(4),
  43315.         10.1.3(5), see 10.1.3(6), see 11.2(5), see 10.1.3(6), see 11.2(4),
  43316.         12.5(2),   12.7(2),   P(2),   12.7(2),   P(1).
  43317.   defining_identifier_list   3.3.1.
  43318.     used   3.3.1(2), see 3.3.2(2), see 3.7(2), see 3.3.2(2), see 3.7(5),
  43319.         3.8(6),   6.1(15),  11.1(6),   6.1(15),  11.1(2),
  43320.         12.4(2),  P(2),  P(1).
  43321.   defining_operator_symbol   6.1.
  43322.     used   6.1(6), see P(6), see P(1).
  43323.   defining_program_unit_name   6.1.
  43324.     used   6.1(4),  6.1(6),   7.1(4),  6.1(6),   7.1(3),
  43325.         7.2(2),  8.5.3(2), see 8.5.5(2),  8.5.3(2), see 8.5.5(2),
  43326.         12.3(2), see P(2), see P(1).
  43327.   Definite attribute   12.5.1(23), see K(23), see K(50).
  43328.   definite subtype   3.3.
  43329.   Definition   3.1(7), see N(7), see N(12).
  43330.   Deg_To_Rad   4.9.
  43331.   Degree_Sign   A.3.3.
  43332.   DEL   A.3.3(14), see J.5(14), see J.5(4).
  43333.   delay_alternative   9.7.1.
  43334.     used   9.7.1(4), see 9.7.2(2), see P(4), see 9.7.2(2), see P(1).
  43335.   delay_relative_statement   9.6.
  43336.     used   9.6(2), see P(2), see P(1).
  43337.   delay_statement   9.6.
  43338.     used   5.1(4), see 9.7.1(6), see 9.7.4(4), see 9.7.1(6), see 9.7.4(4),
  43339.         P.
  43340.   delay_until_statement   9.6.
  43341.     used   9.6(2), see P(2), see P(1).
  43342.   Delete   A.4.3(29), see A.4.3(30), see A.4.4(29), see A.4.3(30), see A.4.4(64),
  43343.        A.4.4(65), see A.4.5(59), see A.4.5(65), see A.4.5(59), see A.4.5(60),
  43344.        A.8.1(8),  A.8.4(8),  A.10.1(8),  A.8.4(8),  A.10.1(11),
  43345.        A.12.1.
  43346.   delimiter   2.2.
  43347.   delivery
  43348.     of an interrupt   C.3.
  43349.   delta
  43350.     of a fixed point type   3.5.9.
  43351.   Delta attribute   3.5.10(3), see K(3), see K(52).
  43352.   delta_constraint   J.3.
  43353.     used   3.2.2(6), see P(6), see P(1).
  43354.   Denorm attribute   A.5.3(9), see K(9), see K(54).
  43355.   denormalized number   A.5.3.
  43356.   denote   8.6.
  43357.     informal definition   3.1.
  43358.     name used as a pragma argument   8.6.
  43359.   depend on a discriminant
  43360.     for a constraint or component_definition   3.7.
  43361.     for a component   3.7.
  43362.   dependence
  43363.     elaboration   10.2.
  43364.     of a task on a master   9.3.
  43365.     of a task on another task   9.3.
  43366.     semantic   10.1.1.
  43367.   depth
  43368.     accessibility level   3.10.2.
  43369.   dereference   4.1.
  43370.   Dereference_Error   B.3.1.
  43371.   derivation class
  43372.     for a type   3.4.1.
  43373.   derived from
  43374.     directly or indirectly   3.4.1.
  43375.   derived type   3.4(1), see N(1), see N(13).
  43376.     [partial]   3.4.
  43377.   derived_type_definition   3.4.
  43378.     used   3.2.1(4), see P(4), see P(1).
  43379.   descendant   10.1.1.
  43380.     of a type   3.4.1.
  43381.     relationship with scope   8.2.
  43382.   Descriptor   13.6.
  43383.   designate   3.10.
  43384.   designated profile
  43385.     of an access-to-subprogram type   3.10.
  43386.   designated subtype
  43387.     of a named access type   3.10.
  43388.     of an anonymous access type   3.10.
  43389.   designated type
  43390.     of a named access type   3.10.
  43391.     of an anonymous access type   3.10.
  43392.   designator   6.1.
  43393.     used   6.3(2), see P(2), see P(1).
  43394.   destructor
  43395.     See finalization   7.6(1), see 7.6.1(1), see 7.6.1(1).
  43396.   Detach_Handler   C.3.2.
  43397.   determined class for a formal type   12.5.
  43398.   determines
  43399.     a type by a subtype_mark   3.2.2.
  43400.   Device   3.8.1.
  43401.   Device_Error   A.8.1(15),  A.8.4(15),  A.8.4(18),
  43402.           A.10.1(85), see A.12.1(26), see A.13(85), see A.12.1(26), see A.13(4).
  43403.   Device_Interface   C.3.2.
  43404.   Device_Priority   C.3.2.
  43405.   Diaeresis   A.3.3.
  43406.   Dice   A.5.2.
  43407.   Dice_Game   A.5.2.
  43408.   Die   A.5.2.
  43409.   digit   2.1.
  43410.     used   2.1(3),   2.3(3), see 2.4.1(3),   2.3(3), see 2.4.1(3),
  43411.         2.4.2(5), see P(5), see P(1).
  43412.   digits
  43413.     of a decimal fixed point subtype   3.5.9,
  43414.                       3.5.10.
  43415.   Digits attribute   3.5.8(2), see 3.5.10(2), see 3.5.10(7),
  43416.             K(56),   K(56),   K(58).
  43417.   digits_constraint   3.5.9.
  43418.     used   3.2.2(6), see P(6), see P(1).
  43419.   dimensionality
  43420.     of an array   3.6.
  43421.   direct access   A.8.
  43422.   direct file   A.8.
  43423.   direct_name   4.1.
  43424.     used   3.8.1(2), see 4.1(2),  5.1(2), see 4.1(2),  5.1(8),
  43425.         9.5.2(3), see 13.1(3), see J.7(3), see 13.1(3), see J.7(1),
  43426.         P.
  43427.   Direct_IO   J.1.
  43428.     child of Ada   A.8.4(2), see A.9(2), see A.9(3).
  43429.   Direction   A.4.1.
  43430.   directly specified
  43431.     of an aspect of representation of an entity   13.1.
  43432.   directly visible   8.3(2), see 8.3(2), see 8.3(21).
  43433.     within a pragma in a context_clause   10.1.6.
  43434.     within a pragma that appears at the place of a compilation unit
  43435.        10.1.6.
  43436.     within a use_clause in a context_clause   10.1.6.
  43437.     within a with_clause   10.1.6.
  43438.     within the parent_unit_name of a library unit   10.1.6.
  43439.     within the parent_unit_name of a subunit   10.1.6.
  43440.   Discard_Names pragma   C.5(3), see L(3), see L(9).
  43441.   discontiguous representation
  43442.     partial  13.5.2(5), see 13.7.1(12), see 13.9(5), see 13.7.1(12), see 13.9(9),
  43443.         13.9(17),  13.11(17),  13.11(16).
  43444.   discrete array type   4.5.2.
  43445.   discrete type   3.2(3), see 3.5(1), see N(3), see 3.5(1), see N(14).
  43446.   discrete_choice   3.8.1.
  43447.     used   3.8.1(4), see P(4), see P(1).
  43448.   discrete_choice_list   3.8.1.
  43449.     used   3.8.1(3), see 4.3.3(5), see 5.4(3), see 4.3.3(5), see 5.4(3),
  43450.         P.
  43451.   Discrete_Random
  43452.     child of Ada.Numerics   A.5.2.
  43453.   discrete_range   3.6.1.
  43454.     used   3.6.1(2), see 3.8.1(5), see 4.1.2(2), see 3.8.1(5), see 4.1.2(2),
  43455.         P.
  43456.   discrete_subtype_definition   3.6.
  43457.     used   3.6(5),   5.5(4), see 9.5.2(5),   5.5(4), see 9.5.2(2),
  43458.         9.5.2(8), see P(8), see P(1).
  43459.   discriminant   3.2(5), see 3.7(1), see N(5), see 3.7(1), see N(15).
  43460.     of a variant_part   3.8.1.
  43461.   discriminant_association   3.7.1.
  43462.     used   3.7.1(2), see P(2), see P(1).
  43463.   Discriminant_Check   11.5.
  43464.     [partial]   4.1.3(15), see 4.3(6),  4.3.2(15), see 4.3(6),  4.3.2(8),
  43465.           4.6(43),   4.6(45), see 4.6(43),   4.6(45), see 4.6(51),
  43466.           4.6(52),   4.7(4),  4.8(52),   4.7(4),  4.8(10).
  43467.   discriminant_constraint   3.7.1.
  43468.     used   3.2.2(7), see P(7), see P(1).
  43469.   discriminant_part   3.7.
  43470.     used   3.10.1(2), see 7.3(2), see 7.3(2), see 7.3(2), see 7.3(3),
  43471.         12.5(2),   P(2),   P(1).
  43472.   discriminant_specification   3.7.
  43473.     used   3.7(4), see P(4), see P(1).
  43474.   discriminants
  43475.     known   3.7.
  43476.     unknown   3.7.
  43477.   discriminated type   3.7.
  43478.   Disk_Unit   3.8.1.
  43479.   dispatching   3.9.
  43480.   dispatching call
  43481.     on a dispatching operation   3.9.2.
  43482.   dispatching operation   3.9.2(1), see 3.9.2(1), see 3.9.2(2).
  43483.     [partial]   3.9.
  43484.   dispatching point   D.2.1.
  43485.     [partial]   D.2.1(8), see D.2.2(8), see D.2.2(12).
  43486.   dispatching policy for tasks
  43487.     [partial]   D.2.1.
  43488.   dispatching, task   D.2.1.
  43489.   Display_Format   B.4.
  43490.   displayed magnitude (of a decimal value)   F.3.2.
  43491.   disruption of an assignment   9.8(21), see 13.9.1(21), see 13.9.1(5).
  43492.     [partial]   11.6.
  43493.   distinct access paths   6.2.
  43494.   distributed program   E.
  43495.   distributed system   E.
  43496.   distributed systems   C.
  43497.   divide   2.1(15), see F.2(15), see F.2(6).
  43498.   divide operator   4.4(1), see 4.5.5(1), see 4.5.5(1).
  43499.   Dividend_Type   F.2.
  43500.   Division_Check   11.5.
  43501.     [partial]   3.5.4(20), see 4.5.5(20), see 4.5.5(22),
  43502.           A.5.1(28), see A.5.3(28), see A.5.3(47),
  43503.           G.1.1(40), see G.1.2(40), see G.1.2(28),
  43504.           K.
  43505.   Division_Sign   A.3.3.
  43506.   Divisor_Type   F.2.
  43507.   DLE   A.3.3(6), see J.5(6), see J.5(4).
  43508.   Do_APC   E.5.
  43509.   Do_RPC   E.5.
  43510.   documentation (required of an implementation)   1.1.3,
  43511.                            M.
  43512.   documentation requirements   1.1.2(34), see 1.1.3(34), see 1.1.3(18),
  43513.                  13.11(22), see A.5.2(22), see A.5.2(44),
  43514.                  A.13(15),  C.1(15),  C.1(6),
  43515.                  C.3(12),   C.3.2(12),   C.3.2(24),
  43516.                  C.4(12),   C.7.1(12),   C.7.1(19),
  43517.                  C.7.2(18), see D.2.2(18), see D.2.2(14),
  43518.                  D.6(3),   D.8(3),   D.8(33),
  43519.                  D.9(7),   D.12(7),   D.12(5),
  43520.                  E.5(25),   H.1(25),   H.1(5),
  43521.                  H.2(1),   H.3.2(1),   H.3.2(8),
  43522.                  H.4(25),   J.7.1(25),   J.7.1(12).
  43523.   Dollar_Sign   A.3.3.
  43524.   Done   J.7.1.
  43525.   dot   2.1.
  43526.   dot selection
  43527.     See selected_component   4.1.3.
  43528.   Dot_Product   6.1(39), see 6.3(39), see 6.3(11).
  43529.   double   B.3.
  43530.   Double_Precision   B.5.
  43531.   Double_Square   3.7.
  43532.   downward closure  3.10.2.
  43533.   Dozen   4.6.
  43534.   drift rate   D.8.
  43535.   Drum_Ref   3.10.
  43536.   Drum_Unit   3.8.1.
  43537.   Duration   A.1.
  43538.   dynamic binding
  43539.     See dispatching operation   3.9.
  43540.   dynamic semantics   1.1.2.
  43541.   Dynamic_Priorities
  43542.     child of Ada   D.5.
  43543.   dynamically determined tag   3.9.2.
  43544.   dynamically enclosing
  43545.     of one execution by another   11.4.
  43546.   dynamically tagged   3.9.2.
  43547.  
  43548.  
  43549. ΓòÉΓòÉΓòÉ 35. index ΓòÉΓòÉΓòÉ
  43550.  
  43551.   e  A.5.
  43552.   edited output   F.3.
  43553.   Editing
  43554.     child of Ada.Text_IO   F.3.3.
  43555.     child of Ada.Wide_Text_IO   F.3.4.
  43556.   effect
  43557.     external   1.1.3.
  43558.   efficiency   11.5(29), see 11.6(29), see 11.6(1).
  43559.   Elaborate pragma   10.2.1(20), see L(20), see L(10).
  43560.   Elaborate_All pragma   10.2.1(21), see L(21), see L(11).
  43561.   Elaborate_Body pragma   10.2.1(22), see L(22), see L(12).
  43562.   elaborated   3.11.
  43563.   elaboration   3.1(11), see N(11), see N(19).
  43564.     abstract_subprogram_declaration   6.1.
  43565.     access_definition   3.10.
  43566.     access_type_definition   3.10.
  43567.     array_type_definition   3.6.
  43568.     choice_parameter_specification   11.4.
  43569.     component_declaration   3.8.
  43570.     component_definition   3.6(22), see 3.8(22), see 3.8(18).
  43571.     component_list   3.8.
  43572.     declaration named by a pragma Import   B.1.
  43573.     declarative_part   3.11.
  43574.     deferred constant declaration   7.4.
  43575.     delta_constraint   J.3.
  43576.     derived_type_definition   3.4.
  43577.     digits_constraint   3.5.9.
  43578.     discrete_subtype_definition   3.6.
  43579.     discriminant_constraint   3.7.1.
  43580.     entry_declaration   9.5.2.
  43581.     enumeration_type_definition   3.5.1.
  43582.     exception_declaration   11.1.
  43583.     fixed_point_definition   3.5.9.
  43584.     floating_point_definition   3.5.7.
  43585.     full type definition   3.2.1.
  43586.     full_type_declaration   3.2.1.
  43587.     generic body   12.2.
  43588.     generic_declaration   12.1.
  43589.     generic_instantiation   12.3.
  43590.     incomplete_type_declaration   3.10.1.
  43591.     index_constraint   3.6.1.
  43592.     integer_type_definition   3.5.4.
  43593.     loop_parameter_specification   5.5.
  43594.     non-generic subprogram_body   6.3.
  43595.     nongeneric package_body   7.2.
  43596.     number_declaration   3.3.2.
  43597.     object_declaration   3.3.1(15), see 7.6(15), see 7.6(10).
  43598.     package_body of Standard   A.1.
  43599.     package_declaration   7.1.
  43600.     partition   E.1(6), see E.5(6), see E.5(21).
  43601.     pragma   2.8.
  43602.     private_extension_declaration   7.3.
  43603.     private_type_declaration   7.3.
  43604.     protected declaration   9.4.
  43605.     protected_body   9.4.
  43606.     protected_definition   9.4.
  43607.     range_constraint   3.5.
  43608.     real_type_definition   3.5.6.
  43609.     record_definition   3.8.
  43610.     record_extension_part   3.9.1.
  43611.     record_type_definition   3.8.
  43612.     renaming_declaration   8.5.
  43613.     representation_clause   13.1.
  43614.     single_protected_declaration   9.4.
  43615.     single_task_declaration   9.1.
  43616.     Storage_Size pragma   13.3.
  43617.     subprogram_declaration   6.1.
  43618.     subtype_declaration   3.2.2.
  43619.     subtype_indication   3.2.2.
  43620.     task declaration   9.1.
  43621.     task_body   9.1.
  43622.     task_definition   9.1.
  43623.     use_clause   8.4.
  43624.     variant_part   3.8.1.
  43625.   elaboration control   10.2.1.
  43626.   elaboration dependence
  43627.     library_item on another   10.2.
  43628.   Elaboration_Check   11.5.
  43629.     [partial]   3.11.
  43630.   Elem   12.1.
  43631.   element   A.4.4(26), see A.4.5(20), see B.3.2(26), see A.4.5(20), see B.3.2(4).
  43632.     of a storage pool   13.11.
  43633.   Element_Array   B.3.2.
  43634.   Element_Type   3.9.3(15), see A.8.1(2), see A.8.4(15), see A.8.1(2), see A.8.4(2),
  43635.           A.9.
  43636.   elementary type   3.2(2), see N(2), see N(16).
  43637.   Elementary_Functions
  43638.     child of Ada.Numerics   A.5.1.
  43639.   eligible
  43640.     a type, for a convention   B.1.
  43641.   else part
  43642.     of a selective_accept   9.7.1.
  43643.   EM   A.3.3.
  43644.   embedded systems   C(1), see D(1), see D(1).
  43645.   Empty   3.9.3.
  43646.   encapsulation
  43647.     See package   7.
  43648.   enclosing
  43649.     immediately   8.1.
  43650.   end of a line   2.2.
  43651.   End_Error   A.8.1(15),  A.8.4(18), see A.10.1(15),  A.8.4(18), see A.10.1(85),
  43652.          A.12.1(26), see A.13(26), see A.13(4).
  43653.   End_Of_File   11.4.2(4),  A.8.1(13), see A.8.4(4),  A.8.1(13), see A.8.4(16),
  43654.           A.10.1(34), see A.12.1(34), see A.12.1(12).
  43655.   End_Of_Line   A.10.1.
  43656.   End_Of_Page   A.10.1.
  43657.   endian
  43658.     big   13.5.3.
  43659.     little   13.5.3.
  43660.   ENQ   A.3.3.
  43661.   entity
  43662.     [partial]   3.1.
  43663.   entry
  43664.     closed   9.5.3.
  43665.     open   9.5.3.
  43666.     single   9.5.2.
  43667.   entry call   9.5.3.
  43668.     simple   9.5.3.
  43669.   entry calling convention   6.3.1.
  43670.   entry family   9.5.2.
  43671.   entry index subtype   3.8(18), see 9.5.2(18), see 9.5.2(20).
  43672.   entry queue   9.5.3.
  43673.   entry queuing policy   9.5.3.
  43674.     default policy   9.5.3.
  43675.   entry_barrier   9.5.2.
  43676.     used   9.5.2(5), see P(5), see P(1).
  43677.   entry_body   9.5.2.
  43678.     used   9.4(8), see P(8), see P(1).
  43679.   entry_body_formal_part   9.5.2.
  43680.     used   9.5.2(5), see P(5), see P(1).
  43681.   entry_call_alternative   9.7.2.
  43682.     used   9.7.2(2), see 9.7.3(2), see P(2), see 9.7.3(2), see P(1).
  43683.   entry_call_statement   9.5.3.
  43684.     used   5.1(4), see 9.7.2(3), see 9.7.4(4), see 9.7.2(3), see 9.7.4(4),
  43685.         P.
  43686.   entry_declaration   9.5.2.
  43687.     used   9.1(5), see 9.4(5), see P(5), see 9.4(5), see P(1).
  43688.   entry_index   9.5.2.
  43689.     used   9.5.2(3), see P(3), see P(1).
  43690.   entry_index_specification   9.5.2.
  43691.     used   9.5.2(6), see P(6), see P(1).
  43692.   Enum   12.5(13), see A.10.1(13), see A.10.1(79).
  43693.   Enum_IO   8.5.5.
  43694.   enumeration literal   3.5.1.
  43695.   enumeration type   3.2(3), see 3.5.1(1), see N(3), see 3.5.1(1), see N(17).
  43696.   enumeration_aggregate   13.4.
  43697.     used   13.4(2), see P(2), see P(1).
  43698.   enumeration_literal_specification   3.5.1.
  43699.     used   3.5.1(2), see P(2), see P(1).
  43700.   enumeration_representation_clause   13.4.
  43701.     used   13.1(2), see P(2), see P(1).
  43702.   enumeration_type_definition   3.5.1.
  43703.     used   3.2.1(4), see P(4), see P(1).
  43704.   Enumeration_IO   A.10.1.
  43705.   environment declarative_part   10.1.4.
  43706.     for the environment task of a partition   10.2.
  43707.   environment   10.1.4.
  43708.   environment task   10.2.
  43709.   EOF   8.5.2.
  43710.   EOT   A.3.3(5), see J.5(5), see J.5(4).
  43711.   EPA   A.3.3.
  43712.   epoch   D.8.
  43713.   equal operator   4.4(1), see 4.5.2(1), see 4.5.2(1).
  43714.   equality operator   4.5.2.
  43715.     special inheritance rule for tagged types   3.4,
  43716.                           4.5.2.
  43717.   equals sign   2.1.
  43718.   Equals_Sign   A.3.3.
  43719.   erroneous execution   1.1.2(32),  1.1.5(32),  1.1.5(10),
  43720.               3.7.2(4),   9.8(4),   9.8(21),
  43721.               9.10(11),   11.5(11),   11.5(26),
  43722.               13.3(13),   13.3(13),   13.3(27),
  43723.               13.9.1(8),  13.9.1(8),  13.9.1(12),
  43724.               13.11(21),  13.11.2(21),  13.11.2(16),
  43725.               A.10.3(22), see A.13(22), see A.13(17),
  43726.               B.3.1(51),  B.3.2(51),  B.3.2(35),
  43727.               C.3.1(14),  C.7.1(14),  C.7.1(18),
  43728.               C.7.2(14),  D.5(14),  D.5(12),
  43729.               D.11(9),   H.4(9),   H.4(26).
  43730.   error   11.1.
  43731.     compile-time   1.1.2(27), see 1.1.5(27), see 1.1.5(4).
  43732.     link-time   1.1.2(29), see 1.1.5(29), see 1.1.5(4).
  43733.     run-time   1.1.2(30), see 1.1.5(6), see 11.5(30), see 1.1.5(6), see 11.5(2),
  43734.           11.6.
  43735.     See also  bounded error, erroneous execution
  43736.   ESA   A.3.3.
  43737.   ESC   A.3.3.
  43738.   Establish_RPC_Receiver   E.5.
  43739.   ETB   A.3.3.
  43740.   ETX   A.3.3.
  43741.   evaluation   3.1(11), see N(11), see N(19).
  43742.     aggregate   4.3.
  43743.     allocator   4.8.
  43744.     array_aggregate   4.3.3.
  43745.     attribute_reference   4.1.4.
  43746.     concatenation   4.5.3.
  43747.     dereference   4.1.
  43748.     discrete_range   3.6.1.
  43749.     extension_aggregate   4.3.2.
  43750.     generic_association   12.3.
  43751.     generic_association for a formal object of mode in
  43752.        12.4.
  43753.     indexed_component   4.1.1.
  43754.     initialized allocator   4.8.
  43755.     membership test   4.5.2.
  43756.     name   4.1.
  43757.     name that has a prefix   4.1.
  43758.     null literal   4.2.
  43759.     numeric literal   4.2.
  43760.     parameter_association   6.4.1.
  43761.     prefix   4.1.
  43762.     primary that is a name   4.4.
  43763.     qualified_expression   4.7.
  43764.     range   3.5.
  43765.     range_attribute_reference   4.1.4.
  43766.     record_aggregate   4.3.1.
  43767.     record_component_association_list   4.3.1.
  43768.     selected_component   4.1.3.
  43769.     short-circuit control form   4.5.1.
  43770.     slice   4.1.2.
  43771.     string_literal   4.2.
  43772.     uninitialized allocator   4.8.
  43773.     Val   3.5.5(7), see K(7), see K(261).
  43774.     Value   3.5.
  43775.     value conversion   4.6.
  43776.     view conversion   4.6.
  43777.     Wide_Value   3.5.
  43778.   Exception   11(1), see 11.1(1), see N(1), see 11.1(1), see N(18).
  43779.   exception occurrence   11.
  43780.   exception_choice   11.2.
  43781.     used   11.2(3), see P(3), see P(1).
  43782.   exception_declaration   11.1.
  43783.     used   3.1(3), see P(3), see P(1).
  43784.   exception_handler   11.2.
  43785.     used   11.2(2), see P(2), see P(1).
  43786.   Exception_Identity   11.4.1.
  43787.   Exception_Information   11.4.1.
  43788.   Exception_Message   11.4.1.
  43789.   Exception_Name   11.4.1(2), see 11.4.1(2), see 11.4.1(5).
  43790.   Exception_Occurrence   11.4.1.
  43791.   Exception_Occurrence_Access   11.4.1.
  43792.   exception_renaming_declaration   8.5.2.
  43793.     used   8.5(2), see P(2), see P(1).
  43794.   Exception_Id   11.4.1.
  43795.   Exceptions
  43796.     child of Ada   11.4.1.
  43797.   Exchange   12.1(21), see 12.2(21), see 12.2(5).
  43798.   Exchange_Handler   C.3.2.
  43799.   Exclam   J.5.
  43800.   Exclamation   A.3.3.
  43801.   execution   3.1(11), see N(11), see N(19).
  43802.     abort_statement   9.8.
  43803.     aborting the execution of a construct   9.8.
  43804.     accept_statement   9.5.2.
  43805.     Ada program   9.
  43806.     assignment_statement   5.2(7), see 7.6(7), see 7.6(17),
  43807.                 7.6.1.
  43808.     asynchronous_select with a delay_statement trigger
  43809.        9.7.4.
  43810.     asynchronous_select with an entry call trigger   9.7.4.
  43811.     block_statement   5.6.
  43812.     call on a dispatching operation   3.9.2.
  43813.     call on an inherited subprogram   3.4.
  43814.     case_statement   5.4.
  43815.     conditional_entry_call   9.7.3.
  43816.     delay_statement   9.6.
  43817.     dynamically enclosing   11.4.
  43818.     entry_body   9.5.2.
  43819.     entry_call_statement   9.5.3.
  43820.     exit_statement   5.7.
  43821.     goto_statement   5.8.
  43822.     handled_sequence_of_statements   11.2.
  43823.     handler   11.4.
  43824.     if_statement   5.3.
  43825.     instance of Unchecked_Deallocation   7.6.1.
  43826.     loop_statement   5.5.
  43827.     loop_statement with a for iteration_scheme   5.5.
  43828.     loop_statement with a while iteration_scheme   5.5.
  43829.     null_statement   5.1.
  43830.     partition   10.2.
  43831.     pragma   2.8.
  43832.     program   10.2.
  43833.     protected subprogram call   9.5.1.
  43834.     raise_statement with an exception_name   11.3.
  43835.     re-raise statement   11.3.
  43836.     remote subprogram call   E.4.
  43837.     requeue protected entry   9.5.4.
  43838.     requeue task entry   9.5.4.
  43839.     requeue_statement   9.5.4.
  43840.     return_statement   6.5.
  43841.     selective_accept   9.7.1.
  43842.     sequence_of_statements   5.1.
  43843.     subprogram call   6.4.
  43844.     subprogram_body   6.3.
  43845.     task   9.2.
  43846.     task_body   9.2.
  43847.     timed_entry_call   9.7.2.
  43848.   execution resource
  43849.     associated with a protected object   9.4.
  43850.     required for a task to run   9.
  43851.   exit_statement   5.7.
  43852.     used   5.1(4), see P(4), see P(1).
  43853.   Exp   A.5.1(4), see B.1(51), see G.1.2(4), see B.1(51), see G.1.2(3).
  43854.   expanded name   4.1.3.
  43855.   Expanded_Name   3.9.
  43856.   expected profile   8.6.
  43857.     accept_statement entry_direct_name   9.5.2.
  43858.     Access attribute_reference prefix   3.10.2.
  43859.     attribute_definition_clause name   13.3.
  43860.     character_literal   4.2.
  43861.     formal subprogram actual   12.6.
  43862.     formal subprogram default_name   12.6.
  43863.     subprogram_renaming_declaration   8.5.4.
  43864.   expected type   8.6.
  43865.     abort_statement task_name   9.8.
  43866.     access attribute_reference   3.10.2.
  43867.     actual parameter   6.4.1.
  43868.     aggregate   4.3.
  43869.     allocator   4.8.
  43870.     array_aggregate   4.3.3.
  43871.     array_aggregate component expression   4.3.3.
  43872.     array_aggregate discrete_choice   4.3.3.
  43873.     assignment_statement expression   5.2.
  43874.     assignment_statement variable_name   5.2.
  43875.     attribute_definition_clause expression or name   13.3.
  43876.     attribute_designator expression   4.1.4.
  43877.     case expression   5.4.
  43878.     case_statement_alternative discrete_choice   5.4.
  43879.     character_literal   4.2.
  43880.     code_statement   13.8.
  43881.     component_clause expressions   13.5.1.
  43882.     component_declaration default_expression   3.8.
  43883.     condition   5.3.
  43884.     decimal fixed point type digits   3.5.9.
  43885.     delay_relative_statement expression   9.6.
  43886.     delay_until_statement expression   9.6.
  43887.     delta_constraint expression   J.3.
  43888.     dereference name   4.1.
  43889.     discrete_subtype_definition range   3.6.
  43890.     discriminant default_expression   3.7.
  43891.     discriminant_association expression   3.7.1.
  43892.     entry_index   9.5.2.
  43893.     enumeration_representation_clause expressions   13.4.
  43894.     extension_aggregate   4.3.2.
  43895.     extension_aggregate ancestor expression   4.3.2.
  43896.     first_bit   13.5.1.
  43897.     fixed point type delta   3.5.9.
  43898.     generic formal in object actual   12.4.
  43899.     generic formal object default_expression   12.4.
  43900.     index_constraint discrete_range   3.6.1.
  43901.     indexed_component expression   4.1.1.
  43902.     Interrupt_Priority pragma argument   D.1.
  43903.     last_bit   13.5.1.
  43904.     link name   B.1.
  43905.     membership test simple_expression   4.5.2.
  43906.     modular_type_definition expression   3.5.4.
  43907.     null literal   4.2.
  43908.     number_declaration expression   3.3.2.
  43909.     object_declaration initialization expression   3.3.1.
  43910.     parameter default_expression   6.1.
  43911.     position   13.5.1.
  43912.     Priority pragma argument   D.1.
  43913.     range simple_expressions   3.5.
  43914.     range_attribute_designator expression   4.1.4.
  43915.     range_constraint range   3.5.
  43916.     real_range_specification bounds   3.5.7.
  43917.     record_aggregate   4.3.1.
  43918.     record_component_association expression   4.3.1.
  43919.     requested decimal precision   3.5.7.
  43920.     restriction parameter expression   13.12.
  43921.     return expression   6.5.
  43922.     short-circuit control form relation   4.5.1.
  43923.     signed_integer_type_definition simple_expression
  43924.        3.5.4.
  43925.     slice discrete_range   4.1.2.
  43926.     Storage_Size pragma argument   13.3.
  43927.     string_literal   4.2.
  43928.     type_conversion operand 4.6(6)
  43929.     variant_part discrete_choice   3.8.1.
  43930.   expiration time
  43931.     [partial]   9.6.
  43932.     for a delay_relative_statement   9.6.
  43933.     for a delay_until_statement   9.6.
  43934.   explicit declaration   3.1(5), see N(5), see N(11).
  43935.   explicit initial value   3.3.1.
  43936.   explicit_actual_parameter   6.4.
  43937.     used   6.4(5), see P(5), see P(1).
  43938.   explicit_dereference   4.1.
  43939.     used   4.1(2), see P(2), see P(1).
  43940.   explicit_generic_actual_parameter   12.3.
  43941.     used   12.3(4), see P(4), see P(1).
  43942.   explicitly assign   10.2.
  43943.   exponent   2.4.1(4), see 4.5.6(4), see 4.5.6(11).
  43944.     used   2.4.1(2), see 2.4.2(2), see P(2), see 2.4.2(2), see P(1).
  43945.   Exponent attribute   A.5.3(18), see K(18), see K(60).
  43946.   exponentiation operator   4.4(1), see 4.5.6(1), see 4.5.6(7).
  43947.   Export pragma   B.1(6), see L(6), see L(13).
  43948.   exported
  43949.     aspect of representation   B.1.
  43950.   exported entity   B.1.
  43951.   Expr_Ptr   3.9.1.
  43952.   expression   3.9(33), see 4.4(1), see 4.4(33), see 4.4(1), see 4.4(2).
  43953.     used   2.8(3),   3.3.1(2), see 3.3.2(3),   3.3.1(2), see 3.3.2(2),
  43954.         3.5.4(4), see 3.5.7(2), see 3.5.9(4), see 3.5.7(2), see 3.5.9(3),
  43955.         3.5.9(4), see 3.5.9(5), see 3.7(4), see 3.5.9(5), see 3.7(6),
  43956.         3.7.1(3), see 3.8.1(5), see 4.1.1(3), see 3.8.1(5), see 4.1.1(2),
  43957.         4.1.4(3), see 4.1.4(5), see 4.3.1(3), see 4.1.4(5), see 4.3.1(4),
  43958.         4.3.2(3), see 4.3.3(3), see 4.3.3(3), see 4.3.3(3), see 4.3.3(5),
  43959.         4.4(7),   4.6(2),   4.7(7),   4.6(2),   4.7(2),
  43960.         5.2(2),   5.3(3),   5.4(2),   5.3(3),   5.4(2),
  43961.         6.4(6),   6.5(2),   9.5.2(6),   6.5(2),   9.5.2(4),
  43962.         9.6(3),   9.6(4),   12.3(3),   9.6(4),   12.3(5),
  43963.         13.3(2),  13.3(63), see 13.5.1(2),  13.3(63), see 13.5.1(4),
  43964.         13.12(4), see B.1(5),   B.1(4), see B.1(5),   B.1(6),
  43965.         B.1(8),   B.1(10),  C.3.1(8),   B.1(10),  C.3.1(4),
  43966.         D.1(3),   D.1(5),   J.3(3),   D.1(5),   J.3(2),
  43967.         J.7(1),   J.8(1),   L(1),   J.8(1),   L(6),
  43968.         L(13),   L(14),   L(13),   L(14),   L(18),
  43969.         L(19),   L(27),   L(19),   L(27),   L(35),
  43970.         P.
  43971.   extended_digit   2.4.2.
  43972.     used   2.4.2(4), see P(4), see P(1).
  43973.   extension
  43974.     of a private type   3.9(2), see 3.9.1(2), see 3.9.1(1).
  43975.     of a record type   3.9(2), see 3.9.1(2), see 3.9.1(1).
  43976.     of a type   3.9(2), see 3.9.1(2), see 3.9.1(1).
  43977.   extension_aggregate   4.3.2.
  43978.     used   4.3(2), see P(2), see P(1).
  43979.   external call   9.5.
  43980.   external effect
  43981.     of the execution of an Ada program   1.1.3.
  43982.     volatile/atomic objects   C.6.
  43983.   external file   A.7.
  43984.   external interaction   1.1.3.
  43985.   external name   B.1.
  43986.   external requeue   9.5.
  43987.   External_Tag   3.9.
  43988.   External_Tag attribute   13.3(75), see K(75), see K(64).
  43989.   External_Tag clause   13.3(7), see 13.3(75), see K(7), see 13.3(75), see K(65).
  43990.   extra permission to avoid raising exceptions   11.6.
  43991.   extra permission to reorder actions   11.6.
  43992.  
  43993.  
  43994. ΓòÉΓòÉΓòÉ 36. index ΓòÉΓòÉΓòÉ
  43995.  
  43996.   factor  4.4.
  43997.     used   4.4(5), see P(5), see P(1).
  43998.   failure   A.15.
  43999.     of a language-defined check   11.5.
  44000.   False   3.5.3.
  44001.   family
  44002.     entry   9.5.2.
  44003.   Feminine_Ordinal_Indicator   A.3.3.
  44004.   FF   A.3.3(5), see J.5(5), see J.5(4).
  44005.   Field   A.10.1.
  44006.   file
  44007.     as file object   A.7.
  44008.   file terminator   A.10.
  44009.   File_Access   A.10.1.
  44010.   File_Descriptor   7.5.
  44011.   File_Handle   11.4.2.
  44012.   File_Mode   A.8.1(4), see A.8.4(4), see A.10.1(4), see A.8.4(4), see A.10.1(4),
  44013.          A.12.1.
  44014.   File_Name   7.3(22), see 7.5(18), see 7.5(22), see 7.5(18), see 7.5(19).
  44015.   File_Not_Found   11.4.2.
  44016.   File_System   11.4.2(2), see 11.4.2(2), see 11.4.2(6).
  44017.   File_Type   A.8.1(3), see A.8.4(3), see A.10.1(3), see A.8.4(3), see A.10.1(3),
  44018.          A.12.1.
  44019.   Finalization
  44020.     child of Ada   7.6.
  44021.     of a master   7.6.1.
  44022.     of a protected object   9.4(20), see C.3.1(20), see C.3.1(12).
  44023.     of a task object   J.7.1.
  44024.     of an object   7.6.1.
  44025.   Finalize   7.6(2), see 7.6(6), see 7.6(2), see 7.6(6), see 7.6(8).
  44026.   Find   E.4.2.
  44027.   Find_Token   A.4.3(16), see A.4.4(51), see A.4.5(16), see A.4.4(51), see A.4.5(46).
  44028.   Fine_Delta   13.7.
  44029.     named number in package System   13.7.
  44030.   First attribute   3.5(12), see 3.6.2(3), see K(12), see 3.6.2(3), see K(68),
  44031.             K.
  44032.   first subtype   3.2.1(6), see 3.4.1(6), see 3.4.1(5).
  44033.   First(N) attribute   3.6.2(4), see K(4), see K(66).
  44034.   first_bit   13.5.1.
  44035.     used   13.5.1(3), see P(3), see P(1).
  44036.   First_Bit attribute   13.5.2(3), see K(3), see K(72).
  44037.   Fixed
  44038.     child of Ada.Strings   A.4.3.
  44039.   fixed point type   3.5.9.
  44040.   fixed_point_definition   3.5.9.
  44041.     used   3.5.6, P(1)
  44042.   Fixed_IO   A.10.1.
  44043.   Flip_A_Coin A.5.2(58)
  44044.   Float   3.5.7(12), see 3.5.7(14), see A.1(12), see 3.5.7(14), see A.1(21).
  44045.   Float_Random
  44046.     child of Ada.Numerics   A.5.2.
  44047.   Float_Text_IO
  44048.     child of Ada   A.10.9.
  44049.   Float_Type   A.5.1.
  44050.   Float_Wide_Text_IO
  44051.     child of Ada   A.11.
  44052.   Float_IO   A.10.1.
  44053.   Floating   B.4.
  44054.   floating point type   3.5.7.
  44055.   floating_point_definition   3.5.7.
  44056.     used   3.5.6(2), see P(2), see P(1).
  44057.   Floor attribute   A.5.3(30), see K(30), see K(74).
  44058.   Flush   A.10.1(21), see A.12.1(21), see A.12.1(25).
  44059.   Fore attribute   3.5.10(4), see K(4), see K(78).
  44060.   form   A.8.1(9), see A.8.4(9), see A.10.1(9), see A.8.4(9), see A.10.1(12),
  44061.       A.12.1.
  44062.     of an external file   A.7.
  44063.   formal object, generic   12.4.
  44064.   formal package, generic   12.7.
  44065.   formal parameter
  44066.     of a subprogram   6.1.
  44067.   formal subprogram, generic   12.6.
  44068.   formal subtype   12.5.
  44069.   formal type   12.5.
  44070.   formal_access_type_definition   12.5.4.
  44071.     used   12.5(3), see P(3), see P(1).
  44072.   formal_array_type_definition   12.5.3.
  44073.     used   12.5(3), see P(3), see P(1).
  44074.   formal_decimal_fixed_point_definition   12.5.2.
  44075.     used   12.5(3), see P(3), see P(1).
  44076.   formal_derived_type_definition   12.5.1.
  44077.     used   12.5(3), see P(3), see P(1).
  44078.   formal_discrete_type_definition   12.5.2.
  44079.     used   12.5(3), see P(3), see P(1).
  44080.   formal_floating_point_definition   12.5.2.
  44081.     used   12.5(3), see P(3), see P(1).
  44082.   formal_modular_type_definition   12.5.2.
  44083.     used   12.5(3), see P(3), see P(1).
  44084.   formal_object_declaration   12.4.
  44085.     used   12.1(6), see P(6), see P(1).
  44086.   formal_ordinary_fixed_point_definition   12.5.2.
  44087.     used   12.5(3), see P(3), see P(1).
  44088.   formal_package_actual_part   12.7.
  44089.     used   12.7(2), see P(2), see P(1).
  44090.   formal_package_declaration   12.7.
  44091.     used   12.1(6), see P(6), see P(1).
  44092.   formal_part   6.1.
  44093.     used   6.1(12), see 6.1(13), see P(12), see 6.1(13), see P(1).
  44094.   formal_private_type_definition   12.5.1.
  44095.     used   12.5(3), see P(3), see P(1).
  44096.   formal_signed_integer_type_definition   12.5.2.
  44097.     used   12.5(3), see P(3), see P(1).
  44098.   formal_subprogram_declaration   12.6.
  44099.     used   12.1(6), see P(6), see P(1).
  44100.   formal_type_declaration   12.5.
  44101.     used   12.1(6), see P(6), see P(1).
  44102.   formal_type_definition   12.5.
  44103.     used   12.5(2), see P(2), see P(1).
  44104.   format_effector   2.1.
  44105.     used   2.1(2), see P(2), see P(1).
  44106.   Fortran
  44107.     child of Interfaces   B.5.
  44108.   Fortran interface   B.5.
  44109.   FORTRAN standard   1.2.
  44110.   Fortran_Character   B.5.
  44111.   Fortran_Integer   B.5.
  44112.   Fortran_Library   B.1.
  44113.   Fortran_Matrix   B.5.
  44114.   Fraction   3.5.9.
  44115.   Fraction attribute   A.5.3(21), see K(21), see K(80).
  44116.   Fraction_One_Half   A.3.3.
  44117.   Fraction_One_Quarter   A.3.3.
  44118.   Fraction_Three_Quarters   A.3.3.
  44119.   Free   13.11.2(5), see A.4.5(7), see B.3.1(5), see A.4.5(7), see B.3.1(11).
  44120.   freed
  44121.     See nonexistent   13.11.2.
  44122.   freeing storage   13.11.2.
  44123.   freezing
  44124.     by a constituent of a construct   13.14.
  44125.     by an expression   13.14.
  44126.     class-wide type caused by the freezing of the specific type
  44127.        13.14.
  44128.     constituents of a full type definition   13.14.
  44129.     designated subtype caused by an allocator   13.14.
  44130.     entity   13.14.
  44131.     entity caused by a body   13.14.
  44132.     entity caused by a construct   13.14.
  44133.     entity caused by a name   13.14.
  44134.     entity caused by the end of an enclosing construct
  44135.        13.14.
  44136.     first subtype caused by the freezing of the type
  44137.        13.14.
  44138.     function call   13.14.
  44139.     generic_instantiation   13.14.
  44140.     nominal subtype caused by a name   13.14.
  44141.     object_declaration   13.14.
  44142.     specific type caused by the freezing of the class-wide type
  44143.        13.14.
  44144.     subtype caused by a record extension   13.14.
  44145.     subtypes of the profile of a callable entity   13.14.
  44146.     type caused by a range   13.14.
  44147.     type caused by an expression   13.14.
  44148.     type caused by the freezing of a subtype   13.14.
  44149.   freezing points
  44150.     entity   13.14.
  44151.   FS   A.3.3(6), see J.5(6), see J.5(4).
  44152.   full conformance
  44153.     for discrete_subtype_definitions   6.3.1.
  44154.     for known_discriminant_parts   6.3.1.
  44155.     for expressions   6.3.1.
  44156.     for profiles   6.3.1.
  44157.     required   3.10.1(4), see 6.3(4),    7.3(4), see 6.3(4),    7.3(9),
  44158.           8.5.4(5),  9.5.2(14),  9.5.2(5),  9.5.2(14),  9.5.2(16),
  44159.           9.5.2(17), see 10.1.3(11), see 10.1.3(17), see 10.1.3(11), see 10.1.3(12).
  44160.   full constant declaration   3.3.1.
  44161.   full declaration   7.4.
  44162.   full stop   2.1.
  44163.   full type   3.2.1.
  44164.   full type definition   3.2.1.
  44165.   full view
  44166.     of a type   7.3.
  44167.   Full_Stop   A.3.3.
  44168.   full_type_declaration   3.2.1.
  44169.     used   3.2.1(2), see P(2), see P(1).
  44170.   function   6.
  44171.   function instance   12.3.
  44172.   function_call   6.4.
  44173.     used   4.1(2), see P(2), see P(1).
  44174.  
  44175.  
  44176. ΓòÉΓòÉΓòÉ 37. index ΓòÉΓòÉΓòÉ
  44177.  
  44178.   gaps  13.1.
  44179.   garbage collection   13.11.3.
  44180.   Gender   3.5.1.
  44181.   general access type   3.10(7), see 3.10(7), see 3.10(8).
  44182.   general_access_modifier   3.10.
  44183.     used   3.10(3), see P(3), see P(1).
  44184.   generation
  44185.     of an interrupt   C.3.
  44186.   Generator   A.5.2(7), see A.5.2(7), see A.5.2(19).
  44187.   generic actual   12.3.
  44188.   generic actual parameter   12.3.
  44189.   generic actual subtype   12.5.
  44190.   generic actual type   12.5.
  44191.   generic body   12.2.
  44192.   generic contract issue   10.2.1.
  44193.     [partial]   3.9.1(3),   3.10.2(3),   3.10.2(28),
  44194.           3.10.2(32), see 4.6(32), see 4.6(17),
  44195.           4.6(20),   8.3(20),   8.3(26),
  44196.           10.2.1.
  44197.   generic formal   12.1.
  44198.   generic formal object   12.4.
  44199.   generic formal package   12.7.
  44200.   generic formal subprogram   12.6.
  44201.   generic formal subtype   12.5.
  44202.   generic formal type   12.5.
  44203.   generic function   12.1.
  44204.   generic package   12.1.
  44205.   generic procedure   12.1.
  44206.   generic subprogram   12.1.
  44207.   generic unit   12(1), see N(1), see N(20).
  44208.     See also dispatching operation   3.9.
  44209.   generic_actual_part   12.3.
  44210.     used   12.3(2), see 12.7(3), see P(2), see 12.7(3), see P(1).
  44211.   generic_association   12.3.
  44212.     used   12.3(3), see P(3), see P(1).
  44213.   Generic_Bounded_Length   A.4.4.
  44214.   Generic_Complex_Elementary_Functions
  44215.     child of Ada.Numerics   G.1.2.
  44216.   Generic_Complex_Types
  44217.     child of Ada.Numerics   G.1.1.
  44218.   generic_declaration   12.1.
  44219.     used   3.1(3), see 10.1.1(5), see P(3), see 10.1.1(5), see P(1).
  44220.   Generic_Elementary_Functions
  44221.     child of Ada.Numerics   A.5.1.
  44222.   generic_formal_parameter_declaration   12.1.
  44223.     used   12.1(5), see P(5), see P(1).
  44224.   generic_formal_part   12.1.
  44225.     used   12.1(3), see 12.1(4), see P(3), see 12.1(4), see P(1).
  44226.   generic_instantiation   12.3.
  44227.     used   3.1(3), see 10.1.1(5), see P(3), see 10.1.1(5), see P(1).
  44228.   generic_package_declaration   12.1.
  44229.     used   12.1(2), see P(2), see P(1).
  44230.   generic_renaming_declaration   8.5.5.
  44231.     used   8.5(2), see 10.1.1(6), see P(2), see 10.1.1(6), see P(1).
  44232.   generic_subprogram_declaration   12.1.
  44233.     used   12.1(2), see P(2), see P(1).
  44234.   Get   10.1.1(30), see A.10.1(41), see A.10.1(30), see A.10.1(41), see A.10.1(47),
  44235.       A.10.1(54), see A.10.1(55), see A.10.1(54), see A.10.1(55), see A.10.1(59),
  44236.       A.10.1(60), see A.10.1(65), see A.10.1(60), see A.10.1(65), see A.10.1(67),
  44237.       A.10.1(70), see A.10.1(72), see A.10.1(70), see A.10.1(72), see A.10.1(75),
  44238.       A.10.1(77), see A.10.1(81), see A.10.1(77), see A.10.1(81), see A.10.1(83),
  44239.       G.1.3(6),   G.1.3(6),   G.1.3(8).
  44240.   Get_Immediate   A.10.1(44), see A.10.1(44), see A.10.1(45).
  44241.   Get_Key   7.3.1(15), see 7.3.1(15), see 7.3.1(16).
  44242.   Get_Line   A.10.1.
  44243.   Get_Priority   D.5.
  44244.   Global   9.3.
  44245.   global to   8.1.
  44246.   Glossary   N.
  44247.   goto_statement   5.8.
  44248.     used   5.1(4), see P(4), see P(1).
  44249.   govern a variant_part   3.8.1.
  44250.   govern a variant   3.8.1.
  44251.   grammar
  44252.     complete listing   P.
  44253.     cross reference   P.
  44254.     notation   1.1.4.
  44255.     resolution of ambiguity   8.6.
  44256.     under Syntax heading   1.1.2.
  44257.   graphic character
  44258.     a category of Character   A.3.2.
  44259.   graphic_character   2.1.
  44260.     used   2.1(2), see 2.5(2), see 2.6(3), see P(2), see 2.5(2), see 2.6(3), see P(1).
  44261.   Graphic_Set   A.4.6.
  44262.   greater than operator   4.4(1), see 4.5.2(1), see 4.5.2(1).
  44263.   greater than or equal operator   4.4(1), see 4.5.2(1), see 4.5.2(1).
  44264.   greater-than sign   2.1.
  44265.   Greater_Than_Sign   A.3.3.
  44266.   GS   A.3.3.
  44267.   guard   9.7.1.
  44268.     used   9.7.1(2), see P(2), see P(1).
  44269.  
  44270.  
  44271. ΓòÉΓòÉΓòÉ 38. index ΓòÉΓòÉΓòÉ
  44272.  
  44273.   Half_Pi   4.9.
  44274.   handle
  44275.     an exception   11(1), see N(1), see N(18).
  44276.     an exception occurrence   11.4(1), see 11.4(1), see 11.4(7).
  44277.   handled_sequence_of_statements   11.2.
  44278.     used   5.6(2), see 6.3(2),   7.2(2), see 6.3(2),   7.2(2),
  44279.         9.1(6), see 9.5.2(3), see 9.5.2(6), see 9.5.2(3), see 9.5.2(5),
  44280.         P.
  44281.   Handler   C.3.2.
  44282.   Handling
  44283.     child of Ada.Characters   A.3.2.
  44284.   Hash_Index   3.5.4.
  44285.   head (of a queue)   D.2.1.
  44286.   Head   A.4.3(35), see A.4.3(36), see A.4.4(35), see A.4.3(36), see A.4.4(70),
  44287.       A.4.4(71), see A.4.5(65), see A.4.5(71), see A.4.5(65), see A.4.5(66).
  44288.   heap management
  44289.     See also alligator   4.8.
  44290.     user-defined   13.11.
  44291.   held priority   D.11.
  44292.   Hello   3.3.1.
  44293.   heterogeneous input-output   A.12.1.
  44294.   Hexa   3.5.1.
  44295.   hexadecimal
  44296.     literal   2.4.2.
  44297.   hexadecimal digit
  44298.     a category of Character   A.3.2.
  44299.   hexadecimal literal   2.4.2.
  44300.   Hexadecimal_Digit_Set   A.4.6.
  44301.   hidden from all visibility   8.3(5), see 8.3(5), see 8.3(14).
  44302.     by lack of a with_clause   8.3.
  44303.     for a declaration completed by a subsequent declaration
  44304.        8.3.
  44305.     for overridden declaration   8.3.
  44306.     within the declaration itself   8.3.
  44307.   hidden from direct visibility   8.3(5), see 8.3(5), see 8.3(21).
  44308.     by an inner homograph   8.3.
  44309.     where hidden from all visibility   8.3.
  44310.   hiding   8.3.
  44311.   High_Order_First   13.5.3(2), see B.4(2), see B.4(25).
  44312.   highest precedence operator   4.5.6.
  44313.   highest_precedence_operator   4.5.
  44314.   Hold   D.11.
  44315.   homograph   8.3.
  44316.   HT   A.3.3.
  44317.   HTJ   A.3.3.
  44318.   HTS   A.3.3.
  44319.   Hyphen   A.3.3.
  44320.   hyphen-minus   2.1.
  44321.  
  44322.  
  44323. ΓòÉΓòÉΓòÉ 39. index ΓòÉΓòÉΓòÉ
  44324.  
  44325.   i  G.1.1(5), see G.1.1(5), see G.1.1(23).
  44326.   identifier   2.3.
  44327.     used   2.8(2),   2.8(3),   2.8(2),   2.8(3),   2.8(21),
  44328.         2.8(23),  3.1(4),   4.1(23),  3.1(4),   4.1(3),
  44329.         4.1.3(3), see 4.1.4(3), see 5.5(3), see 4.1.4(3), see 5.5(2),
  44330.         5.6(2),   6.1(5),   7.1(2),   6.1(5),   7.1(3),
  44331.         7.2(2),   9.1(4),   9.1(2),   9.1(4),   9.1(6),
  44332.         9.4(4),   9.4(7),   9.5.2(4),   9.4(7),   9.5.2(3),
  44333.         9.5.2(5), see 11.5(4),  13.12(5), see 11.5(4),  13.12(4),
  44334.         B.1(5),   B.1(6),   B.1(5),   B.1(6),   B.1(7),
  44335.         D.2.2(2), see D.2.2(3), see D.3(2), see D.2.2(3), see D.3(3),
  44336.         D.3(4),   D.4(3),   D.4(4),   D.4(3),   D.4(4),
  44337.         L(8),    L(13),   L(8),    L(13),   L(14),
  44338.         L(20),   L(21),   L(20),   L(21),   L(23),
  44339.         L(29),   L(36),   L(29),   L(36),   L(37),
  44340.         M(95),   M(98),   P(95),   M(98),   P(1).
  44341.   identifier specific to a pragma   2.8.
  44342.   identifier_letter   2.1.
  44343.     used   2.1(3), see 2.3(2), see 2.3(3), see P(3), see 2.3(2), see 2.3(3), see P(1).
  44344.   Identity   A.4.2(22), see A.4.7(22), see A.4.7(22).
  44345.   Identity attribute   11.4.1(9), see C.7.1(9), see C.7.1(12),
  44346.              K(84),    K(84),    K(86).
  44347.   idle task   D.11.
  44348.   if_statement   5.3.
  44349.     used   5.1(5), see P(5), see P(1).
  44350.   illegal
  44351.     construct   1.1.2.
  44352.     partition   1.1.2.
  44353.   Im   G.1.1.
  44354.   image   A.5.2(14), see A.5.2(26), see C.7.1(14), see A.5.2(26), see C.7.1(3),
  44355.        F.3.3.
  44356.     of a value   3.5(30), see K(30), see K(273).
  44357.   Image attribute   3.5(35), see K(35), see K(88).
  44358.   Imaginary   B.5(10), see G.1.1(4), see G.1.1(10), see G.1.1(4), see G.1.1(23).
  44359.   immediate scope
  44360.     of (a view of) an entity   8.2.
  44361.     of a declaration   8.2.
  44362.   immediately enclosing   8.1.
  44363.   immediately visible   8.3(4), see 8.3(4), see 8.3(21).
  44364.   immediately within 8.1(13)
  44365.   implementation advice   1.1.2.
  44366.   implementation defined   1.1.3.
  44367.     summary of characteristics   M.
  44368.   implementation permissions   1.1.2.
  44369.   implementation requirements   1.1.2.
  44370.   implementation-dependent
  44371.     See unspecified   1.1.3.
  44372.   implicit declaration   3.1(5), see N(5), see N(11).
  44373.   implicit initial values
  44374.     for a subtype   3.3.1.
  44375.   implicit subtype conversion   4.6(59), see 4.6(59), see 4.6(60).
  44376.     Access attribute   3.10.2.
  44377.     access discriminant   3.7.
  44378.     array bounds   4.6.
  44379.     array index   4.1.1.
  44380.     assignment to view conversion   4.6.
  44381.     assignment_statement   5.2.
  44382.     bounds of a decimal fixed point type   3.5.9.
  44383.     bounds of a fixed point type   3.5.9.
  44384.     bounds of a floating point type   3.5.7.
  44385.     bounds of a range   3.5(9), see 3.6(9), see 3.6(18).
  44386.     bounds of signed integer type   3.5.4.
  44387.     choices of aggregate   4.3.3.
  44388.     component defaults   3.3.1.
  44389.     delay expression   9.6.
  44390.     derived type discriminants   3.4.
  44391.     discriminant values   3.7.1.
  44392.     entry index   9.5.2.
  44393.     expressions in aggregate   4.3.1.
  44394.     expressions of aggregate   4.3.3.
  44395.     function return   6.5.
  44396.     generic formal object of mode in 12.4(11)
  44397.     inherited enumeration literal   3.4.
  44398.     initialization expression   3.3.1.
  44399.     initialization expression of allocator   4.8.
  44400.     named number value   3.3.2.
  44401.     operand of concatenation   4.5.3.
  44402.     parameter passing   6.4.1(10), see 6.4.1(10), see 6.4.1(11),
  44403.               6.4.1.
  44404.     pragma Interrupt_Priority   D.1(17), see D.3(17), see D.3(9).
  44405.     pragma Priority   D.1(17), see D.3(17), see D.3(9).
  44406.     qualified_expression   4.7.
  44407.     reading a view conversion   4.6.
  44408.     result of inherited function   3.4.
  44409.   implicit_dereference   4.1.
  44410.     used   4.1(4), see P(4), see P(1).
  44411.   Import pragma   B.1(5), see L(5), see L(14).
  44412.   imported
  44413.     aspect of representation   B.1.
  44414.   imported entity   B.1.
  44415.   in (membership test)   4.4(1), see 4.5.2(1), see 4.5.2(2).
  44416.   inaccessible partition   E.1.
  44417.   inactive
  44418.     a task state   9.
  44419.   included
  44420.     one range in another   3.5.
  44421.   incomplete type   3.10.1.
  44422.   incomplete_type_declaration   3.10.1.
  44423.     used   3.2.1(2), see P(2), see P(1).
  44424.   Increment   6.1(37), see B.3.2(37), see B.3.2(11).
  44425.   indefinite subtype   3.3(23), see 3.7(23), see 3.7(26).
  44426.   independent subprogram   11.6.
  44427.   independently addressable   9.10.
  44428.   Index   12.1(19),  12.5.3(11), see A.4.3(19),  12.5.3(11), see A.4.3(9),
  44429.        A.4.3(10), see A.4.3(11),  A.4.4(10), see A.4.3(11),  A.4.4(44),
  44430.        A.4.4(45), see A.4.4(46),  A.4.5(45), see A.4.4(46),  A.4.5(39),
  44431.        A.4.5(40), see A.4.5(41),  A.8.4(40), see A.4.5(41),  A.8.4(15),
  44432.        A.12.1(23), see B.3.2(23), see B.3.2(4).
  44433.     of an element of an open direct file   A.8.
  44434.   index range   3.6.
  44435.   index subtype   3.6.
  44436.   index type   3.6.
  44437.   Index_Check   11.5.
  44438.     [partial]   4.1.1(7),  4.1.2(7), see 4.3.3(7),  4.1.2(7), see 4.3.3(29),
  44439.           4.3.3(30), see 4.5.3(8), see 4.6(30), see 4.5.3(8), see 4.6(51),
  44440.           4.7(4),   4.8(4),   4.8(10).
  44441.   index_constraint   3.6.1.
  44442.     used   3.2.2(7), see P(7), see P(1).
  44443.   Index_Non_Blank   A.4.3(12), see A.4.4(12), see A.4.4(47),
  44444.             A.4.5.
  44445.   index_subtype_definition   3.6.
  44446.     used   3.6(3), see P(3), see P(1).
  44447.   indexed_component   4.1.1.
  44448.     used   4.1(2), see P(2), see P(1).
  44449.   indivisible   C.6.
  44450.   information hiding
  44451.     See package   7.
  44452.     See private types and private extensions   7.3.
  44453.   information systems   C(1), see F(1), see F(1).
  44454.   informative   1.1.2.
  44455.   inheritance
  44456.     See also tagged types and type extension   3.9.
  44457.     See derived types and classes   3.4.
  44458.   inherited
  44459.     from an ancestor type   3.4.1.
  44460.   inherited component   3.4(11), see 3.4(11), see 3.4(12).
  44461.   inherited discriminant   3.4.
  44462.   inherited entry   3.4.
  44463.   inherited protected subprogram   3.4.
  44464.   inherited subprogram   3.4.
  44465.   initialization
  44466.     of a protected object   9.4(14), see C.3.1(14), see C.3.1(10),
  44467.                 C.3.1.
  44468.     of a task object   9.1(12), see J.7.1(12), see J.7.1(7).
  44469.     of an object   3.3.1.
  44470.   initialization expression   3.3.1(1), see 3.3.1(1), see 3.3.1(4).
  44471.   Initialize   7.6(2), see 7.6(6), see 7.6(2), see 7.6(6), see 7.6(8).
  44472.   Initialize_Generator   A.5.2.
  44473.   initialized allocator   4.8.
  44474.   Inline pragma   6.3.2(3), see L(3), see L(15).
  44475.   Inner   10.1.3(20), see 10.1.3(21), see 10.1.3(20), see 10.1.3(21), see 10.1.3(23),
  44476.        10.1.3.
  44477.   innermost dynamically enclosing   11.4.
  44478.   input   A.6.
  44479.   Input attribute   13.13.2(22), see 13.13.2(22), see 13.13.2(32),
  44480.             K(92),     K(92),     K(96).
  44481.   Input clause   13.3(7), see 13.13.2(7), see 13.13.2(36).
  44482.   input-output
  44483.     unspecified for access types   A.7.
  44484.   Insert   A.4.3(25), see A.4.3(26), see A.4.4(25), see A.4.3(26), see A.4.4(60),
  44485.        A.4.4(61), see A.4.5(55), see A.4.5(61), see A.4.5(55), see A.4.5(56).
  44486.   inspectable object   H.3.2.
  44487.   inspection point   H.3.2.
  44488.   Inspection_Point pragma   H.3.2(3), see L(3), see L(16).
  44489.   instance
  44490.     of a generic function   12.3.
  44491.     of a generic package   12.3.
  44492.     of a generic procedure   12.3.
  44493.     of a generic subprogram   12.3.
  44494.     of a generic unit   12.3.
  44495.   instructions for comment submission
  44496.   Int   3.2.2(15), see 12.5(13), see B.3(15), see 12.5(13), see B.3(7).
  44497.   Int_Plus   8.5.4.
  44498.   Int_Vectors   12.3.
  44499.   Int_IO   A.10.8.
  44500.   Integer   3.5.4(11), see 3.5.4(21), see A.1(11), see 3.5.4(21), see A.1(12).
  44501.   integer literal   2.4.
  44502.   integer literals   3.5.4(14), see 3.5.4(14), see 3.5.4(30).
  44503.   integer type   3.5.4(1), see N(1), see N(21).
  44504.   Integer_Address   13.7.1.
  44505.   Integer_Text_IO
  44506.     child of Ada   A.10.8.
  44507.   integer_type_definition   3.5.4.
  44508.     used   3.2.1(4), see P(4), see P(1).
  44509.   Integer_Wide_Text_IO
  44510.     child of Ada   A.11.
  44511.   Integer_IO   A.10.1.
  44512.   interaction
  44513.     between tasks   9.
  44514.   interface to assembly language   C.1.
  44515.   interface to C   B.3.
  44516.   interface to COBOL   B.4.
  44517.   interface to Fortran   B.5.
  44518.   interface to other languages   B.
  44519.   Interfaces   B.2.
  44520.   Interfaces.COBOL   B.4.
  44521.   Interfaces.Fortran   B.5.
  44522.   Interfaces.C   B.3.
  44523.   Interfaces.C.Pointers   B.3.2.
  44524.   Interfaces.C.Strings   B.3.1.
  44525.   interfacing pragma   B.1.
  44526.     Convention   B.1.
  44527.     Export   B.1.
  44528.     Import   B.1.
  44529.   internal call   9.5.
  44530.   internal code   13.4.
  44531.   internal requeue   9.5.
  44532.   Internal_Tag   3.9.
  44533.   interpretation
  44534.     of a complete context   8.6.
  44535.     of a constituent of a complete context   8.6.
  44536.     overload resolution   8.6.
  44537.   interrupt   C.3.
  44538.     example using asynchronous_select   9.7.4,
  44539.                       9.7.4.
  44540.   interrupt entry   J.7.1.
  44541.   interrupt handler   C.3.
  44542.   Interrupt_Handler   J.7.1.
  44543.   Interrupt_Handler pragma   C.3.1(2), see L(2), see L(17).
  44544.   Interrupt_Priority   13.7(16), see D.1(16), see D.1(10).
  44545.   Interrupt_Priority pragma   D.1(5), see L(5), see L(18).
  44546.   Interrupt_ID   C.3.2.
  44547.   Interrupts
  44548.     child of Ada   C.3.2.
  44549.   Intersection   3.9.3.
  44550.   intertask communication   9.5.
  44551.     See also task   9.
  44552.   Intrinsic calling convention   6.3.1.
  44553.   invalid representation   13.9.1.
  44554.   Invert   B.5.
  44555.   Inverted_Exclamation   A.3.3.
  44556.   Inverted_Question   A.3.3.
  44557.   IO_Exceptions   J.1.
  44558.     child of Ada   A.13.
  44559.   IO_Package   7.5(18), see 7.5(18), see 7.5(20).
  44560.   Is_Alphanumeric   A.3.2.
  44561.   Is_Attached   C.3.2.
  44562.   Is_Basic   A.3.2.
  44563.   Is_Callable   C.7.1.
  44564.   Is_Character   A.3.2.
  44565.   Is_Control   A.3.2.
  44566.   Is_Decimal_Digit   A.3.2.
  44567.   Is_Digit   A.3.2.
  44568.   Is_Graphic   A.3.2.
  44569.   Is_Held   D.11.
  44570.   Is_Hexadecimal_Digit   A.3.2.
  44571.   Is_ISO_646   A.3.2.
  44572.   Is_Letter   A.3.2.
  44573.   Is_Lower   A.3.2.
  44574.   Is_Open   A.8.1(10), see A.8.4(10), see A.10.1(10), see A.8.4(10), see A.10.1(13),
  44575.         A.12.1.
  44576.   Is_Reserved   C.3.2.
  44577.   Is_Special   A.3.2.
  44578.   Is_String   A.3.2.
  44579.   Is_Subset   A.4.2(14), see A.4.7(14), see A.4.7(14).
  44580.   Is_Terminated   C.7.1.
  44581.   Is_Upper   A.3.2.
  44582.   Is_In   A.4.2(13), see A.4.7(13), see A.4.7(13).
  44583.   ISO 10646   3.5.2(2), see 3.5.2(2), see 3.5.2(3).
  44584.   ISO 1989:1985   1.2.
  44585.   ISO/IEC 10646-1:1993   1.2.
  44586.   ISO/IEC 1539:1991   1.2.
  44587.   ISO/IEC 6429:1992   1.2.
  44588.   ISO/IEC 646:1991   1.2.
  44589.   ISO/IEC 8859-1:1987   1.2.
  44590.   ISO/IEC 9899:1990   1.2.
  44591.   ISO_646   A.3.2.
  44592.   ISO_646_Set   A.4.6.
  44593.   issue
  44594.     an entry call   9.5.3.
  44595.   italics
  44596.     nongraphic characters   3.5.2.
  44597.     pseudo-names of anonymous types   3.2.1(7), see A.1(7), see A.1(2).
  44598.     syntax rules   1.1.4.
  44599.     terms introduced or defined   1.3.
  44600.   Item   3.7(37),  12.1(19), see 12.1(37),  12.1(19), see 12.1(22),
  44601.       12.1(24), see 12.5(12), see 12.5.3(24), see 12.5(12), see 12.5.3(11),
  44602.       12.8(3),  12.8(3),  12.8(14).
  44603.   Iterate   12.6.
  44604.   iteration_scheme   5.5.
  44605.     used   5.5(2), see P(2), see P(1).
  44606.  
  44607.  
  44608. ΓòÉΓòÉΓòÉ 40. index ΓòÉΓòÉΓòÉ
  44609.  
  44610.   j  G.1.1(5), see G.1.1(5), see G.1.1(23).
  44611.  
  44612.  
  44613. ΓòÉΓòÉΓòÉ 41. index ΓòÉΓòÉΓòÉ
  44614.  
  44615.   Key  7.3(22), see 7.3.1(22), see 7.3.1(15).
  44616.   Key_Manager   7.3.1(15), see 7.3.1(15), see 7.3.1(16).
  44617.   Keyboard   9.1.
  44618.   Keyboard_Driver   9.1.
  44619.   Kilo   4.9.
  44620.   known discriminants   3.7.
  44621.   known_discriminant_part   3.7.
  44622.     used   3.2.1(3), see 3.7(2), see 9.1(3), see 3.7(2), see 9.1(2),
  44623.         9.4(2),   P(2),   P(1).
  44624.  
  44625.  
  44626. ΓòÉΓòÉΓòÉ 42. index ΓòÉΓòÉΓòÉ
  44627.  
  44628.   L_Brace   J.5.
  44629.   L_Bracket   J.5.
  44630.   label   5.1.
  44631.     used   5.1(3), see P(3), see P(1).
  44632.   language
  44633.     interface to assembly   C.1.
  44634.     interface to non-Ada   B.
  44635.   language-defined check   11.5(2), see 11.6(2), see 11.6(1).
  44636.   language-defined class
  44637.     [partial]   3.2.
  44638.     of types   3.2.
  44639.   Language-Defined Library Units   A.
  44640.     Ada   A.2.
  44641.     Ada.Asynchronous_Task_Control   D.11.
  44642.     Ada.Calendar   9.6.
  44643.     Ada.Characters   A.3.1.
  44644.     Ada.Characters.Handling   A.3.2.
  44645.     Ada.Characters.Latin_1   A.3.3.
  44646.     Ada.Command_Line   A.15.
  44647.     Ada.Decimal   F.2.
  44648.     Ada.Direct_IO   A.8.4(2), see A.9(2), see A.9(3).
  44649.     Ada.Dynamic_Priorities   D.5.
  44650.     Ada.Exceptions   11.4.1.
  44651.     Ada.Finalization   7.6.
  44652.     Ada.Float_Text_IO   A.10.9.
  44653.     Ada.Float_Wide_Text_IO   A.11.
  44654.     Ada.Integer_Text_IO   A.10.8.
  44655.     Ada.Integer_Wide_Text_IO   A.11.
  44656.     Ada.Interrupts   C.3.2.
  44657.     Ada.Interrupts.Names   C.3.2.
  44658.     Ada.IO_Exceptions   A.13.
  44659.     Ada.Numerics   A.5.
  44660.     Ada.Numerics.Complex_Elementary_Functions   G.1.2.
  44661.     Ada.Numerics.Complex_Types   G.1.1.
  44662.     Ada.Numerics.Discrete_Random   A.5.2.
  44663.     Ada.Numerics.Elementary_Functions   A.5.1.
  44664.     Ada.Numerics.Float_Random   A.5.2.
  44665.     Ada.Numerics.Generic_Complex_Elementary_Functions
  44666.        G.1.2.
  44667.     Ada.Numerics.Generic_Complex_Types   G.1.1.
  44668.     Ada.Numerics.Generic_Elementary_Functions   A.5.1.
  44669.     Ada.Real_Time   D.8.
  44670.     Ada.Sequential_IO   A.8.1.
  44671.     Ada.Storage_IO   A.9.
  44672.     Ada.Streams   13.13.1.
  44673.     Ada.Streams.Stream_IO   A.12.1.
  44674.     Ada.Strings   A.4.1.
  44675.     Ada.Strings.Bounded   A.4.4.
  44676.     Ada.Strings.Fixed   A.4.3.
  44677.     Ada.Strings.Maps   A.4.2.
  44678.     Ada.Strings.Maps.Constants   A.4.6.
  44679.     Ada.Strings.Unbounded   A.4.5.
  44680.     Ada.Strings.Wide_Bounded   A.4.7.
  44681.     Ada.Strings.Wide_Fixed   A.4.7.
  44682.     Ada.Strings.Wide_Maps   A.4.7.
  44683.     Ada.Strings.Wide_Maps.Wide_Constants   A.4.7.
  44684.     Ada.Strings.Wide_Unbounded   A.4.7.
  44685.     Ada.Synchronous_Task_Control   D.10.
  44686.     Ada.Tags   3.9.
  44687.     Ada.Task_Attributes   C.7.2.
  44688.     Ada.Task_Identification   C.7.1.
  44689.     Ada.Text_IO   A.10.1.
  44690.     Ada.Text_IO.Complex_IO   G.1.3.
  44691.     Ada.Text_IO.Editing   F.3.3.
  44692.     Ada.Text_IO.Text_Streams   A.12.2.
  44693.     Ada.Unchecked_Conversion   13.9.
  44694.     Ada.Unchecked_Deallocation   13.11.2.
  44695.     Ada.Wide_Text_IO   A.11.
  44696.     Ada.Wide_Text_IO.Complex_IO   G.1.4.
  44697.     Ada.Wide_Text_IO.Editing   F.3.4.
  44698.     Ada.Wide_Text_IO.Text_Streams   A.12.3.
  44699.     Interfaces   B.2.
  44700.     Interfaces.C   B.3.
  44701.     Interfaces.C.Pointers   B.3.2.
  44702.     Interfaces.C.Strings   B.3.1.
  44703.     Interfaces.COBOL   B.4.
  44704.     Interfaces.Fortran   B.5.
  44705.     Standard   A.1.
  44706.     System   13.7.
  44707.     System.Address_To_Access_Conversions   13.7.2.
  44708.     System.Machine_Code   13.8.
  44709.     System.RPC   E.5.
  44710.     System.Storage_Elements   13.7.1.
  44711.     System.Storage_Pools   13.11.
  44712.   Language-Defined Types
  44713.     Address, in System   13.7.
  44714.     Alignment, in Ada.Strings   A.4.1.
  44715.     Alphanumeric, in Interfaces.COBOL   B.4.
  44716.     Attribute_Handle, in Ada.Task_Attributes   C.7.2.
  44717.     Binary, in Interfaces.COBOL   B.4.
  44718.     Binary_Format, in Interfaces.COBOL   B.4.
  44719.     Bit_Order, in System   13.7.
  44720.     Boolean, in Standard   A.1.
  44721.     Bounded_String, in Ada.Strings.Bounded.Generic_Bounded_Length
  44722.        A.4.4.
  44723.     Byte, in Interfaces.COBOL   B.4.
  44724.     Byte_Array, in Interfaces.COBOL   B.4.
  44725.     C_float, in Interfaces.C   B.3.
  44726.     char, in Interfaces.C   B.3.
  44727.     char_array, in Interfaces.C   B.3.
  44728.     char_array_access, in Interfaces.C   B.3.1.
  44729.     Character, in Standard   A.1.
  44730.     Character_Set, in Ada.Strings.Maps   A.4.2.
  44731.     chars_ptr, in Interfaces.C   B.3.1.
  44732.     chars_ptr_array, in Interfaces.C   B.3.1.
  44733.     COBOL_Character, in Interfaces.COBOL   B.4.
  44734.     Complex, in Ada.Numerics.Generic_Complex_Types   G.1.1.
  44735.     Controlled, in Ada.Finalization   7.6.
  44736.     Count, in Ada.Direct_IO   A.8.4.
  44737.     Count, in Ada.Text_IO   A.10.1.
  44738.     Decimal_Element, in Interfaces.COBOL   B.4.
  44739.     Direction, in Ada.Strings   A.4.1.
  44740.     Display_Format, in Interfaces.COBOL   B.4.
  44741.     double, in Interfaces.C   B.3.
  44742.     Duration, in Standard   A.1.
  44743.     Exception_Occurrence, in Ada.Exceptions   11.4.1.
  44744.     Exception_Occurrence_Access, in Ada.Exceptions   11.4.1.
  44745.     Exception_Id, in Ada.Exceptions   11.4.1.
  44746.     File_Mode, in Ada.Direct_IO   A.8.4.
  44747.     File_Mode, in Ada.Sequential_IO   A.8.1.
  44748.     File_Mode, in Ada.Text_IO   A.10.1.
  44749.     File_Type, in Ada.Direct_IO   A.8.4.
  44750.     File_Type, in Ada.Sequential_IO   A.8.1.
  44751.     File_Type, in Ada.Text_IO   A.10.1.
  44752.     Float, in Standard   A.1.
  44753.     Floating, in Interfaces.COBOL   B.4.
  44754.     Generator, in Ada.Numerics.Discrete_Random   A.5.2.
  44755.     Generator, in Ada.Numerics.Float_Random   A.5.2.
  44756.     Imaginary, in Ada.Numerics.Generic_Complex_Types   G.1.1.
  44757.     int, in Interfaces.C   B.3.
  44758.     Integer, in Standard   A.1.
  44759.     Integer_Address, in System.Storage_Elements   13.7.1.
  44760.     Interrupt_ID, in Ada.Interrupts   C.3.2.
  44761.     Limited_Controlled, in Ada.Finalization   7.6.
  44762.     long, in Interfaces.C   B.3.
  44763.     Long_Binary, in Interfaces.COBOL   B.4.
  44764.     long_double, in Interfaces.C   B.3.
  44765.     Long_Floating, in Interfaces.COBOL   B.4.
  44766.     Membership, in Ada.Strings   A.4.1.
  44767.     Name, in System   13.7.
  44768.     Numeric, in Interfaces.COBOL   B.4.
  44769.     Packed_Decimal, in Interfaces.COBOL   B.4.
  44770.     Packed_Format, in Interfaces.COBOL   B.4.
  44771.     Parameterless_Handler, in Ada.Interrupts   C.3.2.
  44772.     Partition_ID, in System.RPC   E.5.
  44773.     Picture, in Ada.Text_IO.Editing   F.3.3.
  44774.     Picture, in Ada.Wide_Text_IO.Editing   F.3.4.
  44775.     plain_char, in Interfaces.C   B.3.
  44776.     Pointer, in Interfaces.C.Pointers   B.3.2.
  44777.     ptrdiff_t, in Interfaces.C   B.3.
  44778.     Root_Storage_Pool, in System.Storage_Pools   13.11.
  44779.     Root_Stream_Type, in Ada.Streams   13.13.1.
  44780.     Seconds_Count, in Ada.Real_Time   D.8.
  44781.     short, in Interfaces.C   B.3.
  44782.     signed_char, in Interfaces.C   B.3.
  44783.     size_t, in Interfaces.C   B.3.
  44784.     State, in Ada.Numerics.Discrete_Random   A.5.2.
  44785.     State, in Ada.Numerics.Float_Random   A.5.2.
  44786.     Storage_Array, in System.Storage_Elements   13.7.1.
  44787.     Storage_Element, in System.Storage_Elements   13.7.1.
  44788.     Storage_Offset, in System.Storage_Elements   13.7.1.
  44789.     Stream_Access, in Ada.Streams.Stream_IO   A.12.1.
  44790.     String, in Standard   A.1.
  44791.     Suspension_Object, in Ada.Synchronous_Task_Control
  44792.        D.10.
  44793.     Tag, in Tags   3.9.
  44794.     Task_ID, in Ada.Task_Identification   C.7.1.
  44795.     Time, in Ada.Calendar   9.6.
  44796.     Time, in Ada.Real_Time   D.8.
  44797.     Time_Span, in Ada.Real_Time   D.8.
  44798.     Trim_End, in Ada.Strings   A.4.1.
  44799.     Truncation, in Ada.Strings   A.4.1.
  44800.     Type_Set, in Ada.Text_IO   A.10.1.
  44801.     Unbounded_String, in Ada.Strings.Unbounded   A.4.5.
  44802.     unsigned, in Interfaces.C   B.3.
  44803.     unsigned_char, in Interfaces.C   B.3.
  44804.     unsigned_long, in Interfaces.C   B.3.
  44805.     unsigned_short, in Interfaces.C   B.3.
  44806.     wchar_array, in Interfaces.C   B.3.
  44807.     wchar_t, in Interfaces.C   B.3.
  44808.     Wide_Character, in Standard   A.1.
  44809.     Wide_Character_Set, in Ada.Strings.Wide_Maps   A.4.7.
  44810.     Wide_String, in Standard   A.1.
  44811.   Last attribute   3.5(13), see 3.6.2(5), see K(13), see 3.6.2(5), see K(102),
  44812.            K.
  44813.   Last(N) attribute   3.6.2(6), see K(6), see K(100).
  44814.   last_bit   13.5.1.
  44815.     used   13.5.1(3), see P(3), see P(1).
  44816.   Last_Bit attribute   13.5.2(4), see K(4), see K(106).
  44817.   lateness   D.9.
  44818.   Latin-1   3.5.2.
  44819.   Latin_1
  44820.     child of Ada.Characters   A.3.3.
  44821.   layout
  44822.     aspect of representation   13.5.
  44823.   Layout_Error   A.10.1(85), see A.13(85), see A.13(4).
  44824.   LC_German_Sharp_S   A.3.3.
  44825.   LC_Icelandic_Eth   A.3.3.
  44826.   LC_Icelandic_Thorn   A.3.3.
  44827.   LC_A   A.3.3(13), see J.5(13), see J.5(8).
  44828.   LC_A_Acute   A.3.3.
  44829.   LC_A_Circumflex   A.3.3.
  44830.   LC_A_Diaeresis   A.3.3.
  44831.   LC_A_Grave   A.3.3.
  44832.   LC_A_Ring   A.3.3.
  44833.   LC_A_Tilde   A.3.3.
  44834.   LC_AE_Diphthong   A.3.3.
  44835.   LC_B   A.3.3.
  44836.   LC_C   A.3.3.
  44837.   LC_C_Cedilla   A.3.3.
  44838.   LC_D   A.3.3.
  44839.   LC_E   A.3.3.
  44840.   LC_E_Acute   A.3.3.
  44841.   LC_E_Circumflex   A.3.3.
  44842.   LC_E_Diaeresis   A.3.3.
  44843.   LC_E_Grave   A.3.3.
  44844.   LC_F   A.3.3.
  44845.   LC_G   A.3.3.
  44846.   LC_H   A.3.3.
  44847.   LC_I   A.3.3.
  44848.   LC_I_Acute   A.3.3.
  44849.   LC_I_Circumflex   A.3.3.
  44850.   LC_I_Diaeresis   A.3.3.
  44851.   LC_I_Grave   A.3.3.
  44852.   LC_J   A.3.3.
  44853.   LC_K   A.3.3.
  44854.   LC_L   A.3.3.
  44855.   LC_M   A.3.3.
  44856.   LC_N   A.3.3.
  44857.   LC_N_Tilde   A.3.3.
  44858.   LC_O   A.3.3.
  44859.   LC_O_Acute   A.3.3.
  44860.   LC_O_Circumflex   A.3.3.
  44861.   LC_O_Diaeresis   A.3.3.
  44862.   LC_O_Grave   A.3.3.
  44863.   LC_O_Oblique_Stroke   A.3.3.
  44864.   LC_O_Tilde   A.3.3.
  44865.   LC_P   A.3.3.
  44866.   LC_Q   A.3.3.
  44867.   LC_R   A.3.3.
  44868.   LC_S   A.3.3.
  44869.   LC_T   A.3.3.
  44870.   LC_U   A.3.3.
  44871.   LC_U_Acute   A.3.3.
  44872.   LC_U_Circumflex   A.3.3.
  44873.   LC_U_Diaeresis   A.3.3.
  44874.   LC_U_Grave   A.3.3.
  44875.   LC_V   A.3.3.
  44876.   LC_W   A.3.3.
  44877.   LC_X   A.3.3.
  44878.   LC_Y   A.3.3.
  44879.   LC_Y_Acute   A.3.3.
  44880.   LC_Y_Diaeresis   A.3.3.
  44881.   LC_Z   A.3.3(14), see J.5(14), see J.5(8).
  44882.   Leading_Nonseparate   B.4.
  44883.   Leading_Part attribute   A.5.3(54), see K(54), see K(108).
  44884.   Leading_Separate   B.4.
  44885.   leaving   7.6.1.
  44886.   left   7.6.1.
  44887.   left curly bracket   2.1.
  44888.   left parenthesis   2.1.
  44889.   left square bracket   2.1.
  44890.   Left_Angle_Quotation   A.3.3.
  44891.   Left_Curly_Bracket   A.3.3.
  44892.   Left_Parenthesis   A.3.3.
  44893.   Left_Square_Bracket   A.3.3.
  44894.   legal
  44895.     construct   1.1.2.
  44896.     partition   1.1.2.
  44897.   legality rules   1.1.2.
  44898.   length   A.4.4(9), see A.4.5(6), see B.4(9), see A.4.5(6), see B.4(34),
  44899.        B.4(39),  B.4(44),  F.3.3(39),  B.4(44),  F.3.3(11).
  44900.     of a dimension of an array   3.6.
  44901.     of a one-dimensional array   3.6.
  44902.   Length attribute   3.6.2(9), see K(9), see K(117).
  44903.   Length(N) attribute   3.6.2(10), see K(10), see K(115).
  44904.   Length_Check   11.5.
  44905.     [partial]   4.5.1(8), see 4.6(37), see 4.6(8), see 4.6(37), see 4.6(52).
  44906.   Length_Error   12.1.
  44907.   Length_Range   A.4.4.
  44908.   less than operator   4.4(1), see 4.5.2(1), see 4.5.2(1).
  44909.   less than or equal operator   4.4(1), see 4.5.2(1), see 4.5.2(1).
  44910.   less-than sign   2.1.
  44911.   Less_Than_Sign   A.3.3.
  44912.   letter
  44913.     a category of Character   A.3.2.
  44914.   Letter_Set   A.4.6.
  44915.   letter_or_digit   2.3.
  44916.     used   2.3(2), see P(2), see P(1).
  44917.   Level   3.5.1.
  44918.     accessibility   3.10.2.
  44919.     library   3.10.2.
  44920.   lexical element   2.2.
  44921.   lexicographic order   4.5.2.
  44922.   LF   A.3.3(5), see J.5(5), see J.5(4).
  44923.   library   10.1.4.
  44924.     informal introduction   10.
  44925.   library level   3.10.2.
  44926.   library unit   10.1(3), see 10.1.1(9), see N(3), see 10.1.1(9), see N(22).
  44927.     informal introduction   10.
  44928.     See also  language-defined library units
  44929.   library unit pragma   10.1.5.
  44930.     All_Calls_Remote   E.2.3.
  44931.     categorization pragmas   E.2.
  44932.     Elaborate_Body   10.2.1.
  44933.     Preelaborate   10.2.1.
  44934.     Pure   10.2.1.
  44935.   library_item   10.1.1.
  44936.     used   10.1.1(3), see P(3), see P(1).
  44937.     informal introduction   10.
  44938.   library_unit_body   10.1.1.
  44939.     used   10.1.1(4), see P(4), see P(1).
  44940.   library_unit_declaration   10.1.1.
  44941.     used   10.1.1(4), see P(4), see P(1).
  44942.   library_unit_renaming_declaration   10.1.1.
  44943.     used   10.1.1(4), see P(4), see P(1).
  44944.   lifetime   3.10.2.
  44945.   Light   3.5.1.
  44946.   Limit   3.3.1(33), see 7.5(33), see 7.5(20).
  44947.   limited type   7.5(1), see 7.5(3), see N(1), see 7.5(3), see N(23).
  44948.     becoming nonlimited   7.3.1(5), see 7.5(5), see 7.5(16).
  44949.   Limited_Controlled   7.6.
  44950.   line   2.2(2), see 3.6(28), see A.10.1(2), see 3.6(28), see A.10.1(38).
  44951.   line terminator   A.10.
  44952.   Line_Length   A.10.1.
  44953.   Line_Size   3.5.4.
  44954.   Link   3.10.1(15), see 12.5.4(15), see 12.5.4(8).
  44955.   link name   B.1.
  44956.   link-time error
  44957.     See post-compilation error   1.1.2(29), see 1.1.5(29), see 1.1.5(4).
  44958.   Linker_Options pragma   B.1(8), see L(8), see L(19).
  44959.   linking
  44960.     See partition building   10.2.
  44961.   List   7.3.
  44962.   List pragma   2.8(21), see L(21), see L(20).
  44963.   literal   3.9.1(13), see 4.2(13), see 4.2(1).
  44964.     See also aggregate   4.3.
  44965.     based   2.4.2.
  44966.     decimal   2.4.1.
  44967.     numeric   2.4.
  44968.   little endian   13.5.3.
  44969.   load time   C.4.
  44970.   Local   9.3.
  44971.   local to   8.1.
  44972.   Local_Coordinate   3.4.
  44973.   local_name   13.1.
  44974.     used   13.2(3),   13.3(2),   13.4(3),   13.3(2),   13.4(2),
  44975.         13.5.1(2), see 13.5.1(3), see 13.11.3(2), see 13.5.1(3), see 13.11.3(3),
  44976.         B.1(5),   B.1(6),   B.1(5),   B.1(6),   B.1(7),
  44977.         C.5(3),   C.6(3),   C.6(3),   C.6(3),   C.6(4),
  44978.         C.6(5),   C.6(6),   E.4.1(5),   C.6(6),   E.4.1(3),
  44979.         L(3),    L(4),    L(3),    L(4),    L(5),
  44980.         L(7),    L(8),    L(7),    L(8),    L(9),
  44981.         L(13),    L(14),    L(13),    L(14),    L(24),
  44982.         L(38),    L(39),    P(38),    L(39),    P(1).
  44983.   localization   3.5.2(4), see 3.5.2(4), see 3.5.2(5).
  44984.   Lock   D.12(9), see D.12(9), see D.12(10).
  44985.   locking policy   D.3.
  44986.   Locking_Policy pragma   D.3(3), see L(3), see L(21).
  44987.   Log   A.5.1(4), see G.1.2(4), see G.1.2(3).
  44988.   Logical   B.5.
  44989.   logical operator   4.5.1.
  44990.     See also not operator   4.5.6.
  44991.   logical_operator   4.5.
  44992.   Long   4.9(43), see B.3(43), see B.3(7).
  44993.   Long_Binary   B.4.
  44994.   long_double   B.3.
  44995.   Long_Float   3.5.7(15), see 3.5.7(16), see 3.5.7(15), see 3.5.7(16), see 3.5.7(17).
  44996.   Long_Floating   B.4.
  44997.   Long_Integer   3.5.4(22), see 3.5.4(25), see 3.5.4(22), see 3.5.4(25), see 3.5.4(28).
  44998.   Look_Ahead   A.10.1.
  44999.   loop parameter   5.5.
  45000.   loop_parameter_specification   5.5.
  45001.     used   5.5(3), see P(3), see P(1).
  45002.   loop_statement   5.5.
  45003.     used   5.1(5), see P(5), see P(1).
  45004.   low line   2.1.
  45005.   low-level programming   C.
  45006.   Low_Limit   3.3.1.
  45007.   Low_Line   A.3.3.
  45008.   Low_Order_First   13.5.3(2), see B.4(2), see B.4(25).
  45009.   lower bound
  45010.     of a range   3.5.
  45011.   lower-case letter
  45012.     a category of Character   A.3.2.
  45013.   lower_case_identifier_letter   2.1.
  45014.   Lower_Case_Map   A.4.6.
  45015.   Lower_Set   A.4.6.
  45016.  
  45017.  
  45018. ΓòÉΓòÉΓòÉ 43. index ΓòÉΓòÉΓòÉ
  45019.  
  45020.   Machine attribute   A.5.3(60), see K(60), see K(119).
  45021.   machine code insertion   13.8(1), see C.1(1), see C.1(2).
  45022.   machine numbers
  45023.     of a floating point type   3.5.7.
  45024.   Machine_Code   J.1.
  45025.     child of System   13.8.
  45026.   Machine_Emax attribute   A.5.3(8), see K(8), see K(123).
  45027.   Machine_Emin attribute   A.5.3(7), see K(7), see K(125).
  45028.   Machine_Mantissa attribute   A.5.3(6), see K(6), see K(127).
  45029.   Machine_Overflows attribute   A.5.3(12), see A.5.4(12), see A.5.4(4),
  45030.                   K(129),   K(129),   K(131).
  45031.   Machine_Radix attribute   A.5.3(2), see A.5.4(2), see A.5.4(2),
  45032.                 K(133),   K(133),   K(135).
  45033.   Machine_Radix clause   13.3(7), see F.1(7), see F.1(1).
  45034.   Machine_Rounds attribute   A.5.3(11), see A.5.4(11), see A.5.4(3),
  45035.                 K(137),   K(137),   K(139).
  45036.   macro
  45037.     See generic unit   12.
  45038.   Macron   A.3.3.
  45039.   Main 10.1.1(33), see 11.4.2(10)
  45040.   main subprogram
  45041.     for a partition   10.2.
  45042.   Major   3.5.1.
  45043.   Male   3.2.2.
  45044.   malloc
  45045.     See allocator   4.8.
  45046.   Maps
  45047.     child of Ada.Strings   A.4.2.
  45048.   Mark_Release_Pool_Type   13.11.
  45049.   marshalling   E.4.
  45050.   Masculine_Ordinal_Indicator   A.3.3.
  45051.   Mask   4.7.
  45052.   Mass   3.5.7(21), see 12.5(21), see 12.5(13).
  45053.   master   7.6.1.
  45054.   match
  45055.     a character to a pattern character   A.4.2.
  45056.     a character to a pattern character, with
  45057.      respect to a character mapping function   A.4.2.
  45058.     a string to a pattern string   A.4.2.
  45059.   matching components   4.5.2.
  45060.   Matrix   3.6.
  45061.   Matrix_Rec   3.7.
  45062.   Max   3.3.2.
  45063.   Max attribute   3.5(19), see K(19), see K(141).
  45064.   Max_Base_Digits   3.5.7(6), see 13.7(6), see 13.7(8).
  45065.     named number in package System   13.7.
  45066.   Max_Binary_Modulus   3.5.4(7), see 13.7(7), see 13.7(7).
  45067.     named number in package System   13.7.
  45068.   Max_Decimal_Digits   F.2.
  45069.   Max_Delta   F.2.
  45070.   Max_Digits   3.5.7(6), see 13.7(6), see 13.7(8).
  45071.     named number in package System   13.7.
  45072.   Max_Digits_Binary   B.4.
  45073.   Max_Digits_Long_Binary   B.4.
  45074.   Max_Image_Width   A.5.2(13), see A.5.2(13), see A.5.2(25).
  45075.   Max_Int   3.5.4(14), see 13.7(14), see 13.7(6).
  45076.     named number in package System   13.7.
  45077.   Max_Length   A.4.4.
  45078.   Max_Line_Size   3.3.2.
  45079.   Max_Mantissa   13.7.
  45080.     named number in package System   13.7.
  45081.   Max_Nonbinary_Modulus   3.5.4(7), see 13.7(7), see 13.7(7).
  45082.     named number in package System   13.7.
  45083.   Max_Scale   F.2.
  45084.   Max_Size_In_Storage_Elements attribute   13.11.1,
  45085.                        K.
  45086.   maximum box error
  45087.     for a component of the result of evaluating
  45088.      a complex function   G.2.6.
  45089.   maximum line length   A.10.
  45090.   maximum page length   A.10.
  45091.   maximum relative error
  45092.     for a component of the result of evaluating
  45093.      a complex function   G.2.6.
  45094.     for the evaluation of an elementary function   G.2.4.
  45095.   Medium   13.3.
  45096.   Mega   4.9.
  45097.   Membership   A.4.1.
  45098.   membership test   4.5.2.
  45099.   Memory_Size   13.7.
  45100.   mentioned in a with_clause   10.1.2.
  45101.   message
  45102.     See dispatching call   3.9.2.
  45103.   Message_Procedure   3.10.
  45104.   method
  45105.     See dispatching subprogram   3.9.2.
  45106.   metrics   1.1.2(35), see C.3.1(15), see C.7.2(35), see C.3.1(15), see C.7.2(20),
  45107.         D(2),    D.5(13),   D.6(2),    D.5(13),   D.6(4),
  45108.         D.8(37),   D.9(9),   D.12(37),   D.9(9),   D.12(6).
  45109.   Micro_Sign   A.3.3.
  45110.   Microseconds   D.8.
  45111.   Middle_Dot   A.3.3.
  45112.   Midweek   3.4.
  45113.   Milliseconds   D.8.
  45114.   Min attribute   3.5(16), see K(16), see K(147).
  45115.   Min_Cell   6.1.
  45116.   Min_Delta   F.2.
  45117.   Min_Int   3.5.4(14), see 13.7(14), see 13.7(6).
  45118.     named number in package System   13.7.
  45119.   Min_Scale   F.2.
  45120.   Minimum   8.5.4.
  45121.   minus   2.1.
  45122.   minus operator   4.4(1), see 4.5.3(1), see 4.5.4(1), see 4.5.3(1), see 4.5.4(1).
  45123.   Mix   12.5.3.
  45124.   Mix_Code   13.4.
  45125.   Mixed   3.5.1.
  45126.   mixed-language programs   B(1), see C.1(1), see C.1(4).
  45127.   mod operator   4.4(1), see 4.5.5(1), see 4.5.5(1).
  45128.   mod_clause   J.8.
  45129.     used   13.5.1(2), see P(2), see P(1).
  45130.   mode   6.1(16),   8.5(7),  13.5.1(16),   8.5(7),  13.5.1(26),
  45131.       A.8.1(9),  A.8.4(9), see A.10.1(9),  A.8.4(9), see A.10.1(12),
  45132.       A.12.1.
  45133.     used   6.1(15), see 12.4(2), see P(15), see 12.4(2), see P(1).
  45134.   mode conformance   6.3.1.
  45135.     required   8.5.4(4), see 12.5.4(5), see 12.6(4), see 12.5.4(5), see 12.6(7),
  45136.           12.6.
  45137.   mode of operation
  45138.     nonstandard   1.1.5.
  45139.     standard   1.1.5.
  45140.   Mode_Error   A.8.1(15),  A.8.4(18), see A.10.1(15),  A.8.4(18), see A.10.1(85),
  45141.          A.12.1(26), see A.13(26), see A.13(4).
  45142.   Mode_Mask   13.5.1.
  45143.   Model attribute   A.5.3(68), see G.2.2(7), see K(68), see G.2.2(7), see K(151).
  45144.   model interval   G.2.1.
  45145.     associated with a value   G.2.1.
  45146.   model number   G.2.1.
  45147.   model-oriented attributes
  45148.     of a floating point subtype   A.5.3.
  45149.   Model_Emin attribute   A.5.3(65), see G.2.2(65), see G.2.2(4),
  45150.               K.
  45151.   Model_Epsilon attribute   A.5.3(66), see K(66), see K(157).
  45152.   Model_Mantissa attribute   A.5.3(64), see G.2.2(64), see G.2.2(3),
  45153.                 K.
  45154.   Model_Small attribute   A.5.3(67), see K(67), see K(161).
  45155.   modular type   3.5.4.
  45156.   modular_type_definition   3.5.4.
  45157.     used   3.5.4(2), see P(2), see P(1).
  45158.   Modular_IO   A.10.1.
  45159.   module
  45160.     See package   7.
  45161.   modulus   G.1.1.
  45162.     of a modular type   3.5.4.
  45163.   Modulus attribute   3.5.4(17), see K(17), see K(163).
  45164.   Money   3.5.9(28), see F.1(28), see F.1(4).
  45165.   Month   9.6.
  45166.   Month_Number   9.6.
  45167.   Move   A.4.3.
  45168.   multi-dimensional array   3.6.
  45169.   Multiplication_Sign   A.3.3.
  45170.   multiply   2.1.
  45171.   multiply operator   4.4(1), see 4.5.5(1), see 4.5.5(1).
  45172.   multiplying operator   4.5.5.
  45173.   multiplying_operator   4.5.
  45174.     used   4.4(5), see P(5), see P(1).
  45175.   MW   A.3.3.
  45176.   My_Read   13.3.
  45177.   My_Write   8.5.4(14), see 13.13.2(14), see 13.13.2(40).
  45178.  
  45179.  
  45180. ΓòÉΓòÉΓòÉ 44. index ΓòÉΓòÉΓòÉ
  45181.  
  45182.   n-dimensional array_aggregate   4.3.3.
  45183.   NAK   A.3.3.
  45184.   name   4.1(2),   13.7(4),  13.11.2(2),   13.7(4),  13.11.2(3),
  45185.       A.8.1(9), see A.8.4(9), see A.10.1(9), see A.8.4(9), see A.10.1(12),
  45186.       A.12.1.
  45187.     used   2.8(3),    3.2.2(4),   4.1(3),    3.2.2(4),   4.1(4),
  45188.         4.1(5),    4.1(6),    4.4(5),    4.1(6),    4.4(7),
  45189.         4.6(2),    5.2(2),    5.7(2),    5.2(2),    5.7(2),
  45190.         5.8(2),    6.3.2(3),   6.4(2),    6.3.2(3),   6.4(2),
  45191.         6.4(3),    6.4(6),    8.4(3),    6.4(6),    8.4(3),
  45192.         8.5.1(2),   8.5.2(2),   8.5.3(2),   8.5.2(2),   8.5.3(2),
  45193.         8.5.4(2),   8.5.5(2),   9.5.3(2),   8.5.5(2),   9.5.3(2),
  45194.         9.5.4(2),   9.8(2),    10.1.1(2),   9.8(2),    10.1.1(8),
  45195.         10.1.2(4),  10.2.1(3),  10.2.1(4),  10.2.1(3),  10.2.1(14),
  45196.         10.2.1(20), see 10.2.1(21), see 10.2.1(20), see 10.2.1(21), see 10.2.1(22),
  45197.         11.2(5),   11.3(2),   11.5(5),   11.3(2),   11.5(4),
  45198.         12.3(2),   12.3(5),   12.6(2),   12.3(5),   12.6(4),
  45199.         12.7(2),   13.1(3),   13.3(2),   13.1(3),   13.3(2),
  45200.         C.3.1(2),   C.3.1(4),   E.2.1(2),   C.3.1(4),   E.2.1(3),
  45201.         E.2.2(3),   E.2.3(3),   E.2.3(3),   E.2.3(3),   E.2.3(5),
  45202.         H.3.2(3),   L(2),     L(3),   L(2),     L(6),
  45203.         L(10),    L(11),    L(10),    L(11),    L(12),
  45204.         L(15),    L(16),    L(15),    L(16),    L(17),
  45205.         L(26),    L(28),    L(26),    L(28),    L(30),
  45206.         L(31),    L(34),    L(31),    L(34),    L(36),
  45207.         P.
  45208.     [partial]   3.1.
  45209.     of (a view of) an entity   3.1.
  45210.     of a pragma   2.8.
  45211.     of an external file   A.7.
  45212.   name resolution rules   1.1.2.
  45213.   Name_Error   A.8.1(15),  A.8.4(18), see A.10.1(15),  A.8.4(18), see A.10.1(85),
  45214.          A.12.1(26), see A.13(26), see A.13(4).
  45215.   Name_Server   E.4.2.
  45216.   named association   6.4(7), see 12.3(7), see 12.3(6).
  45217.   named component association   4.3.1.
  45218.   named discriminant association   3.7.1.
  45219.   named entry index   9.5.2.
  45220.   named number   3.3.
  45221.   named type   3.2.1.
  45222.   named_array_aggregate   4.3.3.
  45223.     used   4.3.3(2), see P(2), see P(1).
  45224.   Names
  45225.     child of Ada.Interrupts   C.3.2.
  45226.   names of special_characters   2.1.
  45227.   Nanoseconds   D.8.
  45228.   Native_Binary   B.4.
  45229.   Natural   3.5.4(12), see 3.5.4(13), see A.1(12), see 3.5.4(13), see A.1(13).
  45230.   NBH   A.3.3.
  45231.   needed
  45232.     of a compilation unit by another   10.2.
  45233.     remote call interface   E.2.3.
  45234.     shared passive library unit   E.2.1.
  45235.   needed component
  45236.     extension_aggregate record_component_association_list
  45237.        4.3.2.
  45238.     record_aggregate record_component_association_list
  45239.        4.3.1.
  45240.   NEL   A.3.3.
  45241.   new
  45242.     See allocator   4.8.
  45243.   New_Char_Array   B.3.1.
  45244.   New_Line   A.10.1.
  45245.   New_Page   A.10.1.
  45246.   New_String   B.3.1.
  45247.   New_Tape   E.4.2.
  45248.   Next   8.5.4.
  45249.   Next_Action   9.1.
  45250.   Next_Frame   6.1.
  45251.   Next_Lexeme   9.1.
  45252.   Next_Work_Item   9.1.
  45253.   Ninety_Six   3.6.3.
  45254.   No_Break_Space   A.3.3.
  45255.   Node   12.5.4.
  45256.   nominal subtype   3.3(23), see 3.3.1(23), see 3.3.1(8).
  45257.     associated with a type_conversion   4.6.
  45258.     associated with a dereference   4.1.
  45259.     associated with an indexed_component   4.1.1.
  45260.     of a component   3.6.
  45261.     of a formal parameter   6.1.
  45262.     of a generic formal object   12.4.
  45263.     of a record component   3.8.
  45264.     of the result of a function_call   6.4.
  45265.   non-normative
  45266.     See informative   1.1.2.
  45267.   nondispatching call
  45268.     on a dispatching operation   3.9.2.
  45269.   nonexistent   13.11.2(10), see 13.11.2(10), see 13.11.2(16).
  45270.   nongraphic character   3.5.
  45271.   nonlimited type   7.5.
  45272.     becoming nonlimited   7.3.1(5), see 7.5(5), see 7.5(16).
  45273.   nonstandard integer type   3.5.4.
  45274.   nonstandard mode   1.1.5.
  45275.   nonstandard real type   3.5.6.
  45276.   normal completion   7.6.1.
  45277.   normal library unit   E.2.
  45278.   normal state of an object   11.6(6), see 13.9.1(6), see 13.9.1(4).
  45279.     [partial]   9.8(21), see A.13(21), see A.13(17).
  45280.   Normalize_Scalars pragma   H.1(3), see L(3), see L(22).
  45281.   normalized exponent   A.5.3.
  45282.   normalized number   A.5.3.
  45283.   normative   1.1.2.
  45284.   not equal operator   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45285.   not in (membership test)   4.4(1), see 4.5.2(1), see 4.5.2(2).
  45286.   not operator   4.4(1), see 4.5.6(1), see 4.5.6(3).
  45287.   Not_Sign   A.3.3.
  45288.   notes   1.1.2.
  45289.   notwithstanding   10.1.6(2), see B.1(22), see B.1(2), see B.1(22), see B.1(38),
  45290.             C.3.1(19), see E.2.1(19), see E.2.1(8),
  45291.        E.2.1(11), see E.2.3(18), see J.3(11), see E.2.3(18), see J.3(6).
  45292.   NUL   A.3.3(5), see B.3(20), see J.5(5), see B.3(20), see J.5(4).
  45293.   null access value   4.2.
  45294.   null array   3.6.1.
  45295.   null constraint   3.2.
  45296.   null pointer
  45297.     See null access value   4.2.
  45298.   null range   3.5.
  45299.   null record   3.8.
  45300.   null slice   4.1.2.
  45301.   null string literal   2.6.
  45302.   null value
  45303.     of an access type   3.10.
  45304.   Null_Address   13.7.
  45305.     constant in System   13.7.
  45306.   Null_Bounded_String   A.4.4.
  45307.   Null_Key   7.3.1(15), see 7.4(15), see 7.4(13).
  45308.   Null_Occurrence   11.4.1.
  45309.   Null_Ptr   B.3.1.
  45310.   Null_Set   A.4.2(5), see A.4.7(5), see A.4.7(5).
  45311.   null_statement   5.1.
  45312.     used   5.1(4), see P(4), see P(1).
  45313.   Null_Task_ID   C.7.1.
  45314.   Null_Unbounded_String   A.4.5.
  45315.   Null_Id   11.4.1.
  45316.   Num   A.10.1(52), see A.10.1(57), see A.10.1(52), see A.10.1(57), see A.10.1(63),
  45317.       A.10.1(68), see A.10.1(73), see B.4(68), see A.10.1(73), see B.4(31),
  45318.        F.3.3.
  45319.   number sign   2.1.
  45320.   Number_Base   A.10.1(6), see A.10.8(6), see A.10.8(3).
  45321.   number_declaration   3.3.2.
  45322.     used   3.1(3), see P(3), see P(1).
  45323.   Number_Sign   A.3.3.
  45324.   numeral   2.4.1.
  45325.     used   2.4.1(2), see 2.4.1(4), see 2.4.2(2), see 2.4.1(4), see 2.4.2(3),
  45326.         P.
  45327.   Numeric   B.4.
  45328.   numeric type   3.5.
  45329.   Numeric_Error   J.6.
  45330.   numeric_literal   2.4.
  45331.     used   4.4(7), see P(7), see P(1).
  45332.   Numerics   G.
  45333.     child of Ada   A.5.
  45334.  
  45335.  
  45336. ΓòÉΓòÉΓòÉ 45. index ΓòÉΓòÉΓòÉ
  45337.  
  45338.   object  3.3(2), see 13.7.2(2), see 13.11.2(2), see 13.7.2(2), see 13.11.2(3),
  45339.        N.
  45340.     [partial]   3.2.
  45341.   object-oriented programming (OOP)
  45342.     See dispatching operations of tagged types   3.9.2.
  45343.     See tagged types and type extensions   3.9.
  45344.   object_declaration   3.3.1.
  45345.     used   3.1(3), see P(3), see P(1).
  45346.   Object_Pointer   13.7.2.
  45347.   object_renaming_declaration   8.5.1.
  45348.     used   8.5(2), see P(2), see P(1).
  45349.   obsolescent feature   J.
  45350.   occur immediately within 8.1(13)
  45351.   occurrence
  45352.     of an interrupt   C.3.
  45353.   octal
  45354.     literal   2.4.2.
  45355.   octal literal   2.4.2.
  45356.   On_Stacks   12.8.
  45357.   On_Vectors   12.1(24), see 12.2(24), see 12.2(9).
  45358.   one's complement
  45359.     modular types   3.5.4.
  45360.   one-dimensional array   3.6.
  45361.   only as a completion
  45362.     entry_body   9.5.2.
  45363.   OOP (object-oriented programming)
  45364.     See dispatching operations of tagged types   3.9.2.
  45365.     See tagged types and type extensions   3.9.
  45366.   opaque type
  45367.     See private types and private extensions   7.3.
  45368.   Open   7.5(19),   7.5(20),  11.4.2(19),   7.5(20),  11.4.2(3),
  45369.       11.4.2(6),  A.8.1(7), see A.8.4(6),  A.8.1(7), see A.8.4(7),
  45370.       A.10.1(10), see A.12.1(10), see A.12.1(9).
  45371.   open alternative   9.7.1.
  45372.   open entry   9.5.3.
  45373.     of a protected object   9.5.3.
  45374.     of a task   9.5.3.
  45375.   operand
  45376.     of a type_conversion   4.6.
  45377.     of a qualified_expression   4.7.
  45378.   operand interval   G.2.1.
  45379.   operand type
  45380.     of a type_conversion   4.6.
  45381.   operates on a type   3.2.3.
  45382.   operator   6.6.
  45383.     &   4.4(1), see 4.5.3(1), see 4.5.3(3).
  45384.     *   4.4(1), see 4.5.5(1), see 4.5.5(1).
  45385.     **   4.4(1), see 4.5.6(1), see 4.5.6(7).
  45386.     +   4.4(1), see 4.5.3(1), see 4.5.4(1), see 4.5.3(1), see 4.5.4(1).
  45387.     =   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45388.     -   4.4(1), see 4.5.3(1), see 4.5.4(1), see 4.5.3(1), see 4.5.4(1).
  45389.     /   4.4(1), see 4.5.5(1), see 4.5.5(1).
  45390.     /=   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45391.     <   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45392.     <=   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45393.     >   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45394.     >=   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45395.     abs   4.4(1), see 4.5.6(1), see 4.5.6(1).
  45396.     ampersand 4.4(1), see 4.5.3(3)
  45397.     and 4.4(1), see 4.5.1(2)
  45398.     binary   4.5.
  45399.     binary adding   4.5.3.
  45400.     concatenation   4.4(1), see 4.5.3(1), see 4.5.3(3).
  45401.     divide   4.4(1), see 4.5.5(1), see 4.5.5(1).
  45402.     equal   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45403.     equality   4.5.2.
  45404.     exponentiation   4.4(1), see 4.5.6(1), see 4.5.6(7).
  45405.     greater than   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45406.     greater than or equal   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45407.     highest precedence   4.5.6.
  45408.     less than   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45409.     less than or equal   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45410.     logical   4.5.1.
  45411.     minus   4.4(1), see 4.5.3(1), see 4.5.4(1), see 4.5.3(1), see 4.5.4(1).
  45412.     mod   4.4(1), see 4.5.5(1), see 4.5.5(1).
  45413.     multiply   4.4(1), see 4.5.5(1), see 4.5.5(1).
  45414.     multiplying   4.5.5.
  45415.     not   4.4(1), see 4.5.6(1), see 4.5.6(3).
  45416.     not equal   4.4(1), see 4.5.2(1), see 4.5.2(1).
  45417.     or   4.4(1), see 4.5.1(1), see 4.5.1(2).
  45418.     ordering   4.5.2.
  45419.     plus   4.4(1), see 4.5.3(1), see 4.5.4(1), see 4.5.3(1), see 4.5.4(1).
  45420.     predefined   4.5.
  45421.     relational   4.5.2.
  45422.     rem   4.4(1), see 4.5.5(1), see 4.5.5(1).
  45423.     times   4.4(1), see 4.5.5(1), see 4.5.5(1).
  45424.     unary   4.5.
  45425.     unary adding   4.5.4.
  45426.     user-defined   6.6.
  45427.     xor   4.4(1), see 4.5.1(1), see 4.5.1(2).
  45428.   operator precedence   4.5.
  45429.   operator_symbol   6.1.
  45430.     used   4.1(3),  4.1.3(3), see 6.1(3),  4.1.3(3), see 6.1(5),
  45431.         6.1(11), see P(11), see P(1).
  45432.   optimization   11.5(29), see 11.6(29), see 11.6(1).
  45433.   Optimize pragma   2.8(23), see L(23), see L(23).
  45434.   Option   12.5.3.
  45435.   or else (short-circuit control form)   4.4,
  45436.                       4.5.1.
  45437.   or operator   4.4(1), see 4.5.1(1), see 4.5.1(2).
  45438.   ordering operator   4.5.2.
  45439.   ordinary fixed point type   3.5.9(1), see 3.5.9(1), see 3.5.9(8).
  45440.   ordinary_fixed_point_definition   3.5.9.
  45441.     used   3.5.9(2), see P(2), see P(1).
  45442.   Origin 3.9.1(12)
  45443.   OSC   A.3.3.
  45444.   other_control_function   2.1.
  45445.     used   2.1(2), see P(2), see P(1).
  45446.   Other_Procedure   3.10.
  45447.   output   A.6.
  45448.   Output attribute   13.13.2(19), see 13.13.2(19), see 13.13.2(29),
  45449.             K(165),    K(165),    K(169).
  45450.   Output clause   13.3(7), see 13.13.2(7), see 13.13.2(36).
  45451.   overall interpretation
  45452.     of a complete context   8.6.
  45453.   Overflow_Check   11.5.
  45454.     [partial]   3.5.4(20), see 4.4(11),  5.4(20), see 4.4(11),  5.4(13),
  45455.           G.2.1(11), see G.2.2(7), see G.2.3(11), see G.2.2(7), see G.2.3(25),
  45456.           G.2.4(2),  G.2.6(2),  G.2.6(3).
  45457.   overload resolution   8.6.
  45458.   overloadable   8.3.
  45459.   overloaded   8.3.
  45460.     enumeration literal   3.5.1.
  45461.   overloading rules   1.1.2(26), see 8.6(26), see 8.6(2).
  45462.   override   8.3(9), see 12.3(9), see 12.3(17).
  45463.     a primitive subprogram   3.2.3.
  45464.   Overwrite   A.4.3(27), see A.4.3(28), see A.4.4(27), see A.4.3(28), see A.4.4(62),
  45465.          A.4.4(63), see A.4.5(57), see A.4.5(63), see A.4.5(57), see A.4.5(58).
  45466.  
  45467.  
  45468. ΓòÉΓòÉΓòÉ 46. index ΓòÉΓòÉΓòÉ
  45469.  
  45470.   P  9.2(11), see 12.5.3(11), see 12.5.4(11), see 12.5.3(11), see 12.5.4(8).
  45471.   Pack pragma   13.2(3), see L(3), see L(24).
  45472.   Package   7(1), see N(1), see N(25).
  45473.   package instance   12.3.
  45474.   package_body   7.2.
  45475.     used   3.11(6), see 10.1.1(7), see P(6), see 10.1.1(7), see P(1).
  45476.   package_body_stub   10.1.3.
  45477.     used   10.1.3(2), see P(2), see P(1).
  45478.   package_declaration   7.1.
  45479.     used   3.1(3), see 10.1.1(5), see P(3), see 10.1.1(5), see P(1).
  45480.   package_renaming_declaration   8.5.3.
  45481.     used   8.5(2), see 10.1.1(6), see P(2), see 10.1.1(6), see P(1).
  45482.   package_specification   7.1.
  45483.     used   7.1(2), see 12.1(4), see P(2), see 12.1(4), see P(1).
  45484.   packed   13.2.
  45485.   Packed_Decimal   B.4.
  45486.   Packed_Descriptor   13.6.
  45487.   Packed_Format   B.4.
  45488.   Packed_Signed   B.4.
  45489.   Packed_Unsigned   B.4.
  45490.   packing
  45491.     aspect of representation   13.2.
  45492.   padding bits   13.1.
  45493.   Page   13.3(80), see A.10.1(80), see A.10.1(39).
  45494.   Page pragma   2.8(22), see L(22), see L(25).
  45495.   page terminator   A.10.
  45496.   Page_Length   A.10.1.
  45497.   Page_Num   3.5.4.
  45498.   Painted_Point   3.9.1.
  45499.   Pair   6.4.
  45500.   parallel processing
  45501.     See task   9.
  45502.   Parallel_Simulation   A.5.2.
  45503.   parameter
  45504.     See also discriminant   3.7.
  45505.     See also loop parameter   5.5.
  45506.     See formal parameter   6.1.
  45507.     See generic formal parameter   12.
  45508.   parameter assigning back   6.4.1.
  45509.   parameter copy back   6.4.1.
  45510.   parameter mode   6.1.
  45511.   parameter passing   6.4.1.
  45512.   parameter_and_result_profile   6.1.
  45513.     used   3.10(5), see 6.1(4), see P(5), see 6.1(4), see P(1).
  45514.   parameter_association   6.4.
  45515.     used   6.4(4), see P(4), see P(1).
  45516.   parameter_profile   6.1.
  45517.     used   3.10(5),  6.1(4),   9.5.2(5),  6.1(4),   9.5.2(2),
  45518.         9.5.2(3), see 9.5.2(6), see P(3), see 9.5.2(6), see P(1).
  45519.   parameter_specification   6.1.
  45520.     used   6.1(14), see P(14), see P(1).
  45521.   Parameterless_Handler   C.3.2.
  45522.   Params_Stream_Type   E.5.
  45523.   Parent   10.1.3(20), see 10.1.3(21), see 10.1.3(20), see 10.1.3(21), see 10.1.3(23).
  45524.   parent body
  45525.     of a subunit   10.1.3.
  45526.   parent declaration
  45527.     of a library_item   10.1.1.
  45528.     of a library unit   10.1.1.
  45529.   parent subtype   3.4.
  45530.   parent type   3.4.
  45531.   parent unit
  45532.     of a library unit   10.1.1.
  45533.   parent_unit_name   10.1.1.
  45534.     used   6.1(5), see 6.1(7),   7.1(5), see 6.1(7),   7.1(3),
  45535.         7.2(2), see 10.1.3(7), see P(2), see 10.1.3(7), see P(1).
  45536.   Parser   9.1.
  45537.   part
  45538.     of an object or value   3.2.
  45539.   partial view
  45540.     of a type   7.3.
  45541.   partition   10.2(2), see N(2), see N(26).
  45542.   partition building   10.2.
  45543.   partition communication subsystem (PCS)   E.5.
  45544.   Partition_Check
  45545.     [partial]   E.4.
  45546.   Partition_ID   E.5.
  45547.   Partition_ID attribute   E.1(9), see K(9), see K(173).
  45548.   pass by copy   6.2.
  45549.   pass by reference   6.2.
  45550.   passive partition   E.1.
  45551.   PCS (partition communication subsystem)   E.5.
  45552.   pending interrupt occurrence   C.3.
  45553.   per-object constraint   3.8.
  45554.   per-object expression   3.8.
  45555.   Percent   J.5.
  45556.   Percent_Sign   A.3.3.
  45557.   perfect result set   G.2.3.
  45558.   periodic task
  45559.     See delay_until_statement   9.6.
  45560.     example   9.6.
  45561.   Peripheral   3.8.1.
  45562.   Peripheral_Ref   3.10.
  45563.   Person   3.10.1(19), see 3.10.1(19), see 3.10.1(22).
  45564.   Person_Name   3.10.1.
  45565.   Pi   A.5.
  45566.   Pic_String   F.3.3.
  45567.   Picture   F.3.3.
  45568.   picture String
  45569.     for edited output   F.3.1.
  45570.   Picture_Error   F.3.3.
  45571.   Pilcrow_Sign   A.3.3.
  45572.   plain_char   B.3.
  45573.   PLD   A.3.3.
  45574.   PLU   A.3.3.
  45575.   plus operator   4.4(1), see 4.5.3(1), see 4.5.4(1), see 4.5.3(1), see 4.5.4(1).
  45576.   plus sign   2.1.
  45577.   Plus_Minus_Sign   A.3.3.
  45578.   Plus_Sign   A.3.3.
  45579.   PM   A.3.3.
  45580.   point   1(2.15), see 3.9(2.15), see 3.9(32).
  45581.   pointer   B.3.2.
  45582.     See access value   3.10.
  45583.     See type System.Address   13.7.
  45584.   pointer type
  45585.     See access type   3.10.
  45586.   Pointer_Error   B.3.2.
  45587.   Pointers
  45588.     child of Interfaces.C   B.3.2.
  45589.   polymorphism   3.9(1), see 3.9.2(1), see 3.9.2(1).
  45590.   pool element   3.10(7), see 13.11(7), see 13.11(11).
  45591.   pool type   13.11.
  45592.   pool-specific access type   3.10(7), see 3.10(7), see 3.10(8).
  45593.   Pop   12.8(3), see 12.8(7), see 12.8(3), see 12.8(7), see 12.8(14).
  45594.   Pos attribute   3.5.5(2), see K(2), see K(175).
  45595.   position   13.5.1.
  45596.     used   13.5.1(3), see P(3), see P(1).
  45597.   Position attribute   13.5.2(2), see K(2), see K(179).
  45598.   position number   3.5.
  45599.     of an enumeration value   3.5.1.
  45600.     of an integer value   3.5.4.
  45601.   positional association   6.4(7), see 12.3(7), see 12.3(6).
  45602.   positional component association   4.3.1.
  45603.   positional discriminant association   3.7.1.
  45604.   positional_array_aggregate   4.3.3.
  45605.     used   4.3.3(2), see P(2), see P(1).
  45606.   Positive   3.5.4(12), see 3.5.4(13), see 3.6.3(12), see 3.5.4(13), see 3.6.3(3),
  45607.         A.1.
  45608.   Positive_Count   A.8.4(4),  A.10(4),  A.10(10),
  45609.            A.10.1(5), see A.12.1(5), see A.12.1(7).
  45610.   possible interpretation   8.6.
  45611.     for direct_names   8.3.
  45612.     for selector_names   8.3.
  45613.   post-compilation error   1.1.2.
  45614.   post-compilation rules   1.1.2(29), see 10.1.3(29), see 10.1.3(15),
  45615.                10.1.5(8), see 10.2(8), see 10.2(2),
  45616.                12.3(19),  13.12(19),  13.12(8),
  45617.                D.2.2(4),  D.3(4),  D.3(5),
  45618.                D.4(5),   E(5),   E(2),
  45619.                E.1(2),   E.2.1(2),   E.2.1(10),
  45620.                E.2.3(17), see H.1(17), see H.1(4),
  45621.                H.3.1.
  45622.   potentially blocking operation   9.5.1.
  45623.     Abort_Task   C.7.1.
  45624.     delay_statement   9.6(34), see D.9(34), see D.9(5).
  45625.     remote subprogram call   E.4.
  45626.     RPC operations   E.5.
  45627.     Suspend_Until_True   D.10.
  45628.   potentially use-visible   8.4.
  45629.   Pound_Sign   A.3.3.
  45630.   Power_16   3.3.2.
  45631.   Pragma   2.8(1), see 2.8(2), see L(1), see N(1), see 2.8(2), see L(1), see N(27).
  45632.   pragma argument   2.8.
  45633.   pragma name   2.8.
  45634.   pragma, categorization   E.2.
  45635.     Remote_Call_Interface   E.2.3.
  45636.     Remote_Types   E.2.2.
  45637.     Shared_Passive   E.2.1.
  45638.   pragma, configuration   10.1.5.
  45639.     Locking_Policy   D.3.
  45640.     Normalize_Scalars   H.1.
  45641.     Queuing_Policy   D.4.
  45642.     Restrictions   13.12.
  45643.     Reviewable   H.3.1.
  45644.     Suppress   11.5.
  45645.     Task_Dispatching_Policy   D.2.2.
  45646.   pragma, identifier specific to   2.8.
  45647.   pragma, interfacing
  45648.     Convention   B.1.
  45649.     Export   B.1.
  45650.     Import   B.1.
  45651.     Linker_Options   B.1.
  45652.   pragma, library unit   10.1.5.
  45653.     All_Calls_Remote   E.2.3.
  45654.     categorization pragmas   E.2.
  45655.     Elaborate_Body   10.2.1.
  45656.     Preelaborate   10.2.1.
  45657.     Pure   10.2.1.
  45658.   pragma, program unit   10.1.5.
  45659.     Convention   B.1.
  45660.     Export   B.1.
  45661.     Import   B.1.
  45662.     Inline   6.3.2.
  45663.     library unit pragmas   10.1.5.
  45664.   pragma, representation   13.1.
  45665.     Asynchronous   E.4.1.
  45666.     Atomic   C.6.
  45667.     Atomic_Components   C.6.
  45668.     Controlled   13.11.3.
  45669.     Convention   B.1.
  45670.     Discard_Names   C.5.
  45671.     Export   B.1.
  45672.     Import   B.1.
  45673.     Pack   13.2.
  45674.     Volatile   C.6.
  45675.     Volatile_Components   C.6.
  45676.   pragma_argument_association   2.8.
  45677.     used   2.8(2), see P(2), see P(1).
  45678.   pragmas
  45679.     All_Calls_Remote   E.2.3(5), see L(5), see L(2).
  45680.     Asynchronous   E.4.1(3), see L(3), see L(3).
  45681.     Atomic   C.6(3), see L(3), see L(4).
  45682.     Atomic_Components   C.6(5), see L(5), see L(5).
  45683.     Attach_Handler   C.3.1(4), see L(4), see L(6).
  45684.     Controlled   13.11.3(3), see L(3), see L(7).
  45685.     Convention   B.1(7), see L(7), see L(8).
  45686.     Discard_Names   C.5(3), see L(3), see L(9).
  45687.     Elaborate   10.2.1(20), see L(20), see L(10).
  45688.     Elaborate_All   10.2.1(21), see L(21), see L(11).
  45689.     Elaborate_Body   10.2.1(22), see L(22), see L(12).
  45690.     Export   B.1(6), see L(6), see L(13).
  45691.     Import   B.1(5), see L(5), see L(14).
  45692.     Inline   6.3.2(3), see L(3), see L(15).
  45693.     Inspection_Point   H.3.2(3), see L(3), see L(16).
  45694.     Interrupt_Handler   C.3.1(2), see L(2), see L(17).
  45695.     Interrupt_Priority   D.1(5), see L(5), see L(18).
  45696.     Linker_Options   B.1(8), see L(8), see L(19).
  45697.     List   2.8(21), see L(21), see L(20).
  45698.     Locking_Policy   D.3(3), see L(3), see L(21).
  45699.     Normalize_Scalars   H.1(3), see L(3), see L(22).
  45700.     Optimize   2.8(23), see L(23), see L(23).
  45701.     Pack   13.2(3), see L(3), see L(24).
  45702.     Page   2.8(22), see L(22), see L(25).
  45703.     Preelaborate   10.2.1(3), see L(3), see L(26).
  45704.     Priority   D.1(3), see L(3), see L(27).
  45705.     Pure   10.2.1(14), see L(14), see L(28).
  45706.     Queuing_Policy   D.4(3), see L(3), see L(29).
  45707.     Remote_Call_Interface   E.2.3(3), see L(3), see L(30).
  45708.     Remote_Types   E.2.2(3), see L(3), see L(31).
  45709.     Restrictions   13.12(3), see L(3), see L(32).
  45710.     Reviewable   H.3.1(3), see L(3), see L(33).
  45711.     Shared_Passive   E.2.1(3), see L(3), see L(34).
  45712.     Storage_Size   13.3(63), see L(63), see L(35).
  45713.     Suppress   11.5(4), see L(4), see L(36).
  45714.     Task_Dispatching_Policy   D.2.2(2), see L(2), see L(37).
  45715.     Volatile   C.6(4), see L(4), see L(38).
  45716.     Volatile_Components   C.6(6), see L(6), see L(39).
  45717.   precedence of operators   4.5.
  45718.   Pred attribute   3.5(25), see K(25), see K(181).
  45719.   predefined environment   A.
  45720.   predefined exception   11.1.
  45721.   predefined library unit
  45722.     See  language-defined library units
  45723.   predefined operation
  45724.     of a type   3.2.3.
  45725.   predefined operations
  45726.     of a discrete type   3.5.5.
  45727.     of a fixed point type   3.5.10.
  45728.     of a floating point type   3.5.8.
  45729.     of a record type   3.8.
  45730.     of an access type   3.10.2.
  45731.     of an array type   3.6.2.
  45732.   predefined operator   4.5.
  45733.     [partial]   3.2.1.
  45734.   predefined type   3.2.1.
  45735.     See  language-defined types
  45736.   preelaborable
  45737.     of an elaborable construct   10.2.1.
  45738.   Preelaborate pragma   10.2.1(3), see L(3), see L(26).
  45739.   preelaborated   10.2.1.
  45740.     [partial]   10.2.1(11), see E.2.1(11), see E.2.1(9).
  45741.   preempted task   D.2.1.
  45742.   preemptible resource   D.2.1.
  45743.   preference
  45744.     for root numeric operators and ranges   8.6.
  45745.   preference control
  45746.     See requeue   9.5.4.
  45747.   prefix   4.1.
  45748.     used   4.1.1(2), see 4.1.2(2), see 4.1.3(2), see 4.1.2(2), see 4.1.3(2),
  45749.         4.1.4(2), see 4.1.4(4), see 6.4(2), see 4.1.4(4), see 6.4(2),
  45750.         6.4(3),   P(3),   P(1).
  45751.   prescribed result
  45752.     for the evaluation of a complex arithmetic operation
  45753.        G.1.1.
  45754.     for the evaluation of a complex elementary function
  45755.        G.1.2.
  45756.     for the evaluation of an elementary function   A.5.1.
  45757.   primary   4.4.
  45758.     used   4.4(6), see P(6), see P(1).
  45759.   primitive function   A.5.3.
  45760.   primitive operation
  45761.     [partial]   3.2.
  45762.   primitive operations   N.
  45763.     of a type   3.2.3.
  45764.   primitive operator
  45765.     of a type   3.2.3.
  45766.   primitive subprograms
  45767.     of a type   3.2.3.
  45768.   Print_Header   6.1.
  45769.   Priority   13.7(16), see D.1(10), see D.1(16), see D.1(10), see D.1(15).
  45770.   priority inheritance   D.1.
  45771.   priority inversion   D.2.2.
  45772.   priority of an entry call   D.4.
  45773.   Priority pragma   D.1(3), see L(3), see L(27).
  45774.   private declaration of a library unit   10.1.1.
  45775.   private descendant
  45776.     of a library unit   10.1.1.
  45777.   private extension   3.2(4), see 3.9(2), see 3.9.1(4), see 3.9(2), see 3.9.1(1),
  45778.              N.
  45779.     [partial]   7.3.
  45780.   private library unit   10.1.1.
  45781.   private operations   7.3.1.
  45782.   private part   8.2.
  45783.     of a package   7.1.
  45784.     of a protected unit   9.4.
  45785.     of a task unit   9.1.
  45786.   private type   3.2(4), see N(4), see N(30).
  45787.     [partial]   7.3.
  45788.   private types and private extensions   7.3.
  45789.   private_extension_declaration   7.3.
  45790.     used   3.2.1(2), see P(2), see P(1).
  45791.   private_type_declaration   7.3.
  45792.     used   3.2.1(2), see P(2), see P(1).
  45793.   Probability   3.5.7.
  45794.   procedure   6.
  45795.   procedure instance   12.3.
  45796.   procedure_call_statement   6.4.
  45797.     used   5.1(4), see P(4), see P(1).
  45798.   processing node   E.
  45799.   Producer   9.11(2), see 9.11(2), see 9.11(3).
  45800.   profile   6.1.
  45801.     associated with a dereference   4.1.
  45802.     fully conformant   6.3.1.
  45803.     mode conformant   6.3.1.
  45804.     subtype conformant   6.3.1.
  45805.     type conformant   6.3.1.
  45806.   profile resolution rule
  45807.     name with a given expected profile   8.6.
  45808.   Prog   B.4.
  45809.   program   10.2(1), see N(1), see N(32).
  45810.   program execution   10.2.
  45811.   program library
  45812.     See library   10(2), see 10.1.4(2), see 10.1.4(9).
  45813.   Program unit   10.1(1), see N(1), see N(31).
  45814.   program unit pragma   10.1.5.
  45815.     Convention   B.1.
  45816.     Export   B.1.
  45817.     Import   B.1.
  45818.     Inline   6.3.2.
  45819.     library unit pragmas   10.1.5.
  45820.   Program_Error   A.1.
  45821.     raised by failure of run-time check
  45822.        1.1.3(20),   1.1.5(8),   1.1.5(20),   1.1.5(8),   1.1.5(12),
  45823.        3.5.5(8),   3.10.2(29),  3.11(8),   3.10.2(29),  3.11(14),
  45824.        4.6(57),    6.2(12),    6.4(57),    6.2(12),    6.4(11),
  45825.        6.5(20),    7.6.1(15),   7.6.1(20),    7.6.1(15),   7.6.1(16),
  45826.        7.6.1(17),   7.6.1(18),   9.4(17),   7.6.1(18),   9.4(20),
  45827.        9.5.1(17),   9.5.3(7),   9.7.1(17),   9.5.3(7),   9.7.1(21),
  45828.        9.8(20),    10.2(26),   11.1(20),    10.2(26),   11.1(4),
  45829.        11.5(19),   13.7.1(16),  13.9.1(19),   13.7.1(16),  13.9.1(9),
  45830.        13.11.2(13), see 13.11.2(14), see A.7(13), see 13.11.2(14), see A.7(14),
  45831.        C.3.1(10),   C.3.1(11),   C.3.2(10),   C.3.1(11),   C.3.2(17),
  45832.        C.3.2(20),   C.3.2(21),   C.3.2(20),   C.3.2(21),   C.3.2(22),
  45833.        C.7.1(15),   C.7.1(17),   C.7.2(15),   C.7.1(17),   C.7.2(13),
  45834.        D.3(13),    D.5(9),    D.5(13),    D.5(9),    D.5(11),
  45835.        D.10(10),   D.11(8),    E.1(10),   D.11(8),    E.1(10),
  45836.        E.3(6),    E.4(18),    J.7.1(6),    E.4(18),    J.7.1(7).
  45837.   Program_Status_Word   13.5.1.
  45838.   propagate   11.4.
  45839.     an exception occurrence by an execution, to a dynamically
  45840.       enclosing execution   11.4.
  45841.   proper_body   3.11.
  45842.     used   3.11(5), see 10.1.3(7), see P(5), see 10.1.3(7), see P(1).
  45843.   protected action   9.5.1.
  45844.     complete   9.5.1.
  45845.     start   9.5.1.
  45846.   protected calling convention   6.3.1.
  45847.   protected declaration   9.4.
  45848.   protected entry   9.4.
  45849.   protected function   9.5.1.
  45850.   protected object   9(3), see 9.4(3), see 9.4(1).
  45851.   protected operation   9.4.
  45852.   protected procedure   9.5.1.
  45853.   protected subprogram   9.4(1), see 9.5.1(1), see 9.5.1(1).
  45854.   Protected type   N.
  45855.   protected unit   9.4.
  45856.   protected_body   9.4.
  45857.     used   3.11(6), see P(6), see P(1).
  45858.   protected_body_stub   10.1.3.
  45859.     used   10.1.3(2), see P(2), see P(1).
  45860.   protected_definition   9.4.
  45861.     used   9.4(2), see 9.4(3), see P(2), see 9.4(3), see P(1).
  45862.   protected_element_declaration   9.4.
  45863.     used   9.4(4), see P(4), see P(1).
  45864.   protected_operation_declaration   9.4.
  45865.     used   9.4(4), see 9.4(6), see P(4), see 9.4(6), see P(1).
  45866.   protected_operation_item   9.4.
  45867.     used   9.4(7), see P(7), see P(1).
  45868.   protected_type_declaration   9.4.
  45869.     used   3.2.1(3), see P(3), see P(1).
  45870.   ptrdiff_t   B.3.
  45871.   PU1   A.3.3.
  45872.   PU2   A.3.3.
  45873.   public declaration of a library unit   10.1.1.
  45874.   public descendant
  45875.     of a library unit   10.1.1.
  45876.   public library unit   10.1.1.
  45877.   pure   10.2.1.
  45878.   Pure pragma   10.2.1(14), see L(14), see L(28).
  45879.   Push   6.3(9), see 12.8(3), see 12.8(6), see 12.8(9), see 12.8(3), see 12.8(6), see 12.8(14).
  45880.   Put   6.4(26),   10.1.1(30), see A.10.1(26),   10.1.1(30), see A.10.1(42),
  45881.       A.10.1(48), see A.10.1(55), see A.10.1(48), see A.10.1(55), see A.10.1(60),
  45882.       A.10.1(66), see A.10.1(67), see A.10.1(66), see A.10.1(67), see A.10.1(71),
  45883.       A.10.1(72), see A.10.1(76), see A.10.1(72), see A.10.1(76), see A.10.1(77),
  45884.       A.10.1(82), see A.10.1(83), see F.3.3(82), see A.10.1(83), see F.3.3(14),
  45885.       F.3.3(15),  F.3.3(16),  G.1.3(15),  F.3.3(16),  G.1.3(7),
  45886.       G.1.3.
  45887.   Put_Item   12.6.
  45888.   Put_Line   A.10.1.
  45889.   Put_List   12.6.
  45890.  
  45891.  
  45892. ΓòÉΓòÉΓòÉ 47. Index ΓòÉΓòÉΓòÉ
  45893.  
  45894.   qualified_expression   4.7.
  45895.     used   4.4(7), see 4.8(2), see 13.8(2), see P(7), see 4.8(2), see 13.8(2), see P(1).
  45896.   Query   J.5.
  45897.   Question   3.6.3(7), see A.3.3(7), see A.3.3(10).
  45898.   queuing policy   D.4(1), see D.4(1), see D.4(6).
  45899.   Queuing_Policy pragma   D.4(3), see L(3), see L(29).
  45900.   Quotation   A.3.3.
  45901.   quotation mark   2.1.
  45902.   quoted string
  45903.     See string_literal   2.6.
  45904.   Quotient_Type   F.2.
  45905.  
  45906.  
  45907. ΓòÉΓòÉΓòÉ 48. index ΓòÉΓòÉΓòÉ
  45908.  
  45909.   R  12.5.3(15), see 12.5.4(15), see 12.5.4(13).
  45910.   R_Brace   J.5.
  45911.   R_Bracket   J.5.
  45912.   Rad_To_Deg   4.9.
  45913.   Rainbow   3.2.2(15), see 3.5.1(15), see 3.5.1(16).
  45914.   raise
  45915.     an exception   11(1), see 11.3(4), see N(1), see 11.3(4), see N(18).
  45916.     an exception occurrence   11.4.
  45917.   Raise_Exception   11.4.1.
  45918.   raise_statement   11.3.
  45919.     used   5.1(4), see P(4), see P(1).
  45920.   Random   6.1(38), see A.5.2(8), see A.5.2(38), see A.5.2(8), see A.5.2(20).
  45921.   random number   A.5.2.
  45922.   Random_Coin A.5.2(58)
  45923.   Random_Die   A.5.2.
  45924.   range   3.5(3), see 3.5(3), see 3.5(4).
  45925.     used   3.5(2), see 3.6(6), see 3.6.1(2), see 3.6(6), see 3.6.1(3),
  45926.         4.4(3), see P(3), see P(1).
  45927.     of a scalar subtype   3.5.
  45928.   Range attribute   3.5(14), see 3.6.2(14), see 3.6.2(7),
  45929.             K(187),  K(187),  K(189).
  45930.   Range(N) attribute   3.6.2(8), see K(8), see K(185).
  45931.   range_attribute_designator   4.1.4.
  45932.     used   4.1.4(4), see P(4), see P(1).
  45933.   range_attribute_reference   4.1.4.
  45934.     used   3.5(3), see P(3), see P(1).
  45935.   Range_Check   11.5.
  45936.     [partial]   3.2.2(11), see 3.5(24),    3.5(11), see 3.5(24),    3.5(27),
  45937.           3.5(43),   3.5(44),    3.5(43),   3.5(44),    3.5(51),
  45938.           3.5(55),   3.5.5(7),   3.5.9(55),   3.5.5(7),   3.5.9(19),
  45939.           4.2(11),   4.3.3(28),   4.5.1(11),   4.3.3(28),   4.5.1(8),
  45940.           4.5.6(6),  4.5.6(13),   4.6(6),  4.5.6(13),   4.6(28),
  45941.           4.6(38),   4.6(46),    4.6(38),   4.6(46),    4.6(51),
  45942.           4.7(4),   13.13.2(35), see A.5.2(4),   13.13.2(35), see A.5.2(39),
  45943.           A.5.2(40), see A.5.3(26),   A.5.3(40), see A.5.3(26),   A.5.3(29),
  45944.           A.5.3(50), see A.5.3(53),   A.5.3(50), see A.5.3(53),   A.5.3(59),
  45945.           A.5.3(62), see K(11),     K(62), see K(11),     K(41),
  45946.           K(47),    K(114),    K(47),    K(114),    K(122),
  45947.           K(184),   K(220),    K(184),   K(220),    K(241).
  45948.   range_constraint   3.5.
  45949.     used   3.2.2(6), see 3.5.9(6), see 3.5.9(5),
  45950.         J.3(2),   P(2),   P(1).
  45951.   Rank   12.5(16), see B.5(16), see B.5(31).
  45952.   Rational   7.1.
  45953.   Rational_Numbers   7.1(12), see 7.2(10), see 10.1.1(12), see 7.2(10), see 10.1.1(32).
  45954.   Rational_Numbers.Reduce   10.1.1.
  45955.   Rational_Numbers.IO   10.1.1.
  45956.   Rational_IO   10.1.1.
  45957.   RCI
  45958.     generic   E.2.3.
  45959.     library unit   E.2.3.
  45960.     package   E.2.3.
  45961.   Re   G.1.1.
  45962.   re-raise statement   11.3.
  45963.   read   7.5(19),   7.5(20),   9.1(19),   7.5(20),   9.1(24),
  45964.       9.5.2(33),  9.11(8),   9.11(33),  9.11(8),   9.11(10),
  45965.       11.4.2(4),  11.4.2(7),  13.13.1(4),  11.4.2(7),  13.13.1(5),
  45966.       A.8.1(12),  A.8.4(12),  A.9(12),  A.8.4(12),  A.9(6),
  45967.       A.12.1(15), see A.12.1(16), see D.12(15), see A.12.1(16), see D.12(9),
  45968.       D.12(10),   E.5(10),   E.5(7).
  45969.     the value of an object   3.3.
  45970.   Read attribute   13.13.2(6), see 13.13.2(6), see 13.13.2(14),
  45971.            K(191),    K(191),    K(195).
  45972.   Read clause   13.3(7), see 13.13.2(7), see 13.13.2(36).
  45973.   ready
  45974.     a task state   9.
  45975.   ready queue   D.2.1.
  45976.   ready task   D.2.1.
  45977.   Real   3.5.7(21), see B.5(6), see G.1.1(21), see B.5(6), see G.1.1(2).
  45978.   real literal   2.4.
  45979.   real literals   3.5.6.
  45980.   real time   D.8.
  45981.   real type   3.2(3), see 3.5.6(1), see N(3), see 3.5.6(1), see N(34).
  45982.   real-time systems   C(1), see D(1), see D(1).
  45983.   Real_Plus   8.5.4.
  45984.   real_range_specification   3.5.7.
  45985.     used   3.5.7(2), see 3.5.9(2), see 3.5.9(3),
  45986.         3.5.9(4), see P(4), see P(1).
  45987.   Real_Time
  45988.     child of Ada   D.8.
  45989.   real_type_definition   3.5.6.
  45990.     used   3.2.1(4), see P(4), see P(1).
  45991.   Real_IO   A.10.9.
  45992.   receiving stub   E.4.
  45993.   reclamation of storage   13.11.2.
  45994.   recommended level of support   13.1.
  45995.     enumeration_representation_clause   13.4.
  45996.     record_representation_clause   13.5.1.
  45997.     Address attribute   13.3.
  45998.     Alignment attribute for objects   13.3.
  45999.     Alignment attribute for subtypes   13.3.
  46000.     bit ordering   13.5.3.
  46001.     Component_Size attribute   13.3.
  46002.     pragma Pack   13.2.
  46003.     required in Systems Programming Annex   C.2.
  46004.     Size attribute   13.3(42), see 13.3(42), see 13.3(54).
  46005.     unchecked conversion   13.9.
  46006.     with respect to nonstatic expressions   13.1.
  46007.   record   3.8.
  46008.   record extension   3.4(5), see 3.9.1(1), see N(5), see 3.9.1(1), see N(35).
  46009.   record layout
  46010.     aspect of representation   13.5.
  46011.   record type   3.8(1), see N(1), see N(36).
  46012.   record_aggregate   4.3.1.
  46013.     used   4.3(2), see P(2), see P(1).
  46014.   record_component_association   4.3.1.
  46015.     used   4.3.1(3), see P(3), see P(1).
  46016.   record_component_association_list   4.3.1.
  46017.     used   4.3.1(2), see 4.3.2(2), see P(2), see 4.3.2(2), see P(1).
  46018.   record_definition   3.8.
  46019.     used   3.8(2), see 3.9.1(2), see P(2), see 3.9.1(2), see P(1).
  46020.   record_extension_part   3.9.1.
  46021.     used   3.4(2), see P(2), see P(1).
  46022.   record_representation_clause   13.5.1.
  46023.     used   13.1(2), see P(2), see P(1).
  46024.   record_type_definition   3.8.
  46025.     used   3.2.1(4), see P(4), see P(1).
  46026.   Red_Blue   3.2.2.
  46027.   Reference   C.3.2(10), see C.7.2(10), see C.7.2(5).
  46028.   reference parameter passing   6.2.
  46029.   references   1.2.
  46030.   Register   E.4.2.
  46031.   Registered_Trade_Mark_Sign   A.3.3.
  46032.   Reinitialize   C.7.2.
  46033.   relation   4.4.
  46034.     used   4.4(2), see P(2), see P(1).
  46035.   relational operator   4.5.2.
  46036.   relational_operator   4.5.
  46037.     used   4.4(3), see P(3), see P(1).
  46038.   relaxed mode   G.2.
  46039.   Release   9.4(27), see 9.4(27), see 9.4(29).
  46040.     execution resource associated with protected object
  46041.        9.5.1.
  46042.   rem operator   4.4(1), see 4.5.5(1), see 4.5.5(1).
  46043.   Remainder attribute   A.5.3(45), see K(45), see K(199).
  46044.   Remainder_Type   F.2.
  46045.   remote access   E.1.
  46046.   remote access type   E.2.2.
  46047.   remote access-to-class-wide type   E.2.2.
  46048.   remote access-to-subprogram type   E.2.2.
  46049.   remote call interface   E.2(4), see E.2.3(4), see E.2.3(7).
  46050.   remote procedure call
  46051.     asynchronous   E.4.1.
  46052.   remote subprogram   E.2.3.
  46053.   remote subprogram binding   E.4.
  46054.   remote subprogram call   E.4.
  46055.   remote types library unit   E.2(4), see E.2.2(4), see E.2.2(4).
  46056.   Remote_Call_Interface pragma   E.2.3(3), see L(3), see L(30).
  46057.   Remote_Types pragma   E.2.2(3), see L(3), see L(31).
  46058.   Remove   E.4.2.
  46059.   renamed entity   8.5.
  46060.   renamed view   8.5.
  46061.   renaming-as-body   8.5.4.
  46062.   renaming-as-declaration   8.5.4.
  46063.   renaming_declaration   8.5.
  46064.     used   3.1(3), see P(3), see P(1).
  46065.   rendezvous   9.5.2.
  46066.   Replace_Element   A.4.4(27), see A.4.5(27), see A.4.5(21).
  46067.   Replace_Slice   A.4.3(23), see A.4.3(23), see A.4.3(24),
  46068.            A.4.4(58), see A.4.4(58), see A.4.4(59),
  46069.            A.4.5(53), see A.4.5(53), see A.4.5(54).
  46070.   Replicate   A.4.4(78), see A.4.4(79), see A.4.4(78), see A.4.4(79), see A.4.4(80).
  46071.   representation
  46072.     change of   13.6.
  46073.   representation aspect   13.1.
  46074.   representation attribute   13.3.
  46075.   representation item   13.1.
  46076.   representation of an object   13.1.
  46077.   representation pragma   13.1.
  46078.     Asynchronous   E.4.1.
  46079.     Atomic   C.6.
  46080.     Atomic_Components   C.6.
  46081.     Controlled   13.11.3.
  46082.     Convention   B.1.
  46083.     Discard_Names   C.5.
  46084.     Export   B.1.
  46085.     Import   B.1.
  46086.     Pack   13.2.
  46087.     Volatile   C.6.
  46088.     Volatile_Components   C.6.
  46089.   representation-oriented attributes
  46090.     of a fixed point subtype   A.5.4.
  46091.     of a floating point subtype   A.5.3.
  46092.   representation_clause   13.1.
  46093.     used   3.8(5), see 3.11(4), see 9.1(5), see 3.11(4), see 9.1(5),
  46094.         9.4(5), see 9.4(8),  P(5), see 9.4(8),  P(1).
  46095.   represented in canonical form   A.5.3.
  46096.   Request   9.1(26), see 9.5.2(26), see 9.5.2(33).
  46097.   requested decimal precision
  46098.     of a floating point type   3.5.7.
  46099.   requeue   9.5.4.
  46100.   requeue-with-abort   9.5.4.
  46101.   requeue_statement   9.5.4.
  46102.     used   5.1(4), see P(4), see P(1).
  46103.   requires a completion   3.11.1(1), see 3.11.1(1), see 3.11.1(6).
  46104.     incomplete_type_declaration   3.10.1.
  46105.     protected_declaration   9.4.
  46106.     task_declaration   9.1.
  46107.     generic_package_declaration   7.1.
  46108.     generic_subprogram_declaration   6.1.
  46109.     package_declaration   7.1.
  46110.     subprogram_declaration   6.1.
  46111.     declaration of a partial view   7.3.
  46112.     declaration to which a pragma Elaborate_Body applies
  46113.        10.2.1.
  46114.     deferred constant declaration   7.4.
  46115.     protected entry_declaration   9.5.2.
  46116.   Reraise_Occurrence   11.4.1.
  46117.   reserved interrupt   C.3.
  46118.   reserved word   2.9.
  46119.   Reserved_128   A.3.3.
  46120.   Reserved_129   A.3.3.
  46121.   Reserved_132   A.3.3.
  46122.   Reserved_153   A.3.3.
  46123.   Reserved_Check
  46124.     [partial]   C.3.1.
  46125.   Reset   A.5.2(9),  A.5.2(12), see A.5.2(9),  A.5.2(12), see A.5.2(21),
  46126.        A.5.2(24), see A.8.1(8),  A.8.4(24), see A.8.1(8),  A.8.4(8),
  46127.        A.10.1(11), see A.12.1(11), see A.12.1(10).
  46128.   resolution rules   1.1.2.
  46129.   resolve
  46130.     overload resolution   8.6.
  46131.   Resource   9.4(27), see 9.4(27), see 9.4(28).
  46132.   restriction   13.12.
  46133.     used   13.12(3), see L(3), see L(32).
  46134.   Restrictions
  46135.     Immediate_Reclamation   H.4.
  46136.     Max_Asynchronous_Select_Nesting   D.7.
  46137.     Max_Protected_Entries   D.7.
  46138.     Max_Select_Alternatives   D.7.
  46139.     Max_Storage_At_Blocking   D.7.
  46140.     Max_Task_Entries   D.7.
  46141.     Max_Tasks   D.7.
  46142.     No_Abort_Statements   D.7.
  46143.     No_Access_Subprograms   H.4.
  46144.     No_Allocators   H.4.
  46145.     No_Asynchronous_Control   D.7.
  46146.     No_Delay   H.4.
  46147.     No_Dispatch   H.4.
  46148.     No_Dynamic_Priorities   D.7.
  46149.     No_Exceptions   H.4.
  46150.     No_Fixed_Point   H.4.
  46151.     No_Floating_Point   H.4.
  46152.     No_Implicit_Heap_Allocations   D.7.
  46153.     No_Local_Allocators   H.4.
  46154.     No_Nested_Finalization   D.7.
  46155.     No_Protected_Types   H.4.
  46156.     No_Recursion   H.4.
  46157.     No_Reentrancy   H.4.
  46158.     No_Task_Allocators   D.7.
  46159.     No_Task_Hierarchy   D.7.
  46160.     No_Terminate_Alternatives   D.7.
  46161.     No_Unchecked_Access   H.4.
  46162.     No_Unchecked_Conversion   H.4.
  46163.     No_Unchecked_Deallocation   H.4.
  46164.     No_IO   H.4.
  46165.   Restrictions pragma   13.12(3), see L(3), see L(32).
  46166.   result interval
  46167.     for a component of the result of evaluating
  46168.      a complex function   G.2.6.
  46169.     for the evaluation of a predefined arithmetic
  46170.      operation   G.2.1.
  46171.     for the evaluation of an elementary function   G.2.4.
  46172.   result subtype
  46173.     of a function   6.5.
  46174.   Result_Subtype   A.5.2.
  46175.   return expression   6.5.
  46176.   return-by-reference type   6.5.
  46177.   return_statement   6.5.
  46178.     used   5.1(4), see P(4), see P(1).
  46179.   Reverse_Solidus   A.3.3.
  46180.   Reviewable pragma   H.3.1(3), see L(3), see L(33).
  46181.   Rewind   E.4.2(2), see E.4.2(2), see E.4.2(5).
  46182.   RI   A.3.3.
  46183.   right curly bracket   2.1.
  46184.   right parenthesis   2.1.
  46185.   right square bracket   2.1.
  46186.   Right_Angle_Quotation   A.3.3.
  46187.   Right_Curly_Bracket   A.3.3.
  46188.   Right_Indent   6.1.
  46189.   Right_Parenthesis   A.3.3.
  46190.   Right_Square_Bracket   A.3.3.
  46191.   Roman   3.6.
  46192.   Roman_Digit   3.5.2.
  46193.   root library unit   10.1.1.
  46194.   root type
  46195.     of a class   3.4.1.
  46196.   root_integer   3.5.4.
  46197.     [partial]   3.4.1.
  46198.   root_real   3.5.6.
  46199.     [partial]   3.4.1.
  46200.   Root_Storage_Pool   13.11.
  46201.   Root_Stream_Type   13.13.1.
  46202.   rooted at a type   3.4.1.
  46203.   Rosso   8.5.4.
  46204.   Rot   8.5.4.
  46205.   rotate   B.2.
  46206.   Rotate_Left   B.2.
  46207.   Rotate_Right   B.2.
  46208.   Rouge   8.5.4.
  46209.   Round attribute   3.5.10(12), see K(12), see K(203).
  46210.   Rounding attribute   A.5.3(36), see K(36), see K(207).
  46211.   Row   12.1.
  46212.   RPC
  46213.     child of System   E.5.
  46214.   RPC-receiver   E.5.
  46215.   RPC_Receiver   E.5.
  46216.   RS   A.3.3(6), see J.5(6), see J.5(4).
  46217.   run-time check
  46218.     See language-defined check   11.5.
  46219.   run-time error   1.1.2(30), see 1.1.5(30), see 1.1.5(6),
  46220.            11.5(2),   11.6(2),   11.6(1).
  46221.   run-time polymorphism   3.9.2.
  46222.   run-time semantics   1.1.2.
  46223.   run-time type
  46224.     See tag   3.9.
  46225.   running a program
  46226.     See program execution   10.2.
  46227.   running task   D.2.1.
  46228.  
  46229.  
  46230. ΓòÉΓòÉΓòÉ 49. index ΓòÉΓòÉΓòÉ
  46231.  
  46232.   S'Adjacent   A.5.3(49), see K(49), see K(10).
  46233.   S'Ceiling   A.5.3(34), see K(34), see K(29).
  46234.   S'Class'Input   13.13.2(33), see K(33), see K(94).
  46235.   S'Class'Output   13.13.2(30), see K(30), see K(167).
  46236.   S'Class'Read   13.13.2(15), see K(15), see K(193).
  46237.   S'Class'Write   13.13.2(12), see K(12), see K(284).
  46238.   S'Compose   A.5.3(25), see K(25), see K(40).
  46239.   S'Copy_Sign   A.5.3(52), see K(52), see K(46).
  46240.   S'Exponent   A.5.3(19), see K(19), see K(62).
  46241.   S'Floor   A.5.3(31), see K(31), see K(76).
  46242.   S'Fraction   A.5.3(22), see K(22), see K(82).
  46243.   S'Input   13.13.2(23), see K(23), see K(98).
  46244.   S'Leading_Part   A.5.3(55), see K(55), see K(110).
  46245.   S'Machine   A.5.3(61), see K(61), see K(121).
  46246.   S'Model   A.5.3(69), see K(69), see K(153).
  46247.   S'Output   13.13.2(20), see K(20), see K(171).
  46248.   S'Read   13.13.2(7), see K(7), see K(197).
  46249.   S'Remainder   A.5.3(46), see K(46), see K(201).
  46250.   S'Rounding   A.5.3(37), see K(37), see K(209).
  46251.   S'Scaling   A.5.3(28), see K(28), see K(219).
  46252.   S'Truncation   A.5.3(43), see K(43), see K(250).
  46253.   S'Unbiased_Rounding   A.5.3(40), see K(40), see K(254).
  46254.   S'Write   13.13.2(4), see K(4), see K(288).
  46255.   safe range
  46256.     of a floating point type   3.5.7(9), see 3.5.7(9), see 3.5.7(10).
  46257.   Safe_First attribute   A.5.3(71), see G.2.2(71), see G.2.2(5),
  46258.               K.
  46259.   Safe_Last attribute   A.5.3(72), see G.2.2(72), see G.2.2(6),
  46260.               K.
  46261.   safety-critical systems   H.
  46262.   Salary   3.5.9.
  46263.   Salary_Conversions   B.4(108), see B.4(108), see B.4(120).
  46264.   Salary_Type   B.4(105), see B.4(105), see B.4(114).
  46265.   Same_Denominator   7.2.
  46266.   satisfies
  46267.     a discriminant constraint   3.7.1.
  46268.     a range constraint   3.5.
  46269.     an index constraint   3.6.1.
  46270.     for an access value   3.10.
  46271.   Save   A.5.2(12), see A.5.2(12), see A.5.2(24).
  46272.   Save_Occurrence   11.4.1.
  46273.   scalar type   3.2(3), see 3.5(1), see N(3), see 3.5(1), see N(37).
  46274.   scalar_constraint   3.2.2.
  46275.     used   3.2.2(5), see P(5), see P(1).
  46276.   scale
  46277.     of a decimal fixed point subtype   3.5.10,
  46278.                       K.
  46279.   Scale attribute   3.5.10(11), see K(11), see K(215).
  46280.   Scaling attribute   A.5.3(27), see K(27), see K(217).
  46281.   SCHAR_MAX   B.3.
  46282.   SCHAR_MIN   B.3.
  46283.   Schedule   3.6.
  46284.   scope
  46285.     informal definition   3.1.
  46286.     of (a view of) an entity   8.2.
  46287.     of a use_clause   8.4.
  46288.     of a with_clause   10.1.2.
  46289.     of a declaration   8.2.
  46290.   Seconds   9.6.
  46291.   Seconds_Count   D.8.
  46292.   Section_Sign   A.3.3.
  46293.   secure systems   H.
  46294.   Seize   9.4(27), see 9.4(28), see 9.5.2(27), see 9.4(28), see 9.5.2(33).
  46295.   select an entry call
  46296.     from an entry queue   9.5.3(13), see 9.5.3(13), see 9.5.3(16).
  46297.     immediately   9.5.3.
  46298.   select_alternative   9.7.1.
  46299.     used   9.7.1(2), see P(2), see P(1).
  46300.   select_statement   9.7.
  46301.     used   5.1(5), see P(5), see P(1).
  46302.   selected_component   4.1.3.
  46303.     used   4.1(2), see P(2), see P(1).
  46304.   selection
  46305.     of an entry caller   9.5.2.
  46306.   selective_accept   9.7.1.
  46307.     used   9.7(2), see P(2), see P(1).
  46308.   selector_name   4.1.3.
  46309.     used   3.7.1(3), see 4.1.3(2), see 4.3.1(3), see 4.1.3(2), see 4.3.1(5),
  46310.         6.4(5),   12.3(4),  P(5),   12.3(4),  P(1).
  46311.   semantic dependence
  46312.     of one compilation unit upon another   10.1.1.
  46313.   semicolon   2.1(15), see A.3.3(15), see A.3.3(10).
  46314.   separate compilation   10.1.
  46315.   separator   2.2.
  46316.   Sequence   4.6.
  46317.   sequence of characters
  46318.     of a string_literal   2.6.
  46319.   sequence_of_statements   5.1.
  46320.     used   5.3(2),   5.4(3),   5.5(2),   5.4(3),   5.5(2),
  46321.         9.7.1(2), see 9.7.1(5), see 9.7.1(2), see 9.7.1(5), see 9.7.1(6),
  46322.         9.7.2(3), see 9.7.3(2), see 9.7.4(3), see 9.7.3(2), see 9.7.4(3),
  46323.         9.7.4(5), see 11.2(2),  11.2(5), see 11.2(2),  11.2(3),
  46324.         P.
  46325.   sequential
  46326.     actions   9.10(11), see C.6(11), see C.6(17).
  46327.   sequential access   A.8.
  46328.   sequential file   A.8.
  46329.   Sequential_IO   J.1.
  46330.     child of Ada   A.8.1.
  46331.   Server   9.1(23), see 9.7.1(23), see 9.7.1(24).
  46332.   service
  46333.     an entry queue   9.5.3.
  46334.   Set   3.9.3(15), see 6.4(15), see 6.4(27),
  46335.       D.12(9),   D.12(9),   D.12(10).
  46336.   Set_Col   A.10.1.
  46337.   Set_Component   9.4(31), see 9.4(31), see 9.4(33).
  46338.   Set_Error   A.10.1.
  46339.   Set_False   D.10.
  46340.   Set_Index   A.8.4(14), see A.12.1(14), see A.12.1(22).
  46341.   Set_Input   A.10.1.
  46342.   Set_Line   A.10.1.
  46343.   Set_Line_Length   A.10.1.
  46344.   Set_Mask   13.8(13), see 13.8(13), see 13.8(14).
  46345.   Set_Mode   A.12.1.
  46346.   Set_Output   A.10.1.
  46347.   Set_Page_Length   A.10.1.
  46348.   Set_Priority   D.5.
  46349.   Set_True   D.10.
  46350.   Set_Value   C.7.2.
  46351.   Set_Im   G.1.1.
  46352.   Set_Re   G.1.1.
  46353.   Sets   3.9.3.
  46354.   shared passive library unit   E.2(4), see E.2.1(4), see E.2.1(4).
  46355.   shared variable
  46356.     protection of   9.10.
  46357.   Shared_Array   9.4(31), see 9.4(31), see 9.4(32).
  46358.   Shared_Passive pragma   E.2.1(3), see L(3), see L(34).
  46359.   Sharp   J.5.
  46360.   shift   B.2.
  46361.   Shift_Left   B.2.
  46362.   Shift_Right   B.2.
  46363.   Shift_Right_Arithmetic   B.2.
  46364.   Short   13.3(82), see B.3(82), see B.3(7).
  46365.   short-circuit control form   4.5.1.
  46366.   Short_Float   3.5.7.
  46367.   Short_Integer   3.5.4.
  46368.   Shut_Down   9.1.
  46369.   SI   A.3.3.
  46370.   Sigma   12.1(24), see 12.2(24), see 12.2(12).
  46371.   signal (an exception)
  46372.     See raise   11.
  46373.   signal
  46374.     See interrupt   C.3.
  46375.     as defined between actions   9.10.
  46376.   signal handling
  46377.     example   9.7.4.
  46378.   signed integer type   3.5.4.
  46379.   signed_char   B.3.
  46380.   signed_integer_type_definition   3.5.4.
  46381.     used   3.5.4(2), see P(2), see P(1).
  46382.   Signed_Zeros attribute   A.5.3(13), see K(13), see K(221).
  46383.   simple entry call   9.5.3.
  46384.   simple_expression   4.4.
  46385.     used   3.5(3), see 3.5.4(3),  3.5.7(3), see 3.5.4(3),  3.5.7(3),
  46386.         4.4(3), see 13.5.1(5), see 13.5.1(3), see 13.5.1(5), see 13.5.1(6),
  46387.         P.
  46388.   simple_statement   5.1.
  46389.     used   5.1(3), see P(3), see P(1).
  46390.   Sin A.5.1(5), see G.1.2(4)
  46391.   single
  46392.     class expected type   8.6.
  46393.   single entry   9.5.2.
  46394.   Single_Precision_Complex_Types   B.5.
  46395.   single_protected_declaration   9.4.
  46396.     used   3.3.1(2), see P(2), see P(1).
  46397.   single_task_declaration   9.1.
  46398.     used   3.3.1(2), see P(2), see P(1).
  46399.   Singular   11.1.
  46400.   Sinh   A.5.1(7), see G.1.2(7), see G.1.2(6).
  46401.   size   A.8.4(15), see A.12.1(15), see A.12.1(23).
  46402.     of an object   13.1.
  46403.   Size attribute   13.3(40), see 13.3(40), see 13.3(45),
  46404.            K(223),   K(223),   K(228).
  46405.   Size clause   13.3(7), see 13.3(41), see 13.3(7), see 13.3(41), see 13.3(48).
  46406.   size_t   B.3.
  46407.   Skip_Line   A.10.1.
  46408.   Skip_Page   A.10.1.
  46409.   slice   4.1.2(2), see A.4.4(28), see A.4.5(2), see A.4.4(28), see A.4.5(22).
  46410.     used   4.1(2), see P(2), see P(1).
  46411.   small
  46412.     of a fixed point type   3.5.9.
  46413.   Small attribute   3.5.10(2), see K(2), see K(230).
  46414.   Small clause   3.5.10(2), see 13.3(2), see 13.3(7).
  46415.   Small_Int   3.2.2(15), see 3.5.4(15), see 3.5.4(35).
  46416.   SO   A.3.3(5), see J.5(5), see J.5(4).
  46417.   Soft_Hyphen   A.3.3.
  46418.   SOH   A.3.3.
  46419.   solidus   2.1(15), see A.3.3(15), see A.3.3(8).
  46420.   Source   13.9.
  46421.   SPA   A.3.3.
  46422.   Space   A.3.3(8), see A.4.1(8), see A.4.1(4).
  46423.   space_character   2.1.
  46424.     used   2.1(3), see P(3), see P(1).
  46425.   special graphic character
  46426.     a category of Character   A.3.2.
  46427.   special_character   2.1.
  46428.     used   2.1(3), see P(3), see P(1).
  46429.     names   2.1.
  46430.   Special_Key   3.4.
  46431.   Special_Set   A.4.6.
  46432.   Specialized Needs Annexes   1.1.2.
  46433.   specifiable (of an attribute and for an entity)   13.3.
  46434.   specifiable
  46435.     of Address for entries   J.7.1.
  46436.     of Address for stand-alone objects and for program units
  46437.        13.3.
  46438.     of Alignment for first subtypes and objects   13.3.
  46439.     of Bit_Order for record types and record extensions
  46440.        13.5.3.
  46441.     of Component_Size for array types   13.3.
  46442.     of External_Tag for a tagged type   13.3(75), see K(75), see K(65).
  46443.     of Input for a type   13.13.2.
  46444.     of Machine_Radix for decimal first subtypes   F.1.
  46445.     of Output for a type   13.13.2.
  46446.     of Read for a type   13.13.2.
  46447.     of Size for first subtypes   13.3.
  46448.     of Size for stand-alone objects   13.3.
  46449.     of Small for fixed point types   3.5.10.
  46450.     of Storage_Pool for a non-derived access-to-object type
  46451.        13.11.
  46452.     of Storage_Size for a task first subtype   J.9.
  46453.     of Storage_Size for a non-derived access-to-object type
  46454.        13.11.
  46455.     of Write for a type   13.13.2.
  46456.   specific type   3.4.1.
  46457.   specified (not!)   1.1.3.
  46458.   specified
  46459.     of an aspect of representation of an entity   13.1.
  46460.   specified discriminant   3.7.
  46461.   Spin 9.7.3(6)
  46462.   Split   9.6(14), see D.8(14), see D.8(16).
  46463.   Sqrt   A.5.1(4), see B.1(4), see B.1(51), G.1.2(3)
  46464.   Square   3.2.2(15), see 3.7(35), see 12.3(15), see 3.7(35), see 12.3(24).
  46465.   Squaring   12.1(22), see 12.2(22), see 12.2(7).
  46466.   SS2   A.3.3.
  46467.   SS3   A.3.3.
  46468.   SSA   A.3.3.
  46469.   ST   A.3.3.
  46470.   Stack   12.8(3), see 12.8(4), see 12.8(3), see 12.8(4), see 12.8(14).
  46471.   Stack_Bool   12.8.
  46472.   Stack_Int   12.8.
  46473.   Stack_Real   12.8.
  46474.   stand-alone constant   3.3.1.
  46475.     corresponding to a formal object of mode in 12.4(10)
  46476.   stand-alone object   3.3.1.
  46477.   stand-alone variable   3.3.1.
  46478.   Standard   A.1.
  46479.   standard error file   A.10.
  46480.   standard input file   A.10.
  46481.   standard mode   1.1.5.
  46482.   standard output file   A.10.
  46483.   standard storage pool   13.11.
  46484.   Standard_Error   A.10.1(16), see A.10.1(16), see A.10.1(19).
  46485.   Standard_Input   A.10.1(16), see A.10.1(16), see A.10.1(19).
  46486.   Standard_Output   A.10.1(16), see A.10.1(16), see A.10.1(19).
  46487.   State   3.8.1(24), see 13.5.1(24), see 13.5.1(26),
  46488.        A.5.2(11), see A.5.2(11), see A.5.2(23).
  46489.   State_Mask   13.5.1.
  46490.   statement   5.1.
  46491.     used   5.1(2), see P(2), see P(1).
  46492.   statement_identifier   5.1.
  46493.     used   5.1(7), see 5.5(2), see 5.6(2), see P(7), see 5.5(2), see 5.6(2), see P(1).
  46494.   static   4.9.
  46495.     constant   4.9.
  46496.     constraint   4.9.
  46497.     delta constraint   4.9.
  46498.     digits constraint   4.9.
  46499.     discrete_range   4.9.
  46500.     discriminant constraint   4.9.
  46501.     expression   4.9.
  46502.     function   4.9.
  46503.     index constraint   4.9.
  46504.     range   4.9.
  46505.     range constraint   4.9.
  46506.     scalar subtype   4.9.
  46507.     string subtype   4.9.
  46508.     subtype   4.9(26), see 12.4(26), see 12.4(9).
  46509.   static semantics   1.1.2.
  46510.   statically
  46511.     constrained   4.9.
  46512.     denote   4.9.
  46513.   statically compatible
  46514.     for a constraint and a scalar subtype   4.9.1.
  46515.     for a constraint and an access or composite subtype
  46516.        4.9.1.
  46517.     for two subtypes   4.9.1.
  46518.   statically deeper   3.10.2(4), see 3.10.2(4), see 3.10.2(17).
  46519.   statically determined tag   3.9.2.
  46520.     [partial]   3.9.2(15), see 3.9.2(15), see 3.9.2(19).
  46521.   statically matching
  46522.     effect on subtype-specific aspects   13.1.
  46523.     for constraints   4.9.1.
  46524.     for ranges   4.9.1.
  46525.     for subtypes   4.9.1.
  46526.     required   3.9.2(10), see 3.10.2(27), see 4.6(10), see 3.10.2(27), see 4.6(12),
  46527.           4.6(16),   6.3.1(16),  6.3.1(16),   6.3.1(16),  6.3.1(17),
  46528.           6.3.1(23), see 7.3(13),   12.5.1(23), see 7.3(13),   12.5.1(14),
  46529.           12.5.3(6), see 12.5.3(7),  12.5.4(6), see 12.5.3(7),  12.5.4(3),
  46530.           12.7.
  46531.   statically tagged   3.9.2.
  46532.   Status_Error   A.8.1(15),  A.8.4(18), see A.10.1(15),  A.8.4(18), see A.10.1(85),
  46533.           A.12.1(26), see A.13(26), see A.13(4).
  46534.   storage deallocation
  46535.     unchecked   13.11.2.
  46536.   storage element   13.3.
  46537.   storage management
  46538.     user-defined   13.11.
  46539.   storage node   E.
  46540.   storage place
  46541.     of a component   13.5.
  46542.   storage place attributes
  46543.     of a component   13.5.2.
  46544.   storage pool   3.10.
  46545.   storage pool element   13.11.
  46546.   storage pool type   13.11.
  46547.   Storage_Array   13.7.1.
  46548.   Storage_Check   11.5.
  46549.     [partial]   11.1(6),   13.3(6),   13.3(67),
  46550.           13.11(17), see D.7(17), see D.7(15).
  46551.   Storage_Count   13.7.1.
  46552.     subtype in package System.Storage_Elements   13.7.1.
  46553.   Storage_Element   13.7.1.
  46554.   Storage_Elements
  46555.     child of System   13.7.1.
  46556.   Storage_Error   A.1.
  46557.     raised by failure of run-time check
  46558.        4.8(14),   11.1(4),  11.1(14),   11.1(4),  11.1(6),
  46559.        11.5(23),  13.3(67), see 13.11(23),  13.3(67), see 13.11(17),
  46560.        13.11(18), see A.7(14),  D.7(18), see A.7(14),  D.7(15).
  46561.   Storage_Offset   13.7.1.
  46562.   Storage_Pool attribute   13.11(13), see K(13), see K(232).
  46563.   Storage_Pool clause   13.3(7), see 13.11(7), see 13.11(15).
  46564.   Storage_Pools
  46565.     child of System   13.11.
  46566.   Storage_Size   13.11.
  46567.   Storage_Size attribute   13.3(60), see 13.11(60), see 13.11(14),
  46568.                J.9(2),   K(2),   K(234),
  46569.                K.
  46570.   Storage_Size clause   13.3(7), see 13.11(7), see 13.11(15).
  46571.     See also pragma Storage_Size   13.3.
  46572.   Storage_Size pragma   13.3(63), see L(63), see L(35).
  46573.   Storage_Unit   13.7.
  46574.     named number in package System   13.7.
  46575.   Storage_IO
  46576.     child of Ada   A.9.
  46577.   Strcpy   B.3(78), see B.3.2(78), see B.3.2(48).
  46578.   stream   13.13(1),  A.12.1(1),  A.12.1(13),
  46579.        A.12.2(4), see A.12.3(4), see A.12.3(4).
  46580.   stream type   13.13.
  46581.   Stream_Access   A.12.1(4), see A.12.2(3), see A.12.3(4), see A.12.2(3), see A.12.3(3).
  46582.   Stream_Element   13.13.1.
  46583.   Stream_Element_Array   13.13.1.
  46584.   Stream_Element_Count   13.13.1.
  46585.   Stream_Element_Offset   13.13.1.
  46586.   Stream_IO
  46587.     child of Ada.Streams   A.12.1.
  46588.   Streams
  46589.     child of Ada   13.13.1.
  46590.   strict mode   G.2.
  46591.   String   3.6.3(4), see A.1(4), see A.1(37).
  46592.   string type   3.6.3.
  46593.   String_Access   A.4.5.
  46594.   string_element   2.6.
  46595.     used   2.6(2), see P(2), see P(1).
  46596.   string_literal   2.6.
  46597.     used   4.4(7), see 6.1(9), see P(7), see 6.1(9), see P(1).
  46598.   Strings
  46599.     child of Ada   A.4.1.
  46600.     child of Interfaces.C   B.3.1.
  46601.   Strlen   B.3.1.
  46602.   structure
  46603.     See record type   3.8.
  46604.   STS   A.3.3.
  46605.   STX   A.3.3(5), see J.5(5), see J.5(4).
  46606.   SUB   A.3.3(6), see J.5(6), see J.5(4).
  46607.   subaggregate
  46608.     of an array_aggregate   4.3.3.
  46609.   subcomponent   3.2.
  46610.   subprogram   6.
  46611.     abstract   3.9.3.
  46612.   subprogram call   6.4.
  46613.   subprogram instance   12.3.
  46614.   subprogram_body   6.3.
  46615.     used   3.11(6),   9.4(6),   9.4(8),
  46616.         10.1.1(7), see P(7), see P(1).
  46617.   subprogram_body_stub   10.1.3.
  46618.     used   10.1.3(2), see P(2), see P(1).
  46619.   subprogram_declaration   6.1.
  46620.     used   3.1(3),   9.4(5), see 9.4(3),   9.4(5), see 9.4(8),
  46621.         10.1.1(5), see P(5), see P(1).
  46622.   subprogram_default   12.6.
  46623.     used   12.6(2), see P(2), see P(1).
  46624.   subprogram_renaming_declaration   8.5.4.
  46625.     used   8.5(2), see 10.1.1(6), see P(2), see 10.1.1(6), see P(1).
  46626.   subprogram_specification   6.1.
  46627.     used   6.1(2),   6.1(3),   6.3(2),   6.1(3),   6.3(2),
  46628.         8.5.4(2), see 10.1.3(3), see 12.1(2), see 10.1.3(3), see 12.1(3),
  46629.         12.6(2),  P(2),  P(1).
  46630.   subsystem   10.1(3), see N(3), see N(22).
  46631.   Subtraction   3.9.1.
  46632.   subtype (of an object)
  46633.     See actual subtype of an object   3.3(23), see 3.3.1(23), see 3.3.1(9).
  46634.   subtype   3.2(8), see N(8), see N(38).
  46635.   subtype conformance   6.3.1.
  46636.     [partial]   3.10.2(34), see 9.5.4(34), see 9.5.4(17).
  46637.     required   3.9.2(10), see 3.10.2(32), see 4.6(10), see 3.10.2(32), see 4.6(19),
  46638.           8.5.4(5),  9.5.4(5),   13.3(5),  9.5.4(5),   13.3(6).
  46639.   subtype conversion
  46640.     See also implicit subtype conversion   4.6.
  46641.     See type conversion   4.6.
  46642.   subtype-specific
  46643.     of a representation item   13.1.
  46644.     of an aspect   13.1.
  46645.   subtype_declaration   3.2.2.
  46646.     used   3.1(3), see P(3), see P(1).
  46647.   subtype_indication   3.2.2.
  46648.     used   3.2.2(2), see 3.3.1(2), see 3.4(2), see 3.3.1(2), see 3.4(2),
  46649.         3.6(6),   3.6(7),   3.6.1(6),   3.6(7),   3.6.1(3),
  46650.         3.10(3),  4.8(2),   7.3(3),  4.8(2),   7.3(3),
  46651.         P.
  46652.   subtype_mark   3.2.2.
  46653.     used   3.2.2(3), see 3.6(4),   3.7(3), see 3.6(4),   3.7(5),
  46654.         3.10(6),  4.3.2(3), see 4.4(6),  4.3.2(3), see 4.4(3),
  46655.         4.6(2),   4.7(2),   6.1(2),   4.7(2),   6.1(13),
  46656.         6.1(15),  8.4(4),   8.5.1(15),  8.4(4),   8.5.1(2),
  46657.         12.3(5),  12.4(2),  12.5.1(5),  12.4(2),  12.5.1(3),
  46658.         P.
  46659.   subtypes
  46660.     of a profile   6.1.
  46661.   subunit   10.1.3(7), see 10.1.3(7), see 10.1.3(8).
  46662.     used   10.1.1(3), see P(3), see P(1).
  46663.   Succ attribute   3.5(22), see K(22), see K(238).
  46664.   Suit   3.5.1.
  46665.   Sum   12.1(24), see 12.2(24), see 12.2(10).
  46666.   super
  46667.     See view conversion   4.6.
  46668.   Superscript_One   A.3.3.
  46669.   Superscript_Three   A.3.3.
  46670.   Superscript_Two   A.3.3.
  46671.   Suppress pragma   11.5(4), see L(4), see L(36).
  46672.   suppressed check   11.5.
  46673.   Suspend_Until_True   D.10.
  46674.   Suspension_Object   D.10.
  46675.   Swap   12.3.
  46676.   Switch   6.1.
  46677.   SYN   A.3.3(6), see J.5(6), see J.5(4).
  46678.   synchronization   9.
  46679.   Synchronous_Task_Control
  46680.     child of Ada   D.10.
  46681.   syntactic category   1.1.4.
  46682.   syntax
  46683.     complete listing   P.
  46684.     cross reference   P.
  46685.     notation   1.1.4.
  46686.     under Syntax heading   1.1.2.
  46687.   System   13.7.
  46688.   System.Address_To_Access_Conversions   13.7.2.
  46689.   System.Machine_Code   13.8.
  46690.   System.RPC   E.5.
  46691.   System.Storage_Elements   13.7.1.
  46692.   System.Storage_Pools   13.11.
  46693.   System_Name   13.7.
  46694.   systems programming   C.
  46695.  
  46696.  
  46697. ΓòÉΓòÉΓòÉ 50. index ΓòÉΓòÉΓòÉ
  46698.  
  46699.   T  13.11.
  46700.   Table   3.2.1(15),  3.6(28), see 12.5(15),  3.6(28), see 12.5(14),
  46701.        12.5.3(11), see 12.8(5), see 12.8(11), see 12.8(5), see 12.8(14).
  46702.   Tag   3.9.
  46703.   Tag attribute   3.9(16), see 3.9(16), see 3.9(18),
  46704.            K(242),  K(242),  K(244).
  46705.   tag indeterminate   3.9.2.
  46706.   tag of an object   3.9.
  46707.     class-wide object   3.9.
  46708.     object created by an allocator   3.9.
  46709.     preserved by type conversion and parameter passing
  46710.        3.9.
  46711.     returned by a function   3.9(23), see 3.9(23), see 3.9(24).
  46712.     stand-alone object, component, or aggregate   3.9.
  46713.   Tag_Check   11.5.
  46714.     [partial]   3.9.2(16), see 4.6(42), see 4.6(16), see 4.6(42), see 4.6(52),
  46715.           5.2(10),   6.5(10),   6.5(9).
  46716.   Tag_Error   3.9.
  46717.   tagged type   3.9(2), see N(2), see N(39).
  46718.   Tags
  46719.     child of Ada   3.9.
  46720.   tail (of a queue)   D.2.1.
  46721.   Tail   A.4.3(37), see A.4.3(38), see A.4.4(37), see A.4.3(38), see A.4.4(72),
  46722.       A.4.4(73), see A.4.5(67), see A.4.5(73), see A.4.5(67), see A.4.5(68).
  46723.   Take   3.9.3.
  46724.   Tan   A.5.1(5), see G.1.2(5), see G.1.2(4).
  46725.   Tanh   A.5.1(7), see G.1.2(7), see G.1.2(6).
  46726.   Tape   E.4.2.
  46727.   Tape_Client   E.4.2.
  46728.   Tape_Driver   E.4.2(4), see E.4.2(4), see E.4.2(5).
  46729.   Tape_Ptr   E.4.2.
  46730.   Tapes   E.4.2.
  46731.   target   13.9.
  46732.     of an assignment_statement   5.2.
  46733.     of an assignment operation   5.2.
  46734.   target entry
  46735.     of a requeue_statement   9.5.4.
  46736.   target object
  46737.     of a requeue_statement   9.5.
  46738.     of a call on an entry or a protected subprogram   9.5.
  46739.   target statement
  46740.     of a goto_statement   5.8.
  46741.   target subtype
  46742.     of a type_conversion   4.6.
  46743.   task   9.
  46744.     activation   9.2.
  46745.     completion   9.3.
  46746.     dependence   9.3.
  46747.     execution   9.2.
  46748.     termination   9.3.
  46749.   task declaration   9.1.
  46750.   task dispatching   D.2.1.
  46751.   task dispatching point   D.2.1.
  46752.     [partial]   D.2.1(8), see D.2.2(8), see D.2.2(12).
  46753.   task dispatching policy   D.2.2.
  46754.     [partial]   D.2.1.
  46755.   task priority   D.1.
  46756.   task state
  46757.     abnormal   9.8.
  46758.     blocked   9.
  46759.     callable   9.9.
  46760.     held   D.11.
  46761.     inactive   9.
  46762.     ready   9.
  46763.     terminated   9.
  46764.   Task type   N.
  46765.   task unit   9.
  46766.   Task_Attributes
  46767.     child of Ada   C.7.2.
  46768.   task_body   9.1.
  46769.     used   3.11(6), see P(6), see P(1).
  46770.   task_body_stub   10.1.3.
  46771.     used   10.1.3(2), see P(2), see P(1).
  46772.   task_definition   9.1.
  46773.     used   9.1(2), see 9.1(3), see P(2), see 9.1(3), see P(1).
  46774.   Task_Dispatching_Policy pragma   D.2.2(2), see L(2), see L(37).
  46775.   Task_Identification
  46776.     child of Ada   C.7.1.
  46777.   task_item   9.1.
  46778.     used   9.1(4), see P(4), see P(1).
  46779.   task_type_declaration   9.1.
  46780.     used   3.2.1(3), see P(3), see P(1).
  46781.   Task_ID   C.7.1.
  46782.   Tasking_Error   A.1.
  46783.     raised by failure of run-time check
  46784.        9.2(5),    9.5.3(21),   11.1(5),    9.5.3(21),   11.1(4),
  46785.        13.11.2(13), see 13.11.2(14), see C.7.2(13), see 13.11.2(14), see C.7.2(13),
  46786.        D.5(8),    D.11(8),    D.11(8).
  46787.   template   12.
  46788.     See generic unit   12.
  46789.     for a formal package   12.7.
  46790.   term   4.4.
  46791.     used   4.4, P(1)
  46792.   terminal interrupt
  46793.     example   9.7.4.
  46794.   terminate_alternative   9.7.1.
  46795.     used   9.7.1(4), see P(4), see P(1).
  46796.   terminated
  46797.     a task state   9.
  46798.   Terminated attribute   9.9(3), see K(3), see K(246).
  46799.   termination
  46800.     of a partition   E.1.
  46801.   Terminator_Error   B.3.
  46802.   Test   B.3.
  46803.   Test_Call   B.4.
  46804.   Test_External_Formats   B.4.
  46805.   Test_Pointers   B.3.2.
  46806.   tested type
  46807.     of a membership test   4.5.2.
  46808.   text of a program   2.2.
  46809.   Text_Streams
  46810.     child of Ada.Text_IO   A.12.2(3), see A.12.3(3), see A.12.3(3).
  46811.   Text_IO   J.1.
  46812.     child of Ada   A.10.1.
  46813.   throw (an exception)
  46814.     See raise   11.
  46815.   tick   2.1(15), see 13.7(10), see D.8(15), see 13.7(10), see D.8(7).
  46816.     named number in package System   13.7.
  46817.   Tilde   A.3.3.
  46818.   Time   9.6(10), see D.8(10), see D.8(4).
  46819.   time base   9.6.
  46820.   time limit
  46821.     example   9.7.4.
  46822.   time type   9.6.
  46823.   Time-dependent Reset procedure
  46824.     of the random number generator   A.5.2.
  46825.   time-out
  46826.     See asynchronous_select   9.7.4.
  46827.     See selective_accept   9.7.1.
  46828.     See timed_entry_call   9.7.2.
  46829.     example   9.7.4.
  46830.   Time_Error   9.6.
  46831.   Time_First   D.8.
  46832.   Time_Last   D.8.
  46833.   Time_Span   D.8.
  46834.   Time_Span_First   D.8.
  46835.   Time_Span_Last   D.8.
  46836.   Time_Span_Unit   D.8.
  46837.   Time_Span_Zero   D.8.
  46838.   Time_Unit   D.8.
  46839.   Time_Of   9.6(15), see D.8(15), see D.8(16).
  46840.   timed_entry_call   9.7.2.
  46841.     used   9.7(2), see P(2), see P(1).
  46842.   timer interrupt
  46843.     example   9.7.4.
  46844.   times operator   4.4(1), see 4.5.5(1), see 4.5.5(1).
  46845.   timing
  46846.     See delay_statement   9.6.
  46847.   TM   8.5.3.
  46848.   To_Ada   B.3(22), see B.3(26), see B.3(22), see B.3(26), see B.3(28),
  46849.        B.3(32), see B.3(37), see B.3(32), see B.3(37), see B.3(39),
  46850.        B.4(17), see B.4(19), see B.5(17), see B.4(19), see B.5(13),
  46851.        B.5(14), see B.5(14), see B.5(16).
  46852.   To_Address   13.7.1(10), see 13.7.2(10), see 13.7.2(3).
  46853.   To_Basic   A.3.2(6), see A.3.2(6), see A.3.2(7).
  46854.   To_Binary   B.4(45), see B.4(45), see B.4(48).
  46855.   To_Bounded_String   A.4.4.
  46856.   To_Character   A.3.2.
  46857.   To_COBOL   B.4(17), see B.4(17), see B.4(18).
  46858.   To_Decimal   B.4(35), see B.4(35), see B.4(40),
  46859.          B.4(44), see B.4(44), see B.4(47).
  46860.   To_Display   B.4.
  46861.   To_Domain A.4.2(24), see A.4.7(24)
  46862.   To_Duration   D.8.
  46863.   To_Fortran   B.5(13), see B.5(14), see B.5(13), see B.5(14), see B.5(15).
  46864.   To_Integer   13.7.1.
  46865.   To_ISO_646   A.3.2(11), see A.3.2(11), see A.3.2(12).
  46866.   To_Long_Binary   B.4.
  46867.   To_Lower   A.3.2(6), see A.3.2(6), see A.3.2(7).
  46868.   To_Mapping   A.4.2(23), see A.4.7(23), see A.4.7(23).
  46869.   To_Packed   B.4.
  46870.   To_Picture   F.3.3.
  46871.   To_Pointer   13.7.2.
  46872.   To_Range   A.4.2(24), see A.4.7(24), see A.4.7(25).
  46873.   To_Ranges   A.4.2(10), see A.4.7(10), see A.4.7(10).
  46874.   To_Sequence   A.4.2(19), see A.4.7(19), see A.4.7(19).
  46875.   To_Set   A.4.2(8),  A.4.2(9), see A.4.2(8),  A.4.2(9), see A.4.2(17),
  46876.        A.4.2(18), see A.4.7(8), see A.4.7(18), see A.4.7(8), see A.4.7(9),
  46877.        A.4.7(17), see A.4.7(17), see A.4.7(18).
  46878.   To_String   A.3.2(16), see A.4.4(12), see A.4.5(16), see A.4.4(12), see A.4.5(11).
  46879.   To_Time_Span   D.8.
  46880.   To_Unbounded_String   A.4.5(9), see A.4.5(9), see A.4.5(10).
  46881.   To_Upper   A.3.2(6), see A.3.2(6), see A.3.2(7).
  46882.   To_Wide_Character   A.3.2.
  46883.   To_Wide_String   A.3.2.
  46884.   To_C   B.3(21), see B.3(25), see B.3(21), see B.3(25), see B.3(27),
  46885.       B.3(32), see B.3(36), see B.3(32), see B.3(36), see B.3(38).
  46886.   token
  46887.     See lexical element   2.2.
  46888.   Tolerance   3.3.1.
  46889.   Trailing_Nonseparate   B.4.
  46890.   Trailing_Separate   B.4.
  46891.   transfer of control   5.1.
  46892.   Translate   A.4.3(18), see A.4.3(19), see A.4.3(18), see A.4.3(19), see A.4.3(20),
  46893.          A.4.3(21), see A.4.4(53), see A.4.4(21), see A.4.4(53), see A.4.4(54),
  46894.          A.4.4(55), see A.4.4(56), see A.4.5(55), see A.4.4(56), see A.4.5(48),
  46895.          A.4.5(49), see A.4.5(50), see A.4.5(49), see A.4.5(50), see A.4.5(51).
  46896.   Traverse_Tree   6.1.
  46897.   triggering_alternative   9.7.4.
  46898.     used   9.7.4(2), see P(2), see P(1).
  46899.   triggering_statement   9.7.4.
  46900.     used   9.7.4(3), see P(3), see P(1).
  46901.   Trim   A.4.3(31), see A.4.3(32), see A.4.3(31), see A.4.3(32), see A.4.3(33),
  46902.       A.4.3(34), see A.4.4(67), see A.4.4(34), see A.4.4(67), see A.4.4(68),
  46903.       A.4.4(69), see A.4.5(61), see A.4.5(69), see A.4.5(61), see A.4.5(62),
  46904.       A.4.5(63), see A.4.5(63), see A.4.5(64).
  46905.   Trim_End   A.4.1.
  46906.   True   3.5.3.
  46907.   Truncation   A.4.1.
  46908.   Truncation attribute   A.5.3(42), see K(42), see K(248).
  46909.   two's complement
  46910.     modular types   3.5.4.
  46911.   Two_Pi   3.3.2.
  46912.   type   3.2(1), see N(1), see N(41).
  46913.     See also tag   3.9.
  46914.     abstract   3.9.3.
  46915.     See also  language-defined types
  46916.   type conformance   6.3.1.
  46917.     [partial]   3.4(17), see 8.3(17), see 8.3(8),
  46918.           8.3(26), see 10.1.4(26), see 10.1.4(4).
  46919.     required   3.11.1(5), see 4.1.4(5), see 4.1.4(14),
  46920.           8.6(26),   9.5.4(26),   9.5.4(3).
  46921.   type conversion   4.6.
  46922.     See also qualified_expression   4.7.
  46923.     access   4.6(13), see 4.6(18), see 4.6(13), see 4.6(18), see 4.6(47).
  46924.     arbitrary order   1.1.4.
  46925.     array   4.6(9), see 4.6(9), see 4.6(36).
  46926.     composite (non-array)   4.6(21), see 4.6(21), see 4.6(40).
  46927.     enumeration   4.6(21), see 4.6(21), see 4.6(34).
  46928.     numeric   4.6(8), see 4.6(8), see 4.6(29).
  46929.     unchecked   13.9.
  46930.   type conversion, implicit
  46931.     See implicit subtype conversion   4.6.
  46932.   type extension   3.9(2), see 3.9.1(2), see 3.9.1(1).
  46933.   type of a discrete_range   3.6.1.
  46934.   type of a range   3.5.
  46935.   type parameter
  46936.     See discriminant   3.7.
  46937.   type profile
  46938.     See profile, type conformant   6.3.1.
  46939.   type resolution rules   8.6.
  46940.     if any type in a specified class of types is expected
  46941.        8.6.
  46942.     if expected type is specific   8.6.
  46943.     if expected type is universal or class-wide   8.6.
  46944.   type tag
  46945.     See tag   3.9.
  46946.   type-related
  46947.     aspect   13.1.
  46948.     representation item   13.1.
  46949.   type_conversion   4.6.
  46950.     used   4.1(2), see P(2), see P(1).
  46951.     See also unchecked type conversion   13.9.
  46952.   type_declaration   3.2.1.
  46953.     used   3.1(3), see P(3), see P(1).
  46954.   type_definition   3.2.1.
  46955.     used   3.2.1(3), see P(3), see P(1).
  46956.   Type_Set   A.10.1(7), see A.10.10(7), see A.10.10(3).
  46957.   types
  46958.     of a profile   6.1.
  46959.  
  46960.  
  46961. ΓòÉΓòÉΓòÉ 51. index ΓòÉΓòÉΓòÉ
  46962.  
  46963.   UC_Icelandic_Eth   A.3.3.
  46964.   UC_Icelandic_Thorn   A.3.3.
  46965.   UC_A_Acute   A.3.3.
  46966.   UC_A_Circumflex   A.3.3.
  46967.   UC_A_Diaeresis   A.3.3.
  46968.   UC_A_Grave   A.3.3.
  46969.   UC_A_Ring   A.3.3.
  46970.   UC_A_Tilde   A.3.3.
  46971.   UC_AE_Diphthong   A.3.3.
  46972.   UC_C_Cedilla   A.3.3.
  46973.   UC_E_Acute   A.3.3.
  46974.   UC_E_Circumflex   A.3.3.
  46975.   UC_E_Diaeresis   A.3.3.
  46976.   UC_E_Grave   A.3.3.
  46977.   UC_I_Acute   A.3.3.
  46978.   UC_I_Circumflex   A.3.3.
  46979.   UC_I_Diaeresis   A.3.3.
  46980.   UC_I_Grave   A.3.3.
  46981.   UC_N_Tilde   A.3.3.
  46982.   UC_O_Acute   A.3.3.
  46983.   UC_O_Circumflex   A.3.3.
  46984.   UC_O_Diaeresis   A.3.3.
  46985.   UC_O_Grave   A.3.3.
  46986.   UC_O_Oblique_Stroke   A.3.3.
  46987.   UC_O_Tilde   A.3.3.
  46988.   UC_U_Acute   A.3.3.
  46989.   UC_U_Circumflex   A.3.3.
  46990.   UC_U_Diaeresis   A.3.3.
  46991.   UC_U_Grave   A.3.3.
  46992.   UC_Y_Acute   A.3.3.
  46993.   UCHAR_MAX   B.3.
  46994.   ultimate ancestor
  46995.     of a type   3.4.1.
  46996.   unary adding operator   4.5.4.
  46997.   unary operator   4.5.
  46998.   unary_adding_operator   4.5.
  46999.     used   4.4(4), see P(4), see P(1).
  47000.   Unbiased_Rounding attribute   A.5.3(39), see K(39), see K(252).
  47001.   Unbounded   A.10.1.
  47002.     child of Ada.Strings   A.4.5.
  47003.   Unbounded_String   A.4.5.
  47004.   unchecked storage deallocation   13.11.2.
  47005.   unchecked type conversion   13.9.
  47006.   Unchecked_Access attribute   13.10(3), see H.4(3), see H.4(18),
  47007.                  K.
  47008.     See also Access attribute   3.10.2.
  47009.   Unchecked_Conversion   J.1.
  47010.     child of Ada   13.9.
  47011.   Unchecked_Deallocation   J.1.
  47012.     child of Ada   13.11.2.
  47013.   unconstrained   3.2.
  47014.     object   3.3.1(9), see 3.10(9), see 6.4.1(9), see 3.10(9), see 6.4.1(16).
  47015.     subtype   3.2(9),   3.4(6),   3.5(9),   3.4(6),   3.5(7),
  47016.          3.5.1(10), see 3.5.4(9),  3.5.4(10), see 3.5.4(9),  3.5.4(10),
  47017.          3.5.7(11), see 3.5.9(13), see 3.5.9(11), see 3.5.9(13), see 3.5.9(16),
  47018.          3.6(15),   3.6(16),   3.7(15),   3.6(16),   3.7(26),
  47019.          3.9(15),   3.10(14),  K(15),   3.10(14),  K(33).
  47020.   unconstrained_array_definition   3.6.
  47021.     used   3.6(2), see P(2), see P(1).
  47022.   undefined result   11.6.
  47023.   underline   2.1(15), see J.5(15), see J.5(6).
  47024.     used   2.3(2),   2.4.1(2),   2.4.1(3),
  47025.         2.4.2(4), see P(4), see P(1).
  47026.   Uniformly_Distributed   A.5.2.
  47027.   uninitialized allocator   4.8.
  47028.   uninitialized variables   13.9.1.
  47029.     [partial]   3.3.1.
  47030.   Union   3.9.3.
  47031.   unit consistency   E.3.
  47032.   Unit_Set   3.9.3.
  47033.   universal type   3.4.1.
  47034.   universal_fixed
  47035.     [partial]   3.5.6.
  47036.   universal_integer   3.5.4.
  47037.     [partial]   3.5.4.
  47038.   universal_real
  47039.     [partial]   3.5.6.
  47040.   unknown discriminants   3.7.
  47041.   unknown_discriminant_part   3.7.
  47042.     used   3.7(2), see P(2), see P(1).
  47043.   unmarshalling   E.4.
  47044.   unpolluted   13.13.1.
  47045.   unsigned   B.3, B.4(23)
  47046.   unsigned type
  47047.     See modular type   3.5.4.
  47048.   Unsigned_   B.2.
  47049.   unsigned_char   B.3.
  47050.   unsigned_long   B.3.
  47051.   unsigned_short   B.3.
  47052.   unspecified   1.1.3.
  47053.     [partial]   2.1(5),    4.5.2(13), see 4.5.5(5),    4.5.2(13), see 4.5.5(21),
  47054.           6.2(11),   7.2(5),   9.8(11),   7.2(5),   9.8(14),
  47055.           10.2(26),   11.1(6),   11.5(26),   11.1(6),   11.5(27),
  47056.           13.1(18),   13.7.2(5), see 13.9.1(18),   13.7.2(5), see 13.9.1(7),
  47057.           13.11(20),  A.1(1),   A.5.1(20),  A.1(1),   A.5.1(34),
  47058.           A.5.2(28),  A.5.2(34), see A.7(28),  A.5.2(34), see A.7(6),
  47059.           A.10(8),   A.10.7(8), see A.10.7(8),   A.10.7(8), see A.10.7(12),
  47060.           A.10.7(19), see A.14(1),   A.15(19), see A.14(1),   A.15(20),
  47061.           D.2.2(6),   D.8(19),   G.1.1(6),   D.8(19),   G.1.1(40),
  47062.           G.1.2(33),  G.1.2(48), see H(33),  G.1.2(48), see H(4),
  47063.           H.2.
  47064.   Up_To_K   3.2.2.
  47065.   update   B.3.1(18), see B.3.1(18), see B.3.1(19).
  47066.     the value of an object   3.3.
  47067.   Update_Error   B.3.1.
  47068.   upper bound
  47069.     of a range   3.5.
  47070.   upper-case letter
  47071.     a category of Character   A.3.2.
  47072.   upper_case_identifier_letter   2.1.
  47073.   Upper_Case_Map   A.4.6.
  47074.   Upper_Set   A.4.6.
  47075.   US   A.3.3.
  47076.   usage name   3.1.
  47077.   use-visible   8.3(4), see 8.4(4), see 8.4(9).
  47078.   use_clause   8.4.
  47079.     used   3.11(4), see 10.1.2(4), see 10.1.2(3),
  47080.         12.1(5), see P(5), see P(1).
  47081.   Use_Error   A.8.1(15),  A.8.4(18), see A.10.1(15),  A.8.4(18), see A.10.1(85),
  47082.          A.12.1(26), see A.13(26), see A.13(4).
  47083.   use_package_clause   8.4.
  47084.     used   8.4(2), see P(2), see P(1).
  47085.   use_type_clause   8.4.
  47086.     used   8.4(2), see P(2), see P(1).
  47087.   User   9.1.
  47088.   user-defined assignment   7.6.
  47089.   user-defined heap management   13.11.
  47090.   user-defined operator   6.6.
  47091.   user-defined storage management   13.11.
  47092.  
  47093.  
  47094. ΓòÉΓòÉΓòÉ 52. index ΓòÉΓòÉΓòÉ
  47095.  
  47096.   Val attribute   3.5.5(5), see K(5), see K(258).
  47097.   Valid   B.4(33),  B.4(38), see B.4(33),  B.4(38), see B.4(43),
  47098.        F.3.3(5), see F.3.3(5), see F.3.3(12).
  47099.   Valid attribute   13.9.2(3), see H(6), see K(3), see H(6), see K(262).
  47100.   Value   A.4.2(21), see A.5.2(14), see A.5.2(21), see A.5.2(14), see A.5.2(26),
  47101.        B.3.1(13), see B.3.1(14), see B.3.1(13), see B.3.1(14), see B.3.1(15),
  47102.        B.3.1(16), see B.3.2(6),  B.3.2(16), see B.3.2(6),  B.3.2(7),
  47103.        C.7.2.
  47104.   Value attribute   3.5(52), see K(52), see K(264).
  47105.   value conversion   4.6.
  47106.   Var_Line   3.6.1.
  47107.   variable   3.3.
  47108.   variable object   3.3.
  47109.   variable view   3.3.
  47110.   variant   3.8.1.
  47111.     used   3.8.1(2), see P(2), see P(1).
  47112.     See also tagged type   3.9.
  47113.   variant_part   3.8.1.
  47114.     used   3.8(4), see P(4), see P(1).
  47115.   Vector   3.6(26), see 12.1(24), see 12.5.3(26), see 12.1(24), see 12.5.3(11).
  47116.   version
  47117.     of a compilation unit   E.3.
  47118.   Version attribute   E.3(3), see K(3), see K(268).
  47119.   vertical line   2.1.
  47120.   Vertical_Line   A.3.3.
  47121.   view   3.1(7), see N(12), see N(7), see N(12), see N(42).
  47122.   view conversion   4.6.
  47123.   virtual function
  47124.     See dispatching subprogram   3.9.2.
  47125.   Virtual_Length   B.3.2.
  47126.   visibility
  47127.     direct   8.3(2), see 8.3(2), see 8.3(21).
  47128.     immediate   8.3(4), see 8.3(4), see 8.3(21).
  47129.     use clause   8.3(4), see 8.4(4), see 8.4(9).
  47130.   visibility rules   8.3.
  47131.   visible   8.3(2), see 8.3(2), see 8.3(14).
  47132.     within a pragma in a context_clause   10.1.6.
  47133.     within a pragma that appears at the place of a compilation unit
  47134.        10.1.6.
  47135.     within a with_clause   10.1.6.
  47136.     within a use_clause in a context_clause   10.1.6.
  47137.     within the parent_unit_name of a library unit   10.1.6.
  47138.     within the parent_unit_name of a subunit   10.1.6.
  47139.   visible part   8.2.
  47140.     of a formal package   12.7.
  47141.     of a generic unit   8.2.
  47142.     of a package (other than a generic formal package)
  47143.        7.1.
  47144.     of a protected unit   9.4.
  47145.     of a task unit   9.1.
  47146.     of a view of a callable entity   8.2.
  47147.     of a view of a composite type   8.2.
  47148.   volatile   C.6.
  47149.   Volatile pragma   C.6(4), see L(4), see L(38).
  47150.   Volatile_Components pragma   C.6(6), see L(6), see L(39).
  47151.   Volt   3.5.9.
  47152.   VT   A.3.3.
  47153.   VTS   A.3.3.
  47154.  
  47155.  
  47156. ΓòÉΓòÉΓòÉ 53. index ΓòÉΓòÉΓòÉ
  47157.  
  47158.   wchar_t   B.3.
  47159.   Weekday   3.5.1.
  47160.   well-formed picture String
  47161.     for edited output   F.3.1.
  47162.   Wide_Bounded
  47163.     child of Ada.Strings   A.4.7.
  47164.   Wide_Character   3.5.2(3), see A.1(3), see A.1(36).
  47165.   Wide_Character_Mapping   A.4.7.
  47166.   Wide_Character_Mapping_Function   A.4.7.
  47167.   Wide_Character_Range   A.4.7.
  47168.   Wide_Character_Sequence   A.4.7.
  47169.   Wide_Character_Set   A.4.7.
  47170.   Wide_Constants
  47171.     child of Ada.Strings.Wide_Maps   A.4.7.
  47172.   Wide_Fixed
  47173.     child of Ada.Strings   A.4.7.
  47174.   Wide_Image attribute   3.5(28), see K(28), see K(270).
  47175.   Wide_Maps
  47176.     child of Ada.Strings   A.4.7.
  47177.   wide_nul   B.3.
  47178.   Wide_Space   A.4.1.
  47179.   Wide_String   3.6.3(4), see A.1(4), see A.1(41).
  47180.   Wide_Text_IO
  47181.     child of Ada   A.11.
  47182.   Wide_Unbounded
  47183.     child of Ada.Strings   A.4.7.
  47184.   Wide_Value attribute   3.5(40), see K(40), see K(274).
  47185.   Wide_Width attribute   3.5(38), see K(38), see K(278).
  47186.   Width attribute   3.5(39), see K(39), see K(280).
  47187.   with_clause   10.1.2.
  47188.     used   10.1.2(3), see P(3), see P(1).
  47189.     mentioned in 10.1.2(6)
  47190.   within
  47191.     immediately   8.1.
  47192.   word   13.3(8), see 13.5.1(8), see 13.5.1(25).
  47193.   Word_Size   13.7.
  47194.     named number in package System   13.7.
  47195.   Worker   A.5.2.
  47196.   Write   7.5(19),   7.5(20),   9.1(19),   7.5(20),   9.1(24),
  47197.        9.11(8),   9.11(9),   13.13.1(8),   9.11(9),   13.13.1(6),
  47198.        A.8.1(12),  A.8.4(13),  A.9(12),  A.8.4(13),  A.9(7),
  47199.        A.12.1(18), see A.12.1(19), see E.5(18), see A.12.1(19), see E.5(8).
  47200.   Write attribute   13.13.2(3), see 13.13.2(3), see 13.13.2(11),
  47201.             K(282),    K(282),    K(286).
  47202.   Write clause   13.3(7), see 13.13.2(7), see 13.13.2.
  47203.  
  47204.  
  47205. ΓòÉΓòÉΓòÉ 54. index ΓòÉΓòÉΓòÉ
  47206.  
  47207.   xor operator   4.4(1), see 4.5.1(1), see 4.5.1(2).
  47208.  
  47209.  
  47210. ΓòÉΓòÉΓòÉ 55. index ΓòÉΓòÉΓòÉ
  47211.  
  47212.   Year  9.6.
  47213.   Year_Number   9.6.
  47214.   Yen_Sign   A.3.3.
  47215.