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=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,bed01d177eaef486 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.177.12 with SMTP id bg12mr1450939qab.0.1343315883157; Thu, 26 Jul 2012 08:18:03 -0700 (PDT) Received: by 10.66.82.7 with SMTP id e7mr1709929pay.17.1343315777814; Thu, 26 Jul 2012 08:16:17 -0700 (PDT) Path: a15ni113198934qag.0!nntp.google.com!q21no4812974qas.0!news-out.google.com!b9ni65044154pbl.0!nntp.google.com!border1.nntp.dca.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!novia!news-peer1!btnet!zen.net.uk!hamilton.zen.co.uk!xlned.com!feeder5.xlned.com!feed.xsnews.nl!border-1.ams.xsnews.nl!newsfeed.straub-nv.de!news.linkpendium.com!news.linkpendium.com!news.glorb.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Keean Schupke Newsgroups: comp.lang.ada Subject: Re: Signature Package With Generic Proceedure Date: Mon, 23 Jul 2012 11:36:58 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <045f7b44-2a4a-4292-80fd-0b6bc8ee3465@googlegroups.com> NNTP-Posting-Host: 82.44.19.199 Mime-Version: 1.0 X-Trace: posting.google.com 1343068950 9938 127.0.0.1 (23 Jul 2012 18:42:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 23 Jul 2012 18:42:30 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=82.44.19.199; posting-account=T5Z2vAoAAAB8ExE3yV3f56dVATtEMNcM User-Agent: G2/1.0 X-Received-Bytes: 2942 Content-Type: text/plain; charset=ISO-8859-1 Date: 2012-07-23T11:36:58-07:00 List-Id: On Monday, 23 July 2012 11:26:03 UTC+1, Simon Wright wrote: > Keean Schupke writes: > > > If I have a package which defines a procedure like: > > > > > > generic > > with procedure Process(Set : in out Set_Type); > > procedure Update(Set : in out Set_Type); > > > > > > How do a declare a Signature package that includes this? > > > > > > generic > > with generic > > with procedure Process(Set : in out Set_Type); > > procedure Update(Set : in out Set_Type); > > package Set_Signature is end; > > > > > > Is not allowed. Is there some way to do this with nested packages? > > I guess you meant to say > > generic > type Set_Type is limited private; > ... > with generic > with procedure Process(Set : in out Set_Type); > procedure Update(Set : in out Set_Type); > ... > package Set_Signature is end; > > ? in which case I don't see why you couldn't say > > generic > type Set_Type is limited private; > ... > with procedure Update(Set : in out Set_Type); > ... > package Set_Signature is end; > > Seems to me that all you need is for the actual Update to have that > profile, who cares how it got that way? > > I've probably misunderstood this. Could maybe child units help? > > generic > with procedure Process (Set : in out Set_Type); > procedure Set_Signature.Update (Set : in out Set_Type); The Signature package defines the interface, so if the procedure in the signature is not generic, you could not instantiate it with the 'process' procedure you want to use. Basically a signature package is like the first part of a package that has no body, and you bind it to another package later that actually provides the body. Cheers, Keean.