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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4d88fd7702b42427 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-22 06:56:05 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!uni-duisburg.de!zib-berlin.de!Germany.EU.net!Munich.Germany.EU.net!ibm.de!aixssc.uk.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada Subject: Re: Access to subprograms Date: 22 Mar 1995 14:56:05 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <3kpdq5$15is@watnews1.watson.ibm.com> References: Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Date: 1995-03-22T14:56:05+00:00 List-Id: In article , fred@play.uno (Fred Hosch) writes: |> From my casual and uninformed reading of the RM, it |> seems that something like "+"'Access is legal, even, |> heaven forbid, for a predefined instance of "+". It's prohibited by RM95 6.3.1, paragraphs 4, 7, and 11. (Predefined "+" operators have convention Intrinsic, and 'Access is prohibited for subprograms with this convention.) Instead, you can write function My_Wrapper (Left, Right: Integer) return Integer is begin return Left + Right; end My_Wrapper; (or similarly for some other numeric type) and write My_Wrapper'Access. But why "heaven forbid"? It would have been easy for the compiler to generate a wrapper function like this automatically and invisibly, and it strikes me as a gratuitous nuisance to make the programmer go through the ritual. It also makes the language less uniform. |> Can anyone provide a pointer? Cute pun. |> Thanks. You're welcome. -- Norman H. Cohen ncohen@watson.ibm.com