Contents

Preface.

Acknowledgements.

Part 1 - The core language.

Chapter 1 - Introduction

1.1 Ada95, a short history.
1.2 A Brief Tour of the language.
1.3 A Case Study: Point of Sale Systems.
1.3.1 Analysis
1.3.2 Design
1.3.3 Implementation
1.3.4 Implementation deficiencies

Chapter 2 - Language building blocks.

2.1 Reserved words
2.2 Operators.
2.2.1 Arithmetic operators.
2.2.2 Relational operators.
2.2.3 Logical operators.
2.2.4 Bitwise operators.
2.2.5 Special operators.
2.2.6 C's combined operators.
2.3 C++ statements to Ada.
2.3.1 The null statement.
2.3.2 Compound statement.
2.3.3 if statement.
2.3.4 switch statement.
2.3.5 Ada loops .
2.3.5.1 while loop.
2.3.5.2 do loop.
2.3.5.3 for loop.
2.3.5.5 break and continue.
2.3.5 return statement.
2.3.6 labels and goto.
2.3.7 exception handling.
2.4 Subprograms.
2.4.1 Declaring subprograms.
2.4.2 Parameters.
2.4.3 Overloading.
2.4.4 Nesting subprograms.
2.5 Pragmas.
2.6 Summary.

Chapter 3 - Strong typing for solid programs.

3.1 Declarations.
3.1.1 Object declarations.
3.1.2 Constant declarations.
3.1.3 Type declarations.
3.1.4 Subtype declarations.
3.2 Primitive operations.
3.3 Scalar types
3.3.1 Discrete types
3.3.1.1 Ranges
3.3.1.2 Integers.
3.3.1.3 Enumerations (including Boolean).
3.3.1.4 Characters.
3.3.2 Real types.
3.3.2.1 Floating point types.
3.3.2.2 Fixed point types.
3.3.2.3 Decimal types.
3.4 Composite types.
3.4.1 Arrays.
3.4.2 Strings.
3.4.3 Records.
3.4.3.1 Discriminated records.
3.4.3.2 Variant records.
3.5 Access types (pointers).
3.5.1 Ada83 access types.
3.5.2 Ada95 access types.
3.5.2.1 General access types.
3.5.2.2 Access parameters.
3.5.2.3 Access discriminants.
3.5.2.4 Subprogram access types.
3.5.2.5 Storage pool management.
3.6 Exceptions.
3.6.1 Ada exceptions and C++ exceptions.
3.6.2 Pre-defined exceptions
3.6.3 pragma suppress
3.7 System representation of types.
3.8 Representing C Unions in Ada.
3.9 Summary.

Chapter 4 - Packages for structured programming.

4.1 C++ vs Ada compilation models.
4.1.1 C and C++ stream model.
4.1.3 Ada library model.
4.2 Package structure.
4.3 Accessing packages.
4.4 Package data hiding.
4.4.1 Abstract data types.
4.5 Nested packages.
4.5.1 Physically nested.
4.5.2 Logically nested.
4.5.3 Visibility of private declarations in child units.
4.5.4 Use of with in child units.
4.5.5 child subprograms.
4.5.6 Private child units.
4.6 Some fine detail.
4.6.1 Elaboration.
4.6.2 Implementation Separation.
4.6.3 Renaming.
4.7 Summary.

Chapter 5 - Generics for Reusable Programming.

5.1 Generic programming in C and C++.
5.2 Generic programming in Ada.
5.2 Generic packages.
5.2.1 Nested generics.
5.3 Specifying parameters for generics.
5.3.1 Type parameters.
5.3.2 With parameters.
5.3.3 Parameter defaults.
5.4 Unchecked programming.
5.4.1 Unchecked_Conversion.
5.4.2 Unchecked_Deallocation.
5.5 Summary.

Chapter 6 - Tagged types for object oriented programming.

6.1 Classes in C++.
6.2 Tagged types.
6.2.1 Use of tagged types and packages
6.2.2 Tagged type components (Class members).
6.2.3 Tagged type primitive operations (Class member functions).
6.2.4 Static members.
6.2.5 Freeze points.
6.3 Derived tagged types (derived classes).
6.3.1 Abstract tagged types (abstract classes).
6.3.2 'Class and 'Tag (run-time type identification).
6.3.3 Polymorphism and 'Class (virtual functions).
6.3.4 Class-wide objects.
6.4 Unsupported C++ features.
6.4.1 Nested classes.
6.4.2 Base class access specifiers.
6.4.3 friends.
6.4.4 Multiple inheritance.
6.4.5 Constructors and destructors for Ada.
6.5 Summary.

Chapter 7 - Tasking for concurrent programming.

7.1 Tasks and Threads.
7.1.1 A Windows-NT thread.
7.1.2 An Ada task.
7.1.3 Task types.
7.2 Traditional Inter-Process Communication (IPC).
7.2.1 Semaphores.
7.2.2 Mutual exclusion.
7.2.3 Shared Memory.
7.2.4 Deadlock.
7.3 Task synchronisation (the rendezvous).
7.3.1 Entry and Accept.
7.3.2 Select.
7.3.3 Guarded entries.
7.3.4 Select else (Conditional entry calls).
7.3.5 Delays (Timed entry calls).
7.3.6 Termination.
7.3.7 Requeue.
7.4 Protected types.
7.4.1 IPC as protected types.
7.5 Summary.

Part 2 - The Ada library and language annexes.

Chapter 8 - A standard library for portable programming.

8.1 Type support.
8.1.1 Numeric support.
8.1.2 Character support.
8.1.3 String support.
8.1.4 Access type support.
8.1.5 Exception support.
8.1.6 Tagged type support.
8.1.7 Decimal type support.
8.2 Input/output.
8.2.1 Ada.Text_IO.
8.2.2 Ada.Sequential_IO and Ada.Direct_IO.
8.2.3 Streams.
8.3 Miscellaneous.
8.3.1 Command line handling.
8.3.2 Ada.Calendar.
8.3.3 System package.
8.4 Summary.

Chapter 9 - Language annexes.

9.1 Annex B - Language interfaces annex.
9.1.1 Pragmas
9.1.2 Interfacing to C.
9.1.2 Interfacing to COBOL.
9.1.3 Interfacing to FORTRAN.
9.2 Annex C - Systems programming annex.
9.2.1 Interrupt handling.
9.2.2 Additional tasking support.
9.2.3 Additional Pragmas.
9.3 Annex D - Real-time systems annex.
9.3.1 Tasking and Scheduling.
9.3.2 Timing.
9.3.3 Synchronous and Asynchronous task control.
9.3.4 Restrictions.
9.4 Annex E - Distributed systems annex.
9.4.1 Partitions and Library units.
9.4.2 Passive partitions and shared data.
9.4.3 Active partitions and remote subprograms.
9.4.4 Communication and System.RPC.
9.4.5 Final details.
9.5 Annex F - Information systems annex.
9.5.1 Additional decimal details.
9.5.2 Edited output.
9.6 Annex G - Numerics annex.
9.6.1 Complex numbers.
9.6.2 Floating and Fixed point numbers.
9.7 Annex H - Safety and security annex.
9.7.1 Pragmas.
9.7.2 Restrictions.
9.8 Summary

References.

Index.


Previous PageContents PageNext Page

Copyright © 1996 Simon Johnston &
Addison Wesley Longman