comp.lang.ada
 help / color / mirror / Atom feed
From: Eryndlia Mavourneen <eryndlia@gmail.com>
Subject: Re: Problem with generic package
Date: Tue, 15 Apr 2014 13:43:33 -0700 (PDT)
Date: 2014-04-15T13:43:33-07:00	[thread overview]
Message-ID: <56bc5a14-ae72-47ed-b1fa-b3f7fecf91c4@googlegroups.com> (raw)
In-Reply-To: <3c4668e7-73f6-4a99-a96d-619639ea49e8@googlegroups.com>

On Tuesday, April 15, 2014 3:12:33 PM UTC-5, Laurent wrote:
> Hi
> 
> Hm yes and no. I am trying to get rid of Swap_Generic and Sort_Generic. Trying to combine those together with my generic search function in one generic package: array_generics (stupid name have to find something else). Have just posted them for completeness but forgotten to write it (if its clear for me doesn't mean it is for someone else).
> 
> Sorry for the confusion.
> 
> If I leave the swap_generic.ads and with'ing it, comment the swap in the array_generic.adb out then the instantiation works without changing anything else.
> 
> If I remove the swap_generic.adb from the library folder, remove the with'ing, reload project...and try to instantiate the swap_generic from the package I get this error:
> 
>     expect generic subprogram in instantiation.
> 
> No idea why the compiler complains. Should be the same thing as before. 
> 
> Thanks
> Laurent

I believe the problem is that you did not define a Compare function in your instantiation.  Try

        with function Compare (Left, Right : Element_Type) return Boolean is <>;

Eryndlia Mavourneen
(KK1T)


  parent reply	other threads:[~2014-04-15 20:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-15 18:26 Problem with generic package Laurent
2014-04-15 19:36 ` 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 [this message]
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