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,c6acbb9f2027b8c9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Wed, 05 Oct 2005 15:09:41 -0500 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: volatile vs aliased References: <1128525722.605730.281980@g43g2000cwa.googlegroups.com> <87mzlnomca.fsf@ludovic-brenta.org> <1128537566.929419.121660@g14g2000cwa.googlegroups.com> <874q7voigp.fsf@ludovic-brenta.org> <1128542556.356635.96060@f14g2000cwb.googlegroups.com> Date: Wed, 05 Oct 2005 22:11:01 +0200 Message-ID: <87zmpnn2qy.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:/HkbCQvIMVADToG5q85rNb66P+I= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 83.134.241.83 X-Trace: sv3-JmzsduVP/Hnd5gG1UGa4p+cp6g2aC3KZLSy0nX9GingI/z/DBoeHf4hNDUOsrqgGQmt76To6HgnSbxQ!OejFys5sgQmo3QEKXsv/6+FydulkD7K1bw+c4dReGGKxm0O2EWhu3g6DIgWEuCFcMw/J0kLQcA== X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz 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.32 Xref: g2news1.google.com comp.lang.ada:5425 Date: 2005-10-05T22:11:01+02:00 List-Id: "REH" writes: > Ludovic Brenta wrote: >> Why do you have to use a generic? Why not just: >> >> procedure Call_Procedure (At_Address : in System.Address) is >> procedure Proc; >> for Proc'Address use At_Address; >> begin >> Proc; >> end Call_Procedure; > > I was just trying to by lazy, and not do that everytime. If I have to, > I have to. I don't understand. Do you mean to say that one Call_Procedure is not sufficient? That you'd have to have many such procedures? Why? >> I don't know how you could call a procedure with unknown parameters. >> Or perhaps you mean with one known parameter which is the address of >> a record containing arbitrary parameters? > The caller would know. What I don't know to do (and probably can't) is > define a generic that can be instantiated using *any* access type, even > one to a subprogram. > > I guess I am spending more time trying to avoid work, than just doing > it. In my example, the Parameter_Type can contain an access-to-subprogram. Of course, you need to instantiate the generic once per parameter profile, and there may be many different ones, so that the generic doesn't really save you much work. -- Ludovic Brenta.