1package body Opt13_Pkg is 2 3 subtype Index_Type is Natural range 0 .. 16; 4 5 type Arr is array (Index_Type range <>) of Integer; 6 7 type Rec is record 8 F1, F2, F3 : Float; 9 N : Natural; 10 B1, B2 : Boolean; 11 F4 : Float; 12 end record; 13 14 type Data (D : Index_Type) is record 15 A : Arr (1 .. D); 16 R : Rec; 17 end record; 18 19 Zero : constant Rec := (0.0, 0.0, 0.0, 0, False, False, 0.0); 20 21 procedure Allocate (T : out My_Type) is 22 begin 23 T := new Data (Index_Type'last); 24 T.R := Zero; 25 26 for I in 1 .. T.A'last loop 27 N := 1; 28 end loop; 29 end; 30 31end Opt13_Pkg; 32