-- $Source: /commtar/monoBANK/CICS_INTF/sum_tst.ada,v $ -- $Revision: 1.2 $ $Date: 88/03/26 13:20:59 $ $Author: chris $ with sum_lens; generic type Field_Enum is (<>); type Field_Lens is array (Field_Enum) of Integer; Actual_Field_Lens : in Field_Lens; package sum_tst_pkg is type tst_type is private; private function Sum is new Sum_Lens(Field_Enum, Field_Lens); Data_Length : constant Integer := Sum(Actual_Field_Lens); type Tst_arr is array(1..Data_Length) of integer; function init_data return tst_arr; type tst_type is record elt : tst_arr := init_data; end record; end sum_tst_pkg; package body sum_tst_pkg is init_array : tst_arr; function Init_data return tst_arr is begin return init_array; end; package default is data : tst_type; end default; begin init_array := (others=>1); end sum_tst_pkg; with sum_tst_pkg; procedure sum_test is type fields is (field1, field2); type field_arr is array(fields) of Integer; package stp is new sum_tst_pkg(fields,field_arr, (10,20)); begin null; end;