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,ebdc5ed511896a0 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!news.banetele.no!uio.no!newsfeed1.fi.sn.net!fi.sn.net!newsfeed2.fi.sn.net!news.song.fi!not-for-mail Date: Mon, 03 Sep 2007 17:08:28 +0300 From: Niklas Holsti User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060628 Debian/1.7.8-1sarge7.1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: urgent question - generics References: <1188809249.040351.100160@r29g2000hsg.googlegroups.com> <46DBD07D.1010608@obry.net> <1188811690.972176.242330@22g2000hsm.googlegroups.com> <46DC0F26.8090804@obry.net> In-Reply-To: <46DC0F26.8090804@obry.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <46dc14fb$0$3230$39db0f71@news.song.fi> Organization: TDC Song Internet Services NNTP-Posting-Host: laku61.adsl.netsonic.fi X-Trace: 1188828411 news.song.fi 3230 81.17.205.61:32995 X-Complaints-To: abuse@song.fi Xref: g2news2.google.com comp.lang.ada:1695 Date: 2007-09-03T17:08:28+03:00 List-Id: Pascal Obry wrote: > shoshanister@gmail.com a �crit : > .. >>I want to create a generic function that receives a generic procedure >>(without any parameters) as a parameter. > > > generic > procedure Proc; I assume Pascal meant "with procedure Proc;" here. > function Func (P1 : in Positive) return String; It's still unclear to me if the OP wants the parameterless procedure (Proc, above) to be a generic parameter (as in Pascal's solution) that is associated with an actual procedure when the generic function is instantiated, or a non-generic parameter to the (generic) function that is associated with an actual procedure when an instance of the generic function is called (as in "anon's" non-generic solution where only the address of the procedure was used). -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .