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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,878cc452376823e0 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-a.proxad.net!nnrp11-1.free.fr!not-for-mail From: Samuel Tardieu Newsgroups: comp.lang.ada Subject: Re: Generic body References: Date: Wed, 14 May 2008 23:51:26 +0200 Message-ID: <873aok1rmp.fsf@willow.rfc1149.net> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:MZJX5Tq6BcIAbiPwWIeTMooQgCE= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Leafnode-NNTP-Posting-Host: 81.56.47.149 Organization: Guest of ProXad - France NNTP-Posting-Date: 14 May 2008 23:55:01 MEST NNTP-Posting-Host: 88.191.14.223 X-Trace: 1210802101 news-1.free.fr 3617 88.191.14.223:60369 X-Complaints-To: abuse@proxad.net Xref: g2news1.google.com comp.lang.ada:67 Date: 2008-05-14T23:55:01+02:00 List-Id: >>>>> "S�bastien" == S�bastien writes: S�bastien> I don't how to do this because: 1) The compiler refuse the S�bastien> instance of MyProc because it doesn't have the MyProc body S�bastien> 2) If I put the body of MyProc in the package spec, the S�bastien> compiler refuses it because it's not the right place. What compiler are you using? (name and version) With a recent GNAT, I get: 7. procedure MyProcInt is new MyProc(Toto => Integer); | >>> warning: cannot instantiate "MyProc" before body seen >>> warning: Program_Error will be raised at run time 8. procedure MyProcStr is new MyProc(Toto => String); | >>> actual for "Toto" must be a definite subtype which I think explains things well. Sam -- Samuel Tardieu -- sam@rfc1149.net -- http://www.rfc1149.net/