6. Attributes

Ada offers lots of predefined attributes over ADT's. It is essential to use the attributes in order to provide reuser with maximum abstraction and efficiency.

See the following examples of discrete type.

For I in A'first .. A'last loop

For I in A'range loop

A ( Int'first +1 .. Int'last +1)

Guideline1 : Always use predefined attributes to provide operations on an object

or parameter which needs to be manipulated. For example, always

use the FIRST, LAST, and RANGE attributes to discover the

lower bounds, the upper bounds and the size of an array.