--  an allocator of an unconstrained array of records with its bounds (`new Cells (1 .. 4)`):
--  the object has those bounds and its components their defaults
with Ada.Text_IO;
with Ada.Unchecked_Deallocation;

procedure Main is
   type Cell is record
      N : Integer := 7;
      F : Boolean := False;
   end record;
   type Cells is array (Positive range <>) of Cell;
   type Cells_Access is access Cells;
   procedure Free is new Ada.Unchecked_Deallocation (Cells, Cells_Access);
   P : Cells_Access := new Cells (2 .. 5);
begin
   P (2).N := 3;
   Ada.Text_IO.Put_Line (Integer'Image (P'First) & Integer'Image (P'Last) & Integer'Image (P (2).N) & Integer'Image (P (5).N));
   Free (P);
end Main;
