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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: urgent question - generics Reply-To: anon@anon.org (anon) References: X-Newsreader: IBM NewsReader/2 2.0 Message-ID: Date: Mon, 03 Sep 2007 21:39:40 GMT NNTP-Posting-Host: 12.65.222.155 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1188855580 12.65.222.155 (Mon, 03 Sep 2007 21:39:40 GMT) NNTP-Posting-Date: Mon, 03 Sep 2007 21:39:40 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:1718 Date: 2007-09-03T21:39:40+00:00 List-Id: Your code does not solve any form of the lady's question! Which stated that the procedure did not have a parameter! I answer how to call a procedure from a function, where the procedure was passed in the functional pararmeter list. In , tmoran@acm.org writes: >> procedure test is >> begin -- test >> Ada.Text_IO.Put_Line ( "Testing" ) ; >> end test ; >> >> >> Result : Float ; >> >>begin >> Result := function_0 ( test'address, 0.5 ) ; >>end zzero ; > Ada is designed so the compiler can help catch errors, but if you >would rather hide the nature of the parameter to function_0 from the >compiler, and use a debugger to find the resulting errors yourself, try: > procedure test1(x : in Integer) is > begin > Ada.Text_IO.Put_Line ( "Test1" & Integer'image(x)); > end test1; > > test2 : float; > >and > Result := function_0 ( test1'address, 0.5 ) ; > Result := function_0 ( test2'address, 0.5 ) ;