CONTENTS Title Page Copyright Page Preface 1 Introduction 1.1 Scope of the Standard 1.1.1 Extent of the Standard 1.1.2 Conformity of an Implementation With the Standard 1.2 Structure of the Standard 1.3 Design Goals and Sources 1.4 Language Summary 1.4a DEC Ada 1.5 Method of Description and Syntax Notation 1.6 Classification of Errors 2 Lexical Elements 2.1 Character Set 2.2 Lexical Elements, Separators, and Delimiters 2.3 Identifiers 2.4 Numeric Literals 2.4.1 Decimal Literals 2.4.2 Based Literals 2.5 Character Literals 2.6 String Literals 2.7 Comments 2.8 Pragmas 2.9 Reserved Words 2.10 Allowable Replacements of Characters 3 Declarations and Types 3.1 Declarations 3.2 Objects and Named Numbers 3.2.1 Object Declarations 3.2.2 Number Declarations 3.3 Types and Subtypes 3.3.1 Type Declarations 3.3.2 Subtype Declarations 3.3.3 Classification of Operations 3.4 Derived Types 3.5 Scalar Types 3.5.1 Enumeration Types 3.5.2 Character Types 3.5.3 Boolean Types 3.5.4 Integer Types 3.5.5 Operations of Discrete Types 3.5.6 Real Types 3.5.7 Floating Point Types 3.5.7a Pragma Float_Representation 3.5.7b Pragma Long_Float (OpenVMS Systems Only) 3.5.8 Operations of Floating Point Types 3.5.9 Fixed Point Types 3.5.10 Operations of Fixed Point Types 3.6 Array Types 3.6.1 Index Constraints and Discrete Ranges 3.6.2 Operations of Array Types 3.6.3 The Type String 3.7 Record Types 3.7.1 Discriminants 3.7.2 Discriminant Constraints 3.7.3 Variant Parts 3.7.4 Operations of Record Types 3.8 Access Types 3.8.1 Incomplete Type Declarations 3.8.2 Operations of Access Types 3.9 Declarative Parts 4 Names and Expressions 4.1 Names 4.1.1 Indexed Components 4.1.2 Slices 4.1.3 Selected Components 4.1.4 Attributes 4.2 Literals 4.3 Aggregates 4.3.1 Record Aggregates 4.3.2 Array Aggregates 4.4 Expressions 4.5 Operators and Expression Evaluation 4.5.1 Logical Operators and Short-circuit Control Forms 4.5.2 Relational Operators and Membership Tests 4.5.3 Binary Adding Operators 4.5.4 Unary Adding Operators 4.5.5 Multiplying Operators 4.5.6 Highest Precedence Operators 4.5.7 Accuracy of Operations with Real Operands 4.6 Type Conversions 4.7 Qualified Expressions 4.8 Allocators 4.9 Static Expressions and Static Subtypes 4.10 Universal Expressions 5 Statements 5.1 Simple and Compound Statements-Sequences of Statements 5.2 Assignment Statement 5.2.1 Array Assignments 5.3 If Statements 5.4 Case Statements 5.5 Loop Statements 5.6 Block Statements 5.7 Exit Statements 5.8 Return Statements 5.9 Goto Statements 6 Subprograms 6.1 Subprogram Declarations 6.2 Formal Parameter Modes 6.3 Subprogram Bodies 6.3.1 Conformance Rules 6.3.2 Inline Expansion of Subprograms 6.4 Subprogram Calls 6.4.1 Parameter Associations 6.4.2 Default Parameters 6.5 Function Subprograms 6.6 Parameter and Result Type Profile-Overloading of Subprograms 6.7 Overloading of Operators 7 Packages 7.1 Package Structure 7.2 Package Specifications and Declarations 7.3 Package Bodies 7.4 Private Type and Deferred Constant Declarations 7.4.1 Private Types 7.4.2 Operations of a Private Type 7.4.3 Deferred Constants 7.4.4 Limited Types 7.5 Example of a Table Management Package 7.6 Example of a Text Handling Package 8 Visibility Rules 8.1 Declarative Region 8.2 Scope of Declarations 8.3 Visibility 8.4 Use Clauses 8.5 Renaming Declarations 8.6 The Package Standard 8.7 The Context of Overload Resolution 9 Tasks 9.1 Task Specifications and Task Bodies 9.2 Task Types and Task Objects 9.3 Task Execution-Task Activation 9.4 Task Dependence-Termination of Tasks 9.5 Entries, Entry Calls, and Accept Statements 9.6 Delay Statements, Duration, and Time 9.7 Select Statements 9.7.1 Selective Waits 9.7.2 Conditional Entry Calls 9.7.3 Timed Entry Calls 9.8 Priorities 9.8a Pragma Time_Slice (OpenVMS and Digital UNIX Systems Only) 9.8b Pragma Passive (OpenVMS Alpha and Digital UNIX Only) 9.9 Task and Entry Attributes 9.10 Abort Statements 9.11 Shared Variables 9.12 Example of Tasking 9.12a Task Entries and OpenVMS Asynchronous System Traps (OpenVMS Systems Only) 10 Program Structure and Compilation Issues 10.1 Compilation Units-Library Units 10.1.1 Context Clauses-With Clauses 10.1.2 Examples of Compilation Units 10.2 Subunits of Compilation Units 10.2.1 Examples of Subunits 10.3 Order of Compilation 10.4 The Program Library 10.5 Elaboration of Library Units 10.6 Program Optimization 11 Exceptions 11.1 Exception Declarations 11.2 Exception Handlers 11.3 Raise Statements 11.4 Exception Handling 11.4.1 Exceptions Raised During the Execution of Statements 11.4.2 Exceptions Raised During the Elaboration of Declarations 11.5 Exceptions Raised During Task Communication 11.6 Exceptions and Optimization 11.7 Suppressing Checks 12 Generic Units 12.1 Generic Declarations 12.1.1 Generic Formal Objects 12.1.2 Generic Formal Types 12.1.3 Generic Formal Subprograms 12.1a Pragma INLINE_GENERIC 12.1b Pragma SHARE_GENERIC 12.2 Generic Bodies 12.3 Generic Instantiation 12.3.1 Matching Rules for Formal Objects 12.3.2 Matching Rules for Formal Private Types 12.3.3 Matching Rules for Formal Scalar Types 12.3.4 Matching Rules for Formal Array Types 12.3.5 Matching Rules for Formal Access Types 12.3.6 Matching Rules for Formal Subprograms 12.4 Example of a Generic Package 13 Representation Clauses and Implementation-Dependent Features 13.1 Representation Clauses 13.1a The Pragma Component_Alignment 13.2 Length Clauses 13.2a The Pragma Task_Storage 13.2b The Pragma Main_Storage (OpenVMS VAX Systems Only) 13.3 Enumeration Representation Clauses 13.4 Record Representation Clauses 13.5 Address Clauses 13.5.1 Interrupts 13.6 Change of Representation 13.7 The Package System 13.7.1 System-Dependent Named Numbers 13.7.2 Representation Attributes 13.7.3 Representation Attributes of Real Types 13.7a General DEC Ada Additions to the Package System 13.7a.1 Address Type Declarations 13.7a.2 Enumeration Type for Identifying Type Classes 13.7a.3 Non-Ada Exception 13.7a.4 Hardware-Oriented Types and Functions 13.7a.5 Convenient Unsigned Longword Declarations 13.7a.6 Global Symbol Values 13.7b System-Specific DEC Ada Additions to the Package System 13.7b.1 VAX Floating Point Types (OpenVMS Systems Only) 13.7b.2 IEEE Floating Point Types (OpenVMS Alpha and Digital UNIX Systems Only) 13.7b.3 OpenVMS Asynchronous-System-Trap-Related Declarations (OpenVMS Systems Only) 13.7b.4 VAX Processor and Device Register Operations (OpenVMS VAX Systems Only) 13.7b.5 Interlocked-Instruction Procedures (OpenVMS and Digital UNIX Systems Only) 13.7b.6 Atomic Procedures (Alpha Systems Only) 13.7b.7 Interlocked-Queue-Instruction Procedures (OpenVMS Systems Only) 13.8 Machine Code Insertions 13.9 Interface to Other Languages 13.9a DEC Ada Import and Export Pragmas 13.9a.1 Importing and Exporting Subprograms 13.9a.1.1 Importing Subprograms 13.9a.1.2 Attribute for Optional Parameters 13.9a.1.3 Exporting Subprograms 13.9a.1.4 Controlling the Passing Mechanisms for Parameters and Function Results 13.9a.2 Importing and Exporting Objects 13.9a.2.1 Importing Objects 13.9a.2.2 Exporting Objects 13.9a.2.3 Importing and Exporting Objects with the Pragma Common_Object 13.9a.3 Importing and Exporting Exceptions (OpenVMS Systems Only) 13.9a.3.1 Importing Exceptions (OpenVMS Systems Only) 13.9a.3.2 Exporting Exceptions (OpenVMS Systems Only) 13.9b The Pragma Interface_Name 13.10 Unchecked Programming 13.10.1 Unchecked Storage Deallocation 13.10.2 Unchecked Type Conversions 14 Input-Output 14.1 External Files and File Objects 14.1a File Elements 14.1b Specification of the FORM Parameter in DEC Ada 14.1b.1 The FORM Parameter on OpenVMS Systems 14.1b.2 The FORM Parameter on Digital UNIX Systems 14.2 Sequential and Direct Files 14.2.1 File Management 14.2.2 Sequential Input-Output 14.2.3 Specification of the Package Sequential_IO 14.2.4 Direct Input-Output 14.2.5 Specification of the Package Direct_IO 14.2a Relative and Indexed Files (OpenVMS Systems Only) 14.2a.1 File Management (OpenVMS Systems Only) 14.2a.2 Relative Input-Output (OpenVMS Systems Only) 14.2a.3 Specification of the Package Relative_IO (OpenVMS Systems Only) 14.2a.4 Indexed Input-Output (OpenVMS Systems Only) 14.2a.5 Specification of the Package Indexed_IO (OpenVMS Systems Only) 14.2b Mixed-Type Input-Output 14.2b.1 File Management 14.2b.2 Item Input-Output 14.2b.3 Sequential Mixed Input-Output 14.2b.4 Specification of the Package Sequential_Mixed_IO 14.2b.5 Direct Mixed Input-Output 14.2b.6 Specification of the Package Direct_Mixed_IO 14.2b.7 Relative Mixed Input-Output (OpenVMS Systems Only) 14.2b.8 Specification of the Package Relative_Mixed_IO (OpenVMS Systems Only) 14.2b.9 Indexed Mixed Input-Output (OpenVMS Systems Only) 14.2b.10 Specification of the Package Indexed_Mixed_IO (OpenVMS Systems Only) 14.3 Text Input-Output 14.3.1 File Management 14.3.2 Default Input and Output Files 14.3.3 Specification of Line and Page Lengths 14.3.4 Operations on Columns, Lines, and Pages 14.3.5 Get and Put Procedures 14.3.6 Input-Output of Characters and Strings 14.3.7 Input-Output for Integer Types 14.3.8 Input-Output for Real Types 14.3.9 Input-Output for Enumeration Types 14.3.10 Specification of the Package Text_IO 14.4 Exceptions in Input-Output 14.5 Specification of the Package IO_Exceptions 14.5a Specification of the Package Aux_IO_Exceptions (OpenVMS Systems Only) 14.6 Low Level Input-Output 14.7 Example of Input-Output 14.7a Example of Additional DEC Ada Input-Output Predefined Language Attributes Predefined Language Pragmas Predefined Language Environment D Glossary E Syntax Summary F Implementation-Dependent Characteristics F.1 Implementation-Dependent Pragmas F.2 Implementation-Dependent Attributes F.3 Specification of the Package System F.4 Restrictions on Representation Clauses F.5 Restrictions on Unchecked Type Conversions F.6 Conventions for Implementation-Generated Names Denoting Implementation-Dependent Components in Record Representation Cla F.7 Interpretation of Expressions Appearing in Address Clauses F.8 Implementation-Dependent Characteristics of Input-Output Packages F.8.1 DEC Ada Input-Output Packages on OpenVMS Systems F.8.1.1 Interpretation of the FORM Parameter on OpenVMS Systems F.8.1.2 Input-Output Exceptions on OpenVMS Systems F.8.2 Input-Output Packages on Digital UNIX Systems F.8.2.1 Interpretation of the FORM Parameter on Digital UNIX Systems F.8.2.2 Input-Output Exceptions on Digital UNIX Systems F.9 Other Implementation Characteristics F.9.1 Definition of a Main Program F.9.2 Values of Integer Attributes F.9.3 Values of Floating Point Attributes F.9.3.1 F_floating Characteristics F.9.3.2 D_floating Characteristics F.9.3.3 G_floating Characteristics F.9.3.4 H_floating Characteristics F.9.3.5 IEEE Single Float Characteristics F.9.3.6 IEEE Double Float Characteristics F.9.4 Attributes of Type DURATION F.9.5 Implementation Limits G Ada Language Interpretations Postscript : Submission of Comments