3 procedure Generic_Comp
is
6 type Element_Type
is private;
7 type Index_Type
is (<>);
8 type Array_Type
is array (Index_Type
range <>) of Element_Type
;
9 with function ">" (Left
, Right
: Element_Type
) return Boolean is <>;
10 procedure Gen
(Data
: in out Array_Type
);
12 procedure Gen
(Data
: in out Array_Type
) is
14 if not (Data
'Length > 1)
15 or else not (Integer'(Data'Length) > 1)
16 or else not Standard.">" (Data'Length, 1)
17 or else not Standard.">" (Integer'(Data
'Length), 1)
23 type My_Array
is array (Positive range <>) of Integer;
25 function Less_Than
(L
, R
: Integer) return Boolean is
30 procedure Chk_Down
is new Gen
(Element_Type
=> Integer,
31 Index_Type
=> Positive,
32 Array_Type
=> My_Array
,
35 Data
: My_Array
(1 .. 2);