Next: , Previous: A.18.9, Up: A.18


A.18.10 The Package Containers.Indefinite_Vectors

1/2
{20302AI95−00302−03} The language−defined generic package Containers.Indefinite_Vectors provides a private type Vector and a set of operations. It provides the same operations as the package Containers.Vectors (see A.18.2), with the difference that the generic formal Element_Type is indefinite.

Static Semantics

2/2
{20302AI95−00302−03} The declaration of the generic library package Containers.Indefinite_Vectorshas the same contents as Containers.Vectors except:

3/2

4/2

5/2

     procedure Insert (Container in out Vector;
                       Before    in     Extended_Index;
                       Count     in     Count_Type := 1);

6

     procedure Insert (Container in out Vector;
                       Before    in     Cursor;
                       Position     out Cursor;
                       Count     in     Count_Type := 1);

7/2

7.a/2

Discussion: These procedures are omitted because there is no way to create a default−initialized object of an indefinite type. Note that Insert_Space can be used instead of this routine in most cases. Omitting the routine completely allows any problems to be diagnosed by the compiler when converting from a definite to indefinite vector.

8/2

Extensions to Ada 95

8.a/2

{20302AI95−00302−03} {extensions to Ada 95} The generic package Containers.Indefinite_Vectors is new.