Ada Distilled

Richard Riehle


Order a printed copy of this book from Amazon -- unavaliable.

Cover Design - Ada 95 Distilled.

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)



Sample Chapter From Ada Distilled
     Copyright © Richard Riehle

1. What is Ada Distilled?

This book is for experienced programmers new to Ada. Heavily commented example programs help experienced programmer experiment with Ada. This is not a comprehensive book on the entire Ada language. In particular, we say very little about Ada.Finalization, Storage Pool Management, Representation Specifications, Concurrency, and other more advanced topics. Other books, listed in the bibliography, cover advanced topics. This book is an entry point to your study of Ada.

The text is organized around example programs with line-by-line comments. Ada comments are the double-hyphen and continue to the end of a line. Comments might be explanatory notes and/or corresponding section of the Ada Language Reference Manual (ALRM) in the format of ALRM X.5.3/22.

with Ada.Text_IO;

procedure Hello is 2
begin 3

   Ada.Text_IO.Put_Line("Hello Ada");

end Hello; 5

A hello program in Ada. This will compile and execute with any Ada compiler.

where each line is numbered. The 10.1.2 and 6.3, etc. refer to ALRM Chapters 6.3, 10.1.2. A.10.6 refers to Annex A.10.6. There is occasional commentary by source code line number. The line numbers are not part of Ada, but provided on our examples for ease of commentary. Boxed notes are also included for some examples. The preceding example shows one of these as:


1.1 Ada Compilers and Tools

Ada 95 compilers support a wide range of platforms. A free, open source, compiler, GNAT, based on GNU technology, can be downloaded from the Web. Commercial Ada compilers and tools are available from: Ada Core Technologies (GNAT), DDC-I, Rational (recently acquired by IBM), RR Software, Irvine Compiler Corporation, Green Hills, SofCheck, Aonix, and OC Systems. Free editors, including AdaGide, are useful for developing small Ada programs. More information on tools, including GUI development tools, can be accessed using one of the URL's mentioned in the introduction and in the bibliography.

Development tools exist for many operating systems. These include CLAW for Microsoft Operating Systems, and GtkAda for other GUI environments including Microsoft operating systems, Linux, BSD, OS/2, Java Virtual Machine, and every variety of Unix. The AdaGide editor is available for MS Windows.


1.2 Ada Education

The bibliography of this book lists some of the books and educational resources available to the student of Ada. Some colleges and universities offer Ada courses. In addition, companies such as AdaWorks Software Engineering provide classes for anyone interested in Ada software development.


1.3 Ada Software Practice

There is a lot of misinformation about Ada. One misconception is that it is a large, bloated language designed by committee. This is not true. Ada is designed around a few simple principles that provide the architecture for the language syntax and semantics. Once you understand these principles, Ada will be as easy as many other languages. We highlight some of those design principles in this book. One important principle is that the Ada compiler never assumes anything. Everything is explicit. Nothing in Ada is implicit. This helps the compiler help you write more dependable code. Oh, and you'll rarely need the debugger once you are experienced with Ada. Also, your Ada programs will usually compile to nearly any contemporary platform and execute on that platform without change.