About HBAP | Home | Quick Page | Welcome | FAQ
What's New? | RM 95Your Feedback

Ada Examples

Since I am firmly convinced that the best way to learn how to write good code is to first study good code, in order to understand what makes it good, and then write your own good code, I have created this section of Ada code examples.

The primary purpose of this section is to reference source code of examples written in Ada, including e.g. code stored online by (text)book authors.

Contributions are welcome

Program Small
Program Small is a small text-based adventure program; it demonstrates the object-oriented programming capabilities of Ada 95. Program Small is part of the Lovelace Ada Tutorial.

Uploaded by author David A. Wheeler.

Program code that accompanies the textbook: Data Structures and Algorithm Analysis in Ada
by Mark Allen Weiss
ISBN 0-8053-9055-3, Addison-Wesley, 600 pages 1993
Program code to accompany text is available at Addison-Wesley's ftp site in Unix and PC formats.

NEW: Program code that accompanies the textbook:
Feldman, M.B., and E.B. Koffman. Ada: Problem Solving and Program Design, 2nd ed. Addison-Wesley, 1996.
Program Examples to accompany text is available in PC-, and Unix-familiar formats. Read the code; compile it and observe its behavior.

Significant fragments of program text (including the answers to the exercises) and the syntax for both Ada 83 and Ada 9X from the book: Barnes, J. G. P. Programming in Ada. (4th edition) Addison-Wesley, 1994..
Most fragments of more than 4 or 5 lines have been included. Individual fragments are separated by a line containing four hyphens. In the case of the answers this separating line also includes the number of the following answer. Section headings are included except where the section has no significant fragments.

Provided by the publisher, Addison-Wesley.

Perfect Digital Invariants (PDI)
PDI is a modest Ada program mentioned in the abstract of an "educational material" paper published by the SEI. This educational module deals with program reading skills of software professionals. Read the PDI background section for more information.

Files contributed by David Wheeler, wheeler@ida.org

Programs that accompany the book: Ben-Ari, M. Principles of Concurrent and Distributed Programming. Prentice-Hall International, 1990.
The zip file expands into two directories: one containing Ada language programs used as examples in the book, and the other containing the source code in Turbo Pascal of a simple concurrency simulator AdaS.

Extract with PKUNZIP -D (DOS), or unzip (Unix). Special requirements: None. Free use by owners of the book.

Uploaded by the author, Moti Ben-Ari, benari@datasrv.co.il

How to make N computations in parallel using the multiprocessing capabilities of Ada (and of your implicit parallel computer).
Solution offered by Bruce Petrick, petrick@beowulf.aero.org

HBAP For comments, additions, corrections, gripes, kudos, etc. email us
Copyright © 1994-1996 by Magnus Kempe. All Rights Reserved. Page last modified: 96-05-09