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!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Mon, 03 Sep 2007 11:18:51 -0500 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: urgent question - generics References: X-Newsreader: Tom's custom newsreader Message-ID: Date: Mon, 03 Sep 2007 11:18:52 -0500 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 24.4.252.232 X-Trace: sv3-l2TWn2LF1Yf6asj0/IgKh/8sC1YzaGaN5PHsgim/FpNoS9OWKbsWRbQPHiVaI/EvpYd9w7Xc1yWmCcE!odZoE4CrlvuUkcgedFW4PdcGMmDluG1xFXwkiPuqbQFEQ8hf3Q47weltonjOaAHtVOPQwhrG8jyB!/DST4DZiYyoI61J0DtptS0XhW3re X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.35 Xref: g2news2.google.com comp.lang.ada:1703 Date: 2007-09-03T11:18:52-05:00 List-Id: > 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 ) ;