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-7-bit Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: urgent question - generics From: Georg Bauhaus In-Reply-To: <1188838010.267002.81550@d55g2000hsg.googlegroups.com> References: <1188809249.040351.100160@r29g2000hsg.googlegroups.com> <46DBD07D.1010608@obry.net> <1188811690.972176.242330@22g2000hsm.googlegroups.com> <46DC0F26.8090804@obry.net> <1188838010.267002.81550@d55g2000hsg.googlegroups.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1188849528.2630.45.camel@kartoffel.vocalweb.de> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Date: Mon, 03 Sep 2007 21:58:48 +0200 Organization: Arcor NNTP-Posting-Date: 03 Sep 2007 21:58:09 CEST NNTP-Posting-Host: 802dd572.newsspool2.arcor-online.net X-Trace: DXC=M>>Som82b0C6PJ?[X6JIXEA9EHlD;3YcB4Fo<]lROoRA<`=YMgDjhgB;K_jGCiTXPB=kbmW`a1fGGC`2T@AUZfCK?J[3mRJmG?M X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:1715 Date: 2007-09-03T21:58:09+02:00 List-Id: On Mon, 2007-09-03 at 09:46 -0700, shoshanister@gmail.com wrote: > On Sep 3, 4:41 pm, Pascal Obry wrote: > > generic > > procedure Proc; > > function Func (P1 : in Positive) return String; > > > Thanks pascal, but this is not what I meant. This is too easy for me > as well. > I think that Anon understood my question better. To create a generic > function that receives a procedure as a parameter.. > Now it's just a general knowledge question ;-) Aha! This explains a few misunderstandings, then. The word "generic function" has a formal meaning as an Ada term. This meaning is quite different from "a function with a procedure parameter", which has formal Ada meaning as well! A generic function that receives a procedure will be something like type Procedure_Pointer is access procedure; generic ... function Some_Func(Proc: Procedure_Pointer) return Some_Type; I guess you just want the third line.