From: Laurent <daemon2@internet.lu>
Subject: Problem with generic package
Date: Tue, 15 Apr 2014 11:26:49 -0700 (PDT)
Date: 2014-04-15T11:26:49-07:00 [thread overview]
Message-ID: <1ffb84f0-5e50-4807-90ff-dfdfac11c501@googlegroups.com> (raw)
Hi
As an exercise I have created a generic search function. Because my library folder begins to get messy I tried to put some related parts together in a package.
https://github.com/Chutulu/Library.git
The generic swap and sort are working as standalone but in my package I get this error:
expect generic subprogram in instantiation
No idea what the compiler tries to explain.
Thanks
Laurent
package body Array_Generics is
procedure Swap_Generic (Value1, Value2 : in out Element_Type) is
Temp_Value : Element_Type;
begin -- Swap_Generic
Temp_Value := Value1;
Value1 := Value2;
Value2 := Temp_Value;
end Swap_Generic;
procedure Sort_Generic (List : in out List_Type) is
-- We need to make an instance of Swap_Generic for this case
error ==>procedure Exchange is new Swap_Generic (Value_Type => Element_Type); <== error
Index_Of_Min : Index_Type;
.
.
.
next reply other threads:[~2014-04-15 18:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 18:26 Laurent [this message]
2014-04-15 19:36 ` Problem with generic package Adam Beneschan
2014-04-15 19:44 ` Adam Beneschan
2014-04-15 20:12 ` Laurent
2014-04-15 20:37 ` Adam Beneschan
2014-04-15 20:43 ` Eryndlia Mavourneen
2014-04-15 20:47 ` Eryndlia Mavourneen
2014-04-15 21:28 ` Georg Bauhaus
2014-04-15 20:41 ` Simon Wright
2014-04-15 21:12 ` Laurent
2014-04-15 21:27 ` Adam Beneschan
2014-04-15 21:58 ` Laurent
2014-04-15 22:03 ` Adam Beneschan
2014-04-16 6:03 ` Georg Bauhaus
2014-04-16 20:37 ` Laurent
2014-04-16 21:13 ` Mike H
2014-04-16 22:31 ` Randy Brukardt
2014-04-16 23:06 ` Jeffrey Carter
2014-04-15 22:14 ` Simon Wright
2014-04-16 18:49 ` Laurent
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox