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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!postnews.google.com!50g2000hsm.googlegroups.com!not-for-mail From: shoshanister@gmail.com Newsgroups: comp.lang.ada Subject: Re: urgent question - generics Date: Mon, 03 Sep 2007 03:58:36 -0700 Organization: http://groups.google.com Message-ID: <1188817116.418473.63040@50g2000hsm.googlegroups.com> References: <1188809249.040351.100160@r29g2000hsg.googlegroups.com> <46dbe4ac$0$3196$39db0f71@news.song.fi> NNTP-Posting-Host: 89.138.8.190 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1188817116 11554 127.0.0.1 (3 Sep 2007 10:58:36 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 3 Sep 2007 10:58:36 +0000 (UTC) In-Reply-To: <46dbe4ac$0$3196$39db0f71@news.song.fi> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 50g2000hsm.googlegroups.com; posting-host=89.138.8.190; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1678 Date: 2007-09-03T03:58:36-07:00 List-Id: On Sep 3, 1:42 pm, Niklas Holsti wrote: > anon wrote: > > with Ada.text_IO ; > > with System ; > > > procedure zzero is > > > function function_0 ( func : System.Address ; Data : Float ) > > return float is > > > procedure tst ; > > pragma Import ( Ada, tst ) ; > > for tst'address use func ; > > I hope that the original poster understands that "anon's" answer is > not correct. I agree that the newsgroup should not supply > ready-made answers to homework or examination questions, but we > should not supply false answers either. > > To the OP: surely your study materials contain examples of generic > functions or other generic components. Can you say more > specifically what you don't understand in those examples, or in the > question you are trying to solve? > > -- > Niklas Holsti > Tidorum Ltd > niklas holsti tidorum fi > . @ . Hi, I realised that the answer proposed here, is working great, but it's not really matching for what I was looking for. Perhaps I am looking for something that I did not understand well. While I was a student I got really sick, so now I got a special chance to attend the exam (3 years later), therefor, I had to study the language by my self. I understood the generics, but I was looking to make a generic function that receives an unknown procedure as a parameter, and runs the procedure. It's not like the 'regular' samples of " with function ">"(... " I was wondering if there is a chance of creating a generic function that receives an annonymous procedure. After trying to explain the question to you, I think I misunderstood the question, but still it bothers me. In any case, if I will not pass this exam, I will start bothering you here for the next few months :) Thanks for your willing to help. Ronit