13.5 Generic types with box
Ada supports four forms of generic type definition in which a box appears ( shown as <>, that is the compound delimiter), it can be used as shown in the following examples.
generic
type Index is (<>); -- Discrete types
type Int is range <>; -- Integer types
type Angle is delta <>; -- Fixed point types
type Mass is digits <>; -- Floating point types
package Navigation_system is
----------
end Navigation_system;
The box construct provides reuser more flexibility over these type definitions.
Guideline1 : Provide reuser generic formal types with box definition for all scalar types, since it offers more flexibility and all predefined operations are available.