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,WEIRD_PORT autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,daf6d89212a75f42 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.65.235 Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!nntpfeed.proxad.net!news.side3.eu!zen.net.uk!dedekind.zen.co.uk!news.hacking.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Using a generic instance to implement a public subprogram? Date: Mon, 4 Feb 2008 19:58:52 -0600 Organization: Jacob's private Usenet server Message-ID: References: <47a609b8$0$23664$4d3efbfe@news.sover.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1202176751 17751 69.95.181.76 (5 Feb 2008 01:59:11 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 5 Feb 2008 01:59:11 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 Xref: g2news1.google.com comp.lang.ada:19708 Date: 2008-02-04T19:58:52-06:00 List-Id: "Peter C. Chapin" wrote in message news:47a609b8$0$23664$4d3efbfe@news.sover.net... ... > GNAT says this: > > check.adb:3:14: missing body for "Sqrt" declared at check.ads:5 > check.adb:21:13: "Sqrt" conflicts with declaration at check.ads:5 > check.adb:21:13: instantiation cannot provide body for it > > The first message I understand. The last two I'm not clear about. Is > GNAT telling me that my declarations conflict in some way and because of > that it can't do the instantiation, or is the instantiation the *cause* > of the conflict? Is it possible to do what I'm trying to do here? An instantiation cannot complete another declaration. You have to use a body renaming for that, as someone else suggested. Formally, an instantiation cannot be a completion. (See 3.11.1 for a definition of completion.) Randy.