Programming in Ada
Programming in Ada
This tutorial teaches the entire Ada 95 dialect of the Ada language. It is composed of 33 chapters
which should be studied in order since topics are introduced in a logical order and build upon topics
introduced in previous chapters. It is to the students benefit to download the source code for the
example programs, then compile and execute each program as it is studied. The diligent student will
modify the example program in some way, then recompile and execute it to see if he understands the
material studied for that program. This will provide the student with valuable experience using his
compiler.
The recommended method of study is to print the text for one or two chapters, download the example
programs, and study the material by loading the example programs in the compiler's editor for
viewing. Following successful completion of each chapter, additional chapters can be downloaded as
progress is made.
Note that completion of the first part of this tutorial will give the student the ability to write very
significant programs in Ada, but completion of the second part will give the student the ability to use
all of the capabilities of Ada.
Version 2.5 - February 1, 1998
The original for this page is located at http://www.swcp.com/~dodrill/a95doc/a95list.htm and is the
only fully authorized site for distribution of this tutorial. Many persons have downloaded one or more
of our tutorials for redistribution without our consent, and occasionally do not include all of the
components needed for the complete package. You can be assured that the tutorial will be complete
and up to date only at the home site, since we have no control over the actions of other web site
operators.
This tutorial is distributed as shareware which means that you do not have to pay to use it. However,
the author spent a good deal of time and financial resources to develop this tutorial and requests that
you share in the financial burden in a very small way, but only if you felt the tutorial was valuable to
you as an aid in learning to program in Ada. If you wish to remit a small payment to the author, full
instructions for doing so will be given by clicking the link below. I hope you find programming in
Ada to be rewarding and profitable. I personally think Ada is the best language to use for a large
project with more than a single programmer because of the careful interface checking done by the
compiler.
How to Remit Payment For this Tutorial!
Part 1 - Beginning Ada 95 Tutorial
Introduction - What is Ada and why study it?
Chapter 1 - Getting Started
Chapter 2 - Program Structure
Chapter 3 - The Integer Type Variable
Chapter 4 - Logical Compares & precedence
Chapter 5 - Control Structures
Chapter 6 - Additional Scalar Types
Chapter 7 - Derived Types
Chapter 8 - Subprograms
Chapter 9 - Blocks and Scope of variables
Chapter 10 - Arrays
Chapter 11 - The Character & String Type
Chapter 12 - Records
Chapter 13 - The Access Type Variable
Chapter 14 - Input/Output
Chapter 15 - Packages
Chapter 16 - Example Programs
Part 2 - Advanced Ada 95 Tutorial
Chapter 17 - Exceptions
Chapter 18 - Advanced Subprogram Topics
Chapter 19 - Advanced Array Topics
Chapter 20 - Advanced Record Topics
Chapter 21 - Advanced Packages & Private Types
Chapter 22 - Object Oriented Programming
Chapter 23 - More Object Oriented Programming
Chapter 24 - Binary Input/Output
Chapter 25 - Dynamic Allocation
Chapter 26 - Tasking
Chapter 27 - The Simple Rendezvous
Chapter 28 - The Conditional Rendezvous
Chapter 29 - Additional Tasking Topics
Chapter 30 - Generic Subprograms
Chapter 31- Generic Packages
Chapter 32 - Control of Representation
Chapter 33 - More Example Programs
The source code and the answers for part 1 should be kept in a separate directory from those given for
part 2 because some of the file names are repeated. This is done to illustrate evolution of software
techniques as additional constructs are studied. All of the HTML documentation, however, should be
placed in a single directory.
Download HTML Documentation for Ada 95 Part 1 - (a95html.zip) Download the Introduction and
Chapters 1 to 16 in one packed file. This file (about 132k) contains the 17 files mentioned (plus the
diagrams) which can be downloaded and unpacked for use locally. The content of this file is identical
to the content of those 17 files. There are no executable files in this group of files.
Source Code for Ada 95 Part 1 - (a95src1.zip) Download all example programs. This file (about 48k)
contains 86 source files which are all explained in the 16 chapters of text. There are no executable
files in this group of files.
Answers to Exercises for Ada 95 Part 1- (a95ans1.zip) Download the authors answers to all of the
programming exercises. This file (about 20k) contains 37 source files. There are no executable files
in this group of files.
Download HTML Documentation for Ada 95 Part 2- (a95htm2.zip) Download the Introduction and
Chapters 17 to 33 in one packed file. This file (about 144k) contains the 17 files mentioned (plus the
diagrams) which can be downloaded and unpacked for use locally. The content of this file is identical
to the content of those 17 files. There are no executable files in this group of files. These files when
unpacked, should be placed in the same directory as the documentation files from Part 1 of this
tutorial.
Source Code for Ada 95 Part 2- (a95src2.zip) Download all example programs. This file (about 67k)
contains 100 source files which are all explained in the 15 chapters of text. There are no executable
files in this group of files.
Answers to Exercises for Ada 95 Part 2- (a95ans2.zip) Download the authors answers to all of the
programming exercises. This file (about 29k) contains 39 source files. There are no executable files
in this group of files.
pkunzip executable - (pkunzip.exe) Download pkunzip.exe version 2.04 to unzip the source code.
This executable is pre-registered for your use in unzipping any Coronado Enterprises tutorial files. It
will unpack and generate the zipped files in the current directory and all will be ASCII source code
files. To unzip the source code files for Ada 95 part 1, execute the following DOS command;
pkunzip a95src1.zip
Or, to unzip the answers to programming exercises for Ada 95 part 1, execute the following DOS
command;
pkunzip a95ans1.zip
Copyright 1988-1998 Coronado Enterprises - Last update, February 1, 1998
Gordon Dodrill - [email protected] - Please email any comments or suggestions.
Programming Language Turorials (C, C++,
Pascal, Etc.)
This used to be Gordon Dodrill's web site, where he stored many programming language tutorials. He
has since moved this information to a new site:
http://www.coronadoenterprises.com/
This old URL (the page you are on right now) is linked in many references around the web. So we
have set up this place-holder page to direct people to the new home of these language tutorials. Please
click the http://www.coronadoenterprises.com/ link to access the language tutorials.
Hosted
by
SWCP home page
Southwest
Cyberport
Ada 95 Tutorial - Introduction
INTRODUCTION
Welcome to the world of Ada 95, a relatively new programming language. Even though Ada has
been mandated by the government for certain projects in the past, the mandate has been lifted and
Ada is a powerful enough language that it will be successful in the marketplace based on its own
merits.
Following the success of the original release of the Ada language in 1983, a standards committee was
formed to review the language and update it if necessary. Since the time of the original release of
Ada, there has been a large increase in the knowledge of better ways to structure code for both
efficiency and correctness, so changes were made to the Ada language to incorporate some of this
additional knowledge. The new standard was completed and approved in 1995, and it has been called
Ada 95. The original language is often referred to as Ada 83, but either can appropriately be called
Ada. Throughout this tutorial, the names Ada or Ada 95 will be used interchangeably to refer to Ada
95, and anytime reference is made to the original version, the name Ada 83 will be explicitly stated.
ADA IS A LARGE LANGUAGE
By its very nature, Ada is a large language that is relatively difficult to compile because it does so
many checks at compile time. It has been estimated that a fully validated Ada compiler requires about
50 man years to write and debug. This is an indication that there will not be a plethora of Ada
compilers, and they will not be small programs. In addition, the Department of Defense requires any
implementation that is called Ada, to be a complete system. It must comprise the entire core of the
Ada specification, but can also include any of several annexes defines as extensions to Ada. Much
more will be said about this later in the tutorial.
Due to the size of the Ada language, this tutorial will be divided into two parts. Part 1 (Beginning
Ada) will cover most of the essentials of Ada, and will instruct you in the use of Ada in much the
same way that you would use Pascal. If you complete only part 1, you will be able to write useful
programs in Ada, but you will lack the elegance of the advanced features of Ada which are covered in
Part 2 (Advanced Ada) of this tutorial. Since Ada was intended to be a large, flexible language, it
would be well for you to complete both parts of this tutorial.
ADA IS NOT JUST ANOTHER LANGUAGE
Ada was developed to be more than just another programming language, since it embodies many of
the modern principles of software engineering. For example, the concept of information hiding is
designed into the language, rather than being implemented as a programming technique. Ada was
also designed for developing large software systems, and is therefore applicable for use in programs
containing hundreds of thousands, or even millions of lines of source code. It is obvious that a single
person could not write such a large program in a reasonably short time, a team effort being required
to complete it. Ada is especially well suited for use in a team environment.
HOW IS THIS TUTORIAL WRITTEN?
A good reference manual and a good tutorial are mutually exclusive entities, a reference manual
being terrible for learning the material, and a tutorial being very poor as a reference following the
learning cycle. This tutorial is written as a tutorial, and no effort was given toward making it a
reference manual. It is therefore imperative that the student studies the lessons in the order given in
the tutorial. Many new concepts, as taught in this tutorial, use concepts illustrated earlier, and the
earlier concepts must be understood in order to push profitably ahead.
The example programs are all complete programs that can be compiled and executed on any
computer with a validated Ada 95 compiler. None of the example programs are fragments, so you
have a complete program before you with all of the code needed to execute each new concept as it is
studied. Library naming has changed from Ada 83 to Ada 95 so very few of the example programs in
this tutorial will compile without error when using an Ada 83 compiler. The Ada 83 naming
conventions are compatible with Ada 95, but we felt it was better to use the new naming conventions
rather than the old.
WHAT IF YOU DON'T HAVE AN ADA COMPILER?
Following the code for each example program, you will find a list of the results, in the form of Ada
comments, that were obtained by executing the program with a validated Ada compiler. Actually, as
many as five different compilers were used to compile each of these files, so the results should be
reliable. The result of execution can be used for either of two purposes, the first being to check the
output of your compiler for conformance to the standard, and the second being to give you the
execution result if you don't have an Ada compiler. Occasionally, you may wish to see the results
without actually going through the compile, link, load, and run steps, so the listed output can be a
time saver in those cases.
Every attempt was made to illustrate good programming practice with every example program, with
the exception of two programs that are intended to show poor programming practice. As you study
the example programs in this tutorial, you will therefore be developing a good programming style
through observation.
WHO WAS THIS TUTORIAL WRITTEN FOR?
This tutorial was written especially for two groups of programmers, those with expertise in
FORTRAN, and those with expertise in a modern structured language such as Pascal, C, or C++. A
person with little or no programming experience will have a fairly difficult time working his way
through this tutorial because of the size and complexity of Ada, but with enough patience, even this
person can learn Ada by carefully studying this tutorial.
The first group probably consists of mature programmers, those that have been in the industry for
many years and with experience using FORTRAN for a large number of those years. This author is a
member of this group, having begun programming in FORTRAN II in 1961. The experienced
FORTRAN programmer will find the concept of the data type to be a new and seemingly
troublesome addition to a programming language, so careful attention is paid to explaining the details
of this concept and other concepts that would be new to him.
The second group would consist of those programmers that have experience with a modern structured
language, such as Pascal, and already understand the concept of the data type, but find the newer
additions to Ada totally foreign. This author is also a member of the second group, having
programmed in Pascal, C, and C++ for about fifteen years now, with Ada being added to the list
about eleven years ago.
WHICH GROUP ARE YOU?
If you are an experienced FORTRAN programmer, you will need nearly all of the details given in
each chapter, but if you are of the modern structured language school, you will only need a small part
of the details in some of the chapters, and can therefore read them very quickly. A word of caution is
in order however, because some of the details seem to be very much like Pascal but in reality are very
different, so it will pay to look closely at even those things that you are already proficient with.
The experienced C programmer will probably be a bit frustrated with the attention to details required
by the Ada compiler. You will not have your favorite "tricks" available to fool the compiler into
doing something out of the ordinary. The Ada compiler cannot be fooled.
NOTE ON COMPUTER WORDSIZE
The majority of computers available for common use today use a 32 bit word, so it is expected that
the majority of users will be using a 32 bit system. For that reason, in those areas of this tutorial
where word size matters, 32 bits will be assumed and the results of execution will reflect that size. It
you are using a system that consists of 16 bits, or any other size for that matter, it should be easy for
you to ascertain the correct result for your system. Most of the places where it matters is where we
discuss the limits of certain types.
THE PROGRAMMING EXERCISES
One or more programming exercises are given at the end of each chapter for your benefit and
instruction. Each exercise is chosen to encourage you to exercise your new knowledge upon
completing the chapter at hand, and should be completed before continuing on to the next chapter. If
you do the exercises, you will gain experience in writing Ada, rather than simply reading Ada, and
your overall comprehension will be greatly improved. You will gain much knowledge simply by
understanding the compiler error messages you receive during compilation. You can be assured that
you will get compiler error messages. Some of the exercises even tell you to try something to see if
you get an error message.
Answers to all of the programming exercises are given in the a95ans1.zip and a95ans2.zip files
available for download. The file naming format is CHnn_ml.ADA, with "nn" referring to the chapter
number, "m" referring to the specific exercise from that chapter, and the "l" indicating that more than
one answer is given. The answer to programming exercise number 1 from chapter 4 would be in the
file named CH04_1.ADA, and if there were two answers they would be in the files named CH04_1A.
ADA and CH04_1B.ADA and each would have it own results in comments. It would be to your
advantage to attempt the exercises before you look at these files. These files can be compiled and
executed, but due to their nature, they may have compile or runtime errors in them since they are
meant to illustrate some of the problems you can have. The results of compiling and running them
will be reported at the end of the files in comments in much the same way that the example programs
are commented.
Some of the programming exercises have been carefully chosen to illustrate a few additional topics to
augment the material taught in the chapter itself. If you find yourself a bit confused, go directly to the
supplied answer file for clarification and help in solving the problem. You should spend a little time
trying to solve the problem yourself first.
YOUR OWN EXERCISES
Many of the example programs do not produce any output. This has been done on purpose to force
you to write some output statements to see some of the results. You should purposely corrupt some of
the programs, attempting to do strange things to see if you understand the material covered in the
text. One of the initial requirements of this tutorial, as outlined at the outset of this project, was that
all of the example programs would be compilable without error. This makes it difficult to illustrate
some of the compiler checks, so it is up to you to see these errors yourself. If the error is introduced
by you, the compiler error message should be easily decipherable by you. Keep in mind that some of
the answers to the programming exercises will have compile or runtime errors.
RECOMMENDED READING LIST
The following references are recommended to be studied in any order. You should have all of these
references available if you plan to study Ada very seriously.
1. Barnes, John; "Programming In Ada 95", Addison-Wesley. This book defines the language
from the lowest level to a very high level but teaches no software engineering. This is the best
book for the new student to study. It is best described as a reference manual for the Ada 95
programming language.
2. Naiditch, David J.: "Rendezvous with Ada 95", John Wiley & Sons. This book is excellent for
the beginner or for the student with knowledge of Ada 83 desiring to upgrade his knowledge
to Ada 95. The book is very careful to point out which portions of the book refer to Ada 95 by
inserting a little icon in the left margin of the text when the information is pertinent to Ada 95
but not to Ada 83.
3. Ada 95 Reference Manual (ARM); A copy of the ARM probably came with your compiler. A
hypertext version of the ARM is currently available at the following web site; http://www.
adahome.com/rm95 but since any site on the web is subject to change fairly quickly, this URL
may change also. If it is not available at this site, use one of the search engines to locate it.
4. Ada95 Rationale; A copy of the rationale may be included with your compiler, but if not it can
currently be found at the following web site; http://sw-eng.falls-church.va.us/AdaIC.
Note - The web sites listed in references 3 and 4 above contain a wealth of information on Ada 95
and it would be to your advantage to get familiar with their contents.
Advance to Chapter 1
Return to the Table of Contents
Copyright 1988-1998 Coronado Enterprises - Last update, February 1, 1998
Gordon Dodrill - [email protected] - Please email any comments or suggestions.
Ada Tutorial - Chapter 1
GETTING STARTED
WHAT IS ADA?
Ada is a relatively new programming language developed by the United States Department of
Defense in an attempt to solve the software muddle as it existed in the mid 1970's. It was felt that the
2000 or so programming languages in use at that time could be replaced in large part by one well
planned language for use in embedded Real-Time systems. Following a major effort on the part of the
DOD, which is well documented in many other places, Ada was developed as a solution to the
software problem.
WHAT IS ADA 95?
Ada 95 is an ISO update to the Ada programming language to incorporate the latest knowledge of
software development into the language. The 1983 version of the language has been called Ada for
years. Since the newer version is meant to eventually supersede, and displace the original version, the
newer version is also referred to as Ada. It is therefore up to the reader to determine which version of
Ada the author is discussing by the context or by a direct statement of intent. To make it as simple as
possible, this tutorial will use the terms Ada and Ada 95 interchangeably when discussing the newer
version of the language, and all references to the original language will be made with Ada 83. Any
place where they are being compared, the text will use the full name, Ada 95, to alleviate any
possible confusion.
Ada is a very well planned and precisely defined language that can be used throughout a wide area of
software applications. The language has existed long enough that a reasonable number of capable
compilers exist for use on mainframe computers, as well as minicomputers, and even
microcomputers. An Ada compiler has a big job to do which you will see as we progress through our
study of the language. It is therefore not a trivial effort to bring a validated Ada compiler to market.
In spite of this, at least three companies have developed fully validated Ada compilers that run under
MS-DOS and/or Windows on a PC. Although some of these will run on a minimal PC, a relatively
powerful PC is recommended for use with any Ada compiler due to the time required for
compilation.
The Ada programming language was designed in such a way that many of the trivial errors, which we
humans are very capable of generating, are detected and reported at compile time rather than after
execution of the program is begun. It is at this point that errors are most easily repaired since a good
compiler can give the programmer a very good hint at just what the error is.
This chapter will give you some definitions so we can begin discussing the use of Ada in chapter 2.
The definitions will be very broad in nature because they are used in many places in an Ada program,
but they are extremely important.
WHAT IS AN IDENTIFIER?
An identifier is a name we use to refer to any object in Ada and it must be formed by following some
fairly rigid rules. We will list the rules for forming a valid identifier, then make up a few for
illustrative purposes.
1. An identifier must start with a letter of the alphabet.
2. Following the initial letter, the identifier can be made up of as many letters, numbers, and
underlines as desired provided that the underlines occur only singly, and an underline is not
the last character.
3. Case of letters is not significant.
4. There is no limit to the length of an identifier but each identifier must fit on one line of text
and the writer of the compiler may impose a line length limit. The minimum line length must
be at least 200 characters.
5. No blanks or special characters can be used as part of an identifier.
With these rules in mind, lets make up a few good identifiers and a few invalid identifiers.
Ada -- A perfectly valid identifier
ADA -- The same one, case doesn't matter
Ada_Compiler -- A very descriptive identifier
The_Year_1776 -- Another descriptive identifier
a1b2c3d4e5f6 -- Very nondescript, but valid
12_times_each -- Can't start with a number
This__is__neat -- Multiple underlines illegal
This is neat -- blanks illegal
Ada_"tutorial" -- special characters illegal
By this time you should get the idea of what a valid Ada identifier is. It may seem like a lot of effort
to define just what an identifier is, but you will be very busy naming everything you use in Ada, so
you must know how to name things before you can do anything meaningful with the language.
IDENTIFIER SELECTION
In addition to an identifier being correct, it should also be usable and meaningful. As an example,
consider the following list of valid identifiers and see which convey to you some idea of what they
refer to.
Time_Of_Day
Final_Score
Get_the_Present_Temperature
X12
Ztx
t
Ada was designed to be written once and read many times. This is truly what happens with any non-
trivial program designed and developed by a group of persons. As such, little attention is paid to the
fact that it may be a bit tedious to key in long identifiers when the program is being written. The extra
effort pays off when it is read repeatedly, since it is so easy to follow the logic of the program. The
first three identifiers above are preferred because of the information they convey to the reader, and
the last three are to be considered of little value in defining the program logic. Of course, if you were
using a mathematical relationship that used the variable named "t" in its calculations, that particular
name for a variable might be a good choice.
WHAT ARE RESERVED WORDS?
Ada 95 uses 69 identifiers which are called reserved words. Note that Ada 83, by contrast, only had
63 reserved words. Reserved words are reserved for specific uses within an Ada program and cannot
be used for any other purpose. As you study the language, you will see very clearly how to use each
of the reserved words and why these particular words were chosen. Since Ada is a large language
containing many options and cross checks, writing an Ada compiler is an enormous job, but the use
of reserved words simplifies that job. The reserved words also make the final program much easier to
read and understand.
Don't worry about the reserved words at this point. It was necessary to mention that they do exist and
constitute an additional limitation to the naming of identifiers which we discussed in the previous
section. It might be a good idea to spend a few minutes looking through the list in section 2.9 of the
Ada 95 Reference Manual (ARM). Note that all reserved words will be listed in boldface type when
used in the text portion of this tutorial.
CASE CONVENTIONS USED IN THIS TUTORIAL
Ada allows you to use either case for alphabetic characters in an identifier and you can freely mix
them up in any way you desire. Good programming practice, however, would lead you to select a
convention for where to use upper case and where to use lower case. A good selection of case could
be an aid to understanding the program since it would convey some information about what the
identifier is.
In order to write the example programs in a standard format, the author did a search of Ada programs
to see if a standard exists which would dictate which case should be used for alphabetic characters.
The search was conducted by studying the code in the books mentioned in the Introduction to this
tutorial and about 12 other books. No conformance to any standard was found, so the following will
be adopted for all of the sample programs in this tutorial. Since you are just beginning to study Ada,
you may not understand what each of the categories are. After you complete a few of the lessons, you
can return here to review the alphabetic case rules listed for the example programs.
reserved words - All reserved words will be written in lower case. This is the only consistency found
in the search of the Ada programs.
Variables - All variables will be written with the initial letter of each word capitalized, and all others
in lower case.
TYPES - All types will be written in all capital letters.
CONSTANTS - All constants will be written in all capital letters.
ENUM VALUES - All enumerated values will be written in all capital letters.
ATTRIBUTES - All attributes will be written in all capital letters.
Procedure Names - All procedure names will be written with the initial letter of each word capitalized
and all others in lower case.
Function Names - Same as procedure names.
Package Names - Same as procedure names.
Library Names - Same as procedure names.
Note that all program identifiers will be listed in boldface type when they are referred to in the text
portion of this tutorial.
WHAT ABOUT PROGRAMMING STYLE?
Programming style can go a long way to aiding in the understanding of a completed program and
much discussion throughout this tutorial will be given to style. You have the freedom to add
indentation and blank lines to your program in your own way to improve readability and at the same
time make the program look like your own work. In the early lessons, however, it would be to your
advantage to follow the style given in the example programs and adopt it as your own. As you gain
experience, you will develop your own style of Ada source code formatting.
PRELIMINARY DEFINITIONS
Several topics, which are unique to Ada, are used in many places throughout the language. Since a
full definition of these will be impossible until we cover some of the earlier topics, we must delay the
full definition until later. On the other hand, the use of them becomes necessary fairly soon, so we
will give a brief definition of these now, and a complete definition later. If you don't fully understand
these early definitions, don't worry about it, because we will return for a fuller definition later.
Exceptions - When most languages find a fatal runtime error, they simply abort the program. This is
unacceptable for a real time language because it must continue running, correcting the error if
possible. An exception is an exceptional, or error, condition that arises during execution of the
program. An Ada program, if it is properly written, has the ability to define what to do for each of
these error conditions, and continue operation.
Renaming - Ada gives you, the programmer, the ability to assign a new name to various entities in a
program for your own convenience. Ada permits the renaming of objects, exceptions, task entries,
and subprograms. It is simply an alias which can be used to refer to the entity which is renamed.
Overloading - Ada allows you to use the same name for several different items. The system is smart
enough to know which entity you are referring to, when you use the overloaded name, by the
immediate context of its use. For example, if I say, "Jack used a jack to change the flat tire.", you
understand that there are two uses of the word "Jack", and you understand what each means by the
way it is used in the statement. Ada can also use the same name to refer to different things, and
intelligently know what the various uses mean. We will revisit this topic later in this tutorial.
Advance to Chapter 2
Return to the Table of Contents
Copyright 1988-1998 Coronado Enterprises - Last update, February 1, 1998
Gordon Dodrill - [email protected] - Please email any comments or suggestions.
Ada Tutorial - Chapter 2
PROGRAM STRUCTURE
OUR FIRST ADA PROGRAM
Example program ------> e_c02_p1.ada
The best way to begin our study of Ada is to look at a real Ada program, so by whatever means you
have at your disposal, display the Ada program named e_c02_p1.ada on your monitor.
You are looking at the simplest Ada program that it is possible to write. Even though it is the
simplest, it is a complete executable program that you will be able to compile and execute after we
discuss a few of the entities that appear in it.
The word procedure in line 1 is the first of the reserve