Muutke küpsiste eelistusi

E-raamat: Ada 2005 Reference Manual. Language and Standard Libraries: International Standard ISO/IEC 8652/1995(E) with Technical Corrigendum 1 and Amendment 1

Edited by , Edited by , Edited by , Edited by , Edited by
  • Formaat - PDF+DRM
  • Hind: 110,53 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

The Ada 2005 Reference Manual combines the International Standard ISO/IEC 8652/1995(E) for the programming language Ada with the corrections of the Technical Corrigendum 1 approved by ISO in February 2001 and with the Amendment 1 expected to be approved by ISO in late 2006 or early 2007. Both the Technical Corrigendum 1 and the Amendment 1 list only the changes made to the International Standard.



The Ada 2005 Reference Manual incorporates these changes in the overall standard text and thus will replace the former versions as an indispensable working companion for anybody using Ada professionally or learning and studying the language systematically. In naming this version, we have chosen the vernacular term Ada 2005 used by the Ada community to refer to the interesting extensions made to the language Ada by the Amendment 1.
Table of Contents i
Foreword to this version of the Ada Reference Manual xi
Foreword xii
Introduction xiii
Section 1: General 1
1.1 Scope
1
1.1.1 Extent
1
1.1.2 Structure
2
1.1.3 Conformity of an Implementation with the Standard
4
1.1.4 Method of Description and Syntax Notation
5
1.1.5 Classification of Errors
7
1.2 Normative References
8
1.3 Definitions
8
Section 2: Lexical Elements 9
2.1 Character Set
9
2.2 Lexical Elements, Separators, and Delimiters
11
2.3 Identifiers
12
2.4 Numeric Literals
13
2.4.1 Decimal Literals
13
2.4.2 Based Literals
14
2.5 Character Literals
14
2.6 String Literals
15
2.7 Comments
15
2.8 Pragmas
16
2.9 Reserved Words
18
Section 3: Declarations and Types 19
3.1 Declarations
19
3.2 Types and Subtypes
20
3.2.1 Type Declarations
22
3.2.2 Subtype Declarations
23
3.2.3 Classification of Operations
24
3.3 Objects and Named Numbers
25
3.3.1 Object Declarations
26
3.3.2 Number Declarations
28
3.4 Derived Types and Classes
29
3.4.1 Derivation Classes
32
3.5 Scalar Types
34
3.5.1 Enumeration Types
38
3.5.2 Character Types
39
3.5.3 Boolean Types
40
3.5.4 Integer Types
40
3.5.5 Operations of Discrete Types
43
3.5.6 Real Types
44
3.5.7 Floating Point Types
45
3.5.8 Operations of Floating Point Types
47
3.5.9 Fixed Point Types
47
3.5.10 Operations of Fixed Point Types
49
3.6 Array Types
50
3.6.1 Index Constraints and Discrete Ranges
52
3.6.2 Operations of Array Types
54
3.6.3 String Types
55
3.7 Discriminants
55
3.7.1 Discriminant Constraints
58
3.7.2 Operations of Discriminated Types
59
3.8 Record Types
60
3.8.1 Variant Parts and Discrete Choices
62
3.9 Tagged Types and Type Extensions
64
3.9.1 Type Extensions
67
3.9.2 Dispatching Operations of Tagged Types
68
3.9.3 Abstract Types and Subprograms
71
3.9.4 Interface Types
72
3.10 Access Types
75
3.10.1 Incomplete Type Declarations
77
3.10.2 Operations of Access Types
80
3.11 Declarative Parts
84
3.11.1 Completions of Declarations
84
Section 4: Names and Expressions 87
4.1 Names
87
4.1.1 Indexed Components
88
4.1.2 Slices
89
4.1.3 Selected Components
90
4.1.4 Attributes
92
4.2 Literals
93
4.3 Aggregates
94
4.3.1 Record Aggregates
94
4.3.2 Extension Aggregates
97
4.3.3 Array Aggregates
98
4.4 Expressions
101
4.5 Operators and Expression Evaluation
102
4.5.1 Logical Operators and Short-circuit Control Forms
103
4.5.2 Relational Operators and Membership Tests
104
4.5.3 Binary Adding Operators
107
4.5.4 Unary Adding Operators
108
4.5.5 Multiplying Operators
109
4.5.6 Highest Precedence Operators
111
4.6 Type Conversions
112
4.7 Qualified Expressions
116
4.8 Allocators
117
4.9 Static Expressions and Static Subtypes
119
4.9.1 Statically Matching Constraints and Subtypes
122
Section 5: Statements 123
5.1 Simple and Compound Statements - Sequences of Statements
123
5.2 Assignment Statements
124
5.3 If Statements
126
5.4 Case Statements
127
5.5 Loop Statements
128
5.6 Block Statements
130
5.7 Exit Statements
130
5.8 Goto Statements
131
Section 6: Subprograms 133
6.1 Subprogram Declarations
133
6.2 Formal Parameter Modes
135
6.3 Subprogram Bodies
136
6.3.1 Conformance Rules
137
6.3.2 Inline Expansion of Subprograms
139
6.4 Subprogram Calls
140
6.4.1 Parameter Associations
142
6.5 Return Statements
143
6.5.1 Pragma No_Return
145
6.6 Overloading of Operators
146
6.7 Null Procedures
147
Section 7: Packages 149
7.1 Package Specifications and Declarations
149
7.2 Package Bodies
150
7.3 Private Types and Private Extensions
151
7.3.1 Private Operations
154
7.4 Deferred Constants
156
7.5 Limited Types
157
7.6 User-Defined Assignment and Finalization
158
7.6.1 Completion and Finalization
161
Section 8: Visibility Rules 165
8.1 Declarative Region
165
8.2 Scope of Declarations
166
8.3 Visibility
167
8.3.1 Overriding Indicators
170
8.4 Use Clauses
171
8.5 Renaming Declarations
172
8.5.1 Object Renaming Declarations
172
8.5.2 Exception Renaming Declarations
173
8.5.3 Package Renaming Declarations
174
8.5.4 Subprogram Renaming Declarations
174
8.5.5 Generic Renaming Declarations
176
8.6 The Context of Overload Resolution
177
Section 9: Tasks and Synchronization 181
9.1 Task Units and Task Objects
181
9.2 Task Execution - Task Activation
184
9.3 Task Dependence - Termination of Tasks
185
9.4 Protected Units and Protected Objects
187
9.5 Intertask Communication
190
9.5.1 Protected Subprograms and Protected Actions
191
9.5.2 Entries and Accept Statements
192
9.5.3 Entry Calls
195
9.5.4 Requeue Statements
198
9.6 Delay Statements, Duration, and Time
199
9.6.1 Formatting, Time Zones, and other operations for Time
202
9.7 Select Statements
208
9.7.1 Selective Accept
209
9.7.2 Timed Entry Calls
211
9.7.3 Conditional Entry Calls
212
9.7.4 Asynchronous Transfer of Control
213
9.8 Abort of a Task - Abort of a Sequence of Statements
214
9.9 Task and Entry Attributes
215
9.10 Shared Variables
216
9.11 Example of Tasking and Synchronization
217
Section 10: Program Structure and Compilation Issues 219
10.1 Separate Compilation
219
10.1.1 Compilation Units - Library Units
219
10.1.2 Context Clauses - With Clauses
222
10.1.3 Subunits of Compilation Units
224
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
231
Section 11: Exceptions 235
11.1 Exception Declarations
235
11.2 Exception Handlers
235
11.3 Raise Statements
236
11.4 Exception Handling
237
11.4.1 The Package Exceptions
238
11.4.2 Pragmas Assert and Assertion_Policy
240
11.4.3 Example of Exception Handling
241
11.5 Suppressing Checks
242
11.6 Exceptions and Optimization
245
Section 12: Generic Units 247
12.1 Generic Declarations
247
12.2 Generic Bodies
249
12.3 Generic Instantiation
250
12.4 Formal Objects
252
12.5 Formal Types
254
12.5.1 Formal Private and Derived Types
255
12.5.2 Formal Scalar Types
257
12.5.3 Formal Array Types
258
12.5.4 Formal Access Types
259
12.5.5 Formal Interface Types
259
12.6 Formal Subprograms
260
12.7 Formal Packages
262
12.8 Example of a Generic Package
264
Section 13: Representation Issues 267
13.1 Operational and Representation Items
267
13.2 Pragma Pack
270
13.3 Operational and Representation Attributes
271
13.4 Enumeration Representation Clauses
277
13.5 Record Layout
278
13.5.1 Record Representation Clauses
278
13.5.2 Storage Place Attributes
280
13.5.3 Bit Ordering
281
13.6 Change of Representation
282
13.7 The Package System
283
13.7.1 The Package System.Storage_Elements
285
13.7.2 The Package System.Address_To_Access_Conversions
286
13.8 Machine Code Insertions
286
13.9 Unchecked Type Conversions
287
13.9.1 Data Validity
288
13.9.2 The Valid Attribute
289
13.10 Unchecked Access Value Creation
290
13.11 Storage Management
290
13.11.1 The Max_Size_In_Storage_Elements Attribute
293
13.11.2 Unchecked Storage Deallocation
294
13.11.3 Pragma Controlled
295
13.12 Pragma Restrictions
295
13.12.1 Language-Defined Restrictions
296
13.13 Streams
297
13.13.1 The Package Streams
297
13.13.2 Stream-Oriented Attributes
298
13.14 Freezing Rules
303
The Standard Libraries
305
Annex A (normative) Predefined Language Environment 307
A.1 The Package Standard
309
A.2 The Package Ada
313
A.3 Character Handling
313
A.3.1 The Packages Characters, Wide_Characters, and Wide_Wide_Characters
314
A.3.2 The Package Characters.Handling
314
A.3.3 The Package Characters.Latin_1
317
A.3.4 The Package Characters.Conversions
322
A.4 String Handling
324
A.4.1 The Package Strings
324
A.4.2 The Package Strings.Maps
324
A.4.3 Fixed-Length String Handling
327
A.4.4 Bounded-Length String Handling
336
A.4.5 Unbounded-Length String Handling
343
A.4.6 String-Handling Sets and Mappings
348
A.4.7 Wide_String Handling
348
A.4.8 Wide_Wide_String Handling
351
A.4.9 String Hashing
353
A.5 The Numerics Packages
354
A.5.1 Elementary Functions
355
A.5.2 Random Number Generation
358
A.5.3 Attributes of Floating Point Types
363
A.5.4 Attributes of Fixed Point Types
367
A.6 Input-Output
367
A.7 External Files and File Objects
367
A.8 Sequential and Direct Files
369
A.8.1 The Generic Package Sequential_IO
369
A.8.2 File Management
370
A.8.3 Sequential Input-Output Operations
372
A.8.4 The Generic Package Direct_IO
373
A.8.5 Direct Input-Output Operations
374
A.9 The Generic Package Storage_IO
375
A.10 Text Input-Output
375
A.10.1 The Package Text_IO
377
A.10.2 Text File Management
382
A.10.3 Default Input, Output, and Error Files
383
A.10.4 Specification of Line and Page Lengths
384
A.10.5 Operations on Columns, Lines, and Pages
385
A.10.6 Get and Put Procedures
388
A.10.7 Input-Output of Characters and Strings
389
A.10.8 Input-Output for Integer Types
391
A.10.9 Input-Output for Real Types
393
A.10.10 Input-Output for Enumeration Types
396
A.10.11 Input-Output for Bounded Strings
397
A.10.12 Input-Output for Unbounded Strings
398
A.11 Wide Text Input-Output and Wide Wide Text Input-Output
399
A.12 Stream Input-Output
400
A.12.1 The Package Streams.Stream_IO
400
A.12.2 The Package Text_IO.Text_Streams
403
A.12.3 The Package Wide_Text_IO.Text_Streams
403
A.12.4 The Package Wide_Wide_Text_IO.Text_Streams
403
A.13 Exceptions in Input-Output
404
A.14 File Sharing
405
A.15 The Package Command_Line
405
A.16 The Package Directories
407
A.17 The Package Environment_Variables
414
A.18 Containers
417
A.18.1 The Package Containers
417
A.18.2 The Package Containers.Vectors
417
A.18.3 The Package Containers.Doubly_Linked_Lists
431
A.18.4 Maps
440
A.18.5 The Package Containers.Hashed_Maps
445
A.18.6 The Package Containers.Ordered_Maps
448
A.18.7 Sets
452
A.18.8 The Package Containers.Hashed_Sets
458
A.18.9 The Package Containers.Ordered_Sets
462
A.18.10 The Package Containers.Indefinite_Vectors
466
A.18.11 The Package Containers.lndefinite_Doubly_Linked_Lists
467
A.18.12 The Package Containers.Indefinite_Hashed_Maps
467
A.18.13 The Package Containers.Indefinite_Ordered_Maps
468
A.18.14 The Package Containers.lndefinite_Hashed_Sets
468
A.18.15 The Package Containersindefinite_Ordered_Sets
468
A.18.16 Array Sorting
469
Annex B (normative) Interface to Other Languages 471
B.1 Interfacing Pragmas
471
B.2 The Package Interfaces
474
B.3 Interfacing with C and C++
475
B.3.1 The Package Interfaces.C.Strings
482
B.3.2 The Generic Package Interfaces.C.Pointers
485
B.3.3 Pragma Unchecked_Union
488
B.4 Interfacing with COBOL
490
B.5 Interfacing with Fortran
496
Annex C (normative) Systems Programming 499
C.1 Access to Machine Operations
499
C.2 Required Representation Support
500
C.3 Interrupt Support
500
C.3.1 Protected Procedure Handlers
502
C.3.2 The Package Interrupts
504
C.4 Preelaboration Requirements
506
C.5 Pragma Discard_Names
507
C.6 Shared Variable Control
507
C.7 Task Information
509
C.7.1 The Package Task_Identification
509
C.7.2 The Package Task_Attributes
511
C.7.3 The Package Task_Termination
513
Annex D (normative) Real-Time Systems 515
D.1 Task Priorities
515
D.2 Priority Scheduling
517
D.2.1 The Task Dispatching Model
517
D.2.2 Task Dispatching Pragmas
519
D.2.3 Preemptive Dispatching
520
D.2.4 Non-Preemptive Dispatching
521
D.2.5 Round Robin Dispatching
522
D.2.6 Earliest Deadline First Dispatching
524
D.3 Priority Ceiling Locking
526
D.4 Entry Queuing Policies
528
D.5 Dynamic Priorities
529
D.5.1 Dynamic Priorities for Tasks
529
D.5.2 Dynamic Priorities for Protected Objects
531
D.6 Preemptive Abort
532
D.7 Tasking Restrictions
533
D.8 Monotonic Time
535
D.9 Delay Accuracy
538
D.10 Synchronous Task Control
539
D.11 Asynchronous Task Control
540
D.12 Other Optimizations and Determinism Rules
541
D.13 Run-time Profiles
542
D.13.1 The Ravenscar Profile
543
D.14 Execution Time
544
D.14.1 Execution Time Timers
546
D.14.2 Group Execution Time Budgets
548
D.15 Timing Events
550
Annex E (normative) Distributed Systems 553
E.1 Partitions
553
E.2 Categorization of Library Units
554
E.2.1 Shared Passive Library Units
555
E.2.2 Remote Types Library Units
556
E.2.3 Remote Call Interface Library Units
557
E.3 Consistency of a Distributed System
558
E.4 Remote Subprogram Calls
559
E.4.1 Pragma Asynchronous
561
E.4.2 Example of Use of a Remote Access-to-Class-Wide Type
561
E.5 Partition Communication Subsystem
563
Annex F (normative) Information Systems 567
F.1 Machine Radix Attribute Definition Clause
567
F.2 The Package Decimal
568
F.3 Edited Output for Decimal Types
569
F.3.1 Picture String Formation
570
F.3.2 Edited Output Generation
574
F.3.3 The Package Text_IO.Editing
578
F.3.4 The Package Wide_Text_IO.Editing
581
F.3.5 The Package Wide_Wide_Text_IO.Editing
581
Annex G (normative) Numerics 583
G.1 Complex Arithmetic
583
G.1.1 Complex Types
583
G.1.2 Complex Elementary Functions
588
G.1.3 Complex Input-Output
591
G.1.4 The Package Wide_Text_IO.Complex_IO
594
G.1.5 The Package Wide_Wide_Text_IO.Complex_IO
594
G.2 Numeric Performance Requirements
594
G.2.1 Model of Floating Point Arithmetic
595
G.2.2 Model-Oriented Attributes of Floating Point Types
596
G.2.3 Model of Fixed Point Arithmetic
597
G.2.4 Accuracy Requirements for the Elementary Functions
599
G.2.5 Performance Requirements for Random Number Generation
601
G.2.6 Accuracy Requirements for Complex Arithmetic
601
G.3 Vector and Matrix Manipulation
603
G.3.1 Real Vectors and Matrices
603
G.3.2 Complex Vectors and Matrices
608
Annex H (normative) High Integrity Systems 619
H.1 Pragma Normalize_Scalars
619
H.2 Documentation of Implementation Decisions
620
H.3 Reviewable Object Code
620
H.3.1 Pragma Reviewable
620
H.3.2 Pragma Inspection_Point
621
H.4 High Integrity Restrictions
622
H.5 Pragma Detect_Blocking
624
H.6 Pragma Partition_Elaboration_Policy
625
Annex J (normative) Obsolescent Features 627
J.1 Renamings of Ada 83 Library Units
627
J.2 Allowed Replacements of Characters
627
J.3 Reduced Accuracy Subtypes
628
J.4 The Constrained Attribute
629
J.5 ASCII
629
J.6 Numeric_Error
630
J.7 At Clauses
630
J.7.1 Interrupt Entries
630
J.8 Mod Clauses
632
J.9 The Storage_Size Attribute
632
J.10 Specific Suppression of Checks
632
J.11 The Class Attribute of Untagged Incomplete Types
633
J.12 Pragma Interface
633
J.13 Dependence Restriction Identifiers
633
J.14 Character and Wide Character Conversion Functions
634
Annex K (informative) Language-Defined Attributes 635
Annex L (informative) Language-Defined Pragmas 651
Annex M (informative) Summary of Documentation Requirements 653
M.1 Specific Documentation Requirements
653
M.2 Implementation-Defined Characteristics
655
M.3 Implementation Advice
661
Annex N (informative) Glossary 669
Annex P (informative) Syntax Summary 675
Annex Q (informative) Language-Defined Entities 703
Q.1 Language-Defined Packages
703
Q.2 Language-Defined Types and Subtypes
705
Q.3 Language-Defined Subprograms
709
Q.4 Language-Defined Exceptions
717
Q.5 Language-Defined Objects
718
Index 723