with Ada.Text_IO; use Ada.Text_IO;
with Ada.Containers.Bounded_Vectors;
procedure Main is
package BV_Integer is new
Ada.Containers.Bounded_Vectors (Index_Type => Positive,
Element_Type => Integer);
use BV_Integer;
Vec_Max : constant := 10;
Vec : Vector (Vec_Max);
begin
Put_Line ("Appending some numbers...");
for I in 1 .. Vec_Max loop
Vec.Append (Integer (I));
end loop;
Put_Line ("Appending another number...");
Vec.Append (Vec_Max + 1); -- this raises an exception.
end Main;