with Ada.Integer_Text_IO; use  Ada.Integer_Text_IO;
with Ada.Text_IO;         use  Ada.Text_IO;

-- Aggregate assignment
procedure tryArrays1 is

   a: array (1 .. 4) of Integer := (1, 3, 5, 7);

begin
   for i in a'range loop
      put(i);
      put(a(i));
      new_line;
   end loop;
   new_line;

   a := (2, 4, 6, 8);

   for i in a'range loop
      put(i);
      put(a(i));
      new_line;
   end loop;
   new_line;

   -- Warning of runtime error if aggregate is wrong size
   -- a := (2, 4, 6);

   -- Others must be last
   a := (10, 12, others => 99);
   a := (others => 98);

   for i in a'range loop
      put(i);
      put(a(i));
      new_line;
   end loop;
   new_line;

end tryArrays1;
-- SAMPLE RUN
          1          1
          2          3
          3          5
          4          7

          1          2
          2          4
          3          6
          4          8

          1         10
          2         12
          3         99
          4         99