From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.145.105 with SMTP id st9mr1653909pab.23.1397586409990; Tue, 15 Apr 2014 11:26:49 -0700 (PDT) X-Received: by 10.140.109.98 with SMTP id k89mr79557qgf.11.1397586409933; Tue, 15 Apr 2014 11:26:49 -0700 (PDT) Path: border2.nntp.dca3.giganews.com!backlog4.nntp.dca3.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!ur14no8605512igb.0!news-out.google.com!dz10ni10601qab.1!nntp.google.com!cm18no3228592qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 15 Apr 2014 11:26:49 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=87.240.222.153; posting-account=sDyr7QoAAAA7hiaifqt-gaKY2K7OZ8RQ NNTP-Posting-Host: 87.240.222.153 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1ffb84f0-5e50-4807-90ff-dfdfac11c501@googlegroups.com> Subject: Problem with generic package From: Laurent Injection-Date: Tue, 15 Apr 2014 18:26:49 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Original-Bytes: 1996 Xref: number.nntp.dca.giganews.com comp.lang.ada:185746 Date: 2014-04-15T11:26:49-07:00 List-Id: 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; . . .