--  `for X of A (L .. H)` over a slice of an array of a constrained type walks the slice's
--  bounds, not the type's (D192): a scan's prefixes are such slices.
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
   type Vector is array (1 .. 4) of Integer;
   V : constant Vector := (1, -2, 3, 4);
   N : constant Integer := 2;
   S : Integer := 0;
begin
   for X of V (1 .. N) loop
      S := S + X;
   end loop;
   for X of V (3 .. 4) loop
      S := S + 10 * X;
   end loop;
   Put_Line (Integer'Image (S) & Integer'Image (V (2 .. 3)'Reduce ("+", 0)));
end Main;
