3.15 Chapter 3 Summary

[ Table of Contents ] Prev ] Chapter Overview ] [ Glossary/Index ]

As usual, we begin with some self-test questions.  (Answers are listed below in reverse order.)

Self-Test Questions
Click Q#-# to see answer

Q3-1 What are the kinds of "association" that can be used when writing actual parameters in a subprogram call?
Q3-2 Does every case statement have a when others alternative?
Q3-3 What are the three kinds of iteration schemes used in loop statements?
Q3-4 Must every block statement have a declarative part?
Q3-5 What are three things you need to know how to do when dealing with user-defined exceptions?
Q3-6 How many return statements are required in functions and procedures?
Q3-7 What are the two kinds of delay statement?

Key points of this chapter

Self-Test Answers

A3-7 The two kinds of delay statement are the relative delay and the absolute delay statements. The form of the latter is "delay until expression".
A3-6 Every function must have at least one return statement. Procedures are not required to have any.
A3-5 In dealing with exceptions you need to know how to declare them, raise them, and handle them.
A3-4 No, both the declarative part of a block statement and the exception handling part are optional. (It would be silly to have neither, however.)
A3-3 The three forms of loop statements are the basic loop, the for loop, and the while loop.
A3-2 No, every case statement is not required to have a when others alternative. But, all possible choices must be covered.
A3-1 Named association, positional association and a mixture of the two can be used in making subprogram calls.

Click here to return to questions

Wrap-up Discussion

This chapter has provided examples of the different kinds of executable statements in Ada -- except those relevant to concurrency and synchronization (covered in Chapter 6). A complete list is provided on the page Simple and Compound Statements in Appendix A.  Key terms included in the Glossary/Index are:

actual parameter block case
delay exception exception handler
executable part exit expression
formal parameter goto if
loop mode named association
null positional association raise
return

The next chapter covers the types and subtypes of Ada, including both the built-in variety and the techniques used in creating user-defined types. Material on the built-in attributes is also provided.

[ Back to top of pagePrev ] [ To next chapter ]