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,79d6bba6ba97b840 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Renaming of procedures in a generic instantiation Date: Sun, 26 Sep 2010 11:41:44 +0300 Organization: Tidorum Ltd Message-ID: <8g8fa8FnhjU1@mid.individual.net> References: <8g890nFmqiU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net yMcJtzy52gAkQAds44OyywMkiEFviNxNMghrZMrMLW0rffOXtD Cancel-Lock: sha1:XYFmagX/jRjZQ8Xqxow9SDH4CnE= User-Agent: Mozilla-Thunderbird 2.0.0.24 (X11/20100328) In-Reply-To: Xref: g2news1.google.com comp.lang.ada:14267 Date: 2010-09-26T11:41:44+03:00 List-Id: Jeffrey Carter wrote: > On 09/25/2010 11:54 PM, Niklas Holsti wrote: >> >> No doubt you have already found a solution for Is_Empty, but anyway here >> is what I would do: >> >> function Is_Empty (Q : Queue) return Boolean >> is >> begin >> return Queues.Is_Empty (Queues.Set (Q)); >> end Is_Empty; > > Or change the name of the operation (Empty comes to mind). I would > probably use a wrapper record: > > type Queue_Handle is > Value : Queues.Set; > end record; > > procedure Put (Onto : in out Queue_Handle; Item : in Integer) is > -- null; > begin -- Put > Onto.Insert (New_Item => Item); A nit: You surely meant Onto.Value.Insert (New_Item => Item); > end Put; > > function Is_Empty (Queue : in Queue_Handle) is > -- null; > begin -- Is_Empty > return Queue.Value.Is_Empty; > end Is_Empty; > -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .