HNHacker News
TopNewBestAskShowJobs

gusthoff

140 karma · joined June 13, 2017

www.<user>.com
submissionscomments
gusthoff··on I Compiled NASA‘s Workmanship Standards into a Single PDF
Is this the kind of example you were looking for?

    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;
gusthoff··on I Compiled NASA‘s Workmanship Standards into a Single PDF
Would you mind sharing which bounded container you tried to instantiate and what the problem was?
gusthoff··on [dead]
Not bad. However, I'm missing some newer, complementary stuff on the list. For example:

- Rationale for Ada 2005: http://www.adaic.org/resources/add_content/standards/05rat/h...

- Rationale for Ada 2012: http://www.ada-auth.org/standards/12rat/html/Rat12-TOC.html