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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!watmath!clyde!bellcore!rutgers!tut.cis.ohio-state.edu!bloom-beacon!bu-cs!mirror!rayssd!raybed2!linus!mbunix!eachus From: eachus@mitre-bedford.ARPA (Robert Eachus) Newsgroups: comp.lang.ada Subject: Definition of pass by reference Summary: The issue is still open Keywords: pass by reference Message-ID: <42528@linus.UUCP> Date: 7 Dec 88 16:03:51 GMT References: <10960@ulysses.homer.nj.att.com> <3734@hubcap.UUCP> <10963@ulysses.homer.nj.att.com> Sender: news@linus.UUCP Reply-To: eachus@mbunix.mitre.org (Robert I. Eachus) Organization: The MITRE Corporation, Bedford, Mass. List-Id: In article <10963@ulysses.homer.nj.att.com> dsr@hector.UUCP (David S. Rosenblum) writes: >In article <3734@hubcap.UUCP> wtwolfe@hubcap.clemson.edu writes: >| If nothing can be assumed about parameter passing behavior, then >| parameter passing is just too vaguely defined, and needs to be clarified. > >You'll have to take this up with the Ada Language Maintenance Committee. >The language designers, and many Ada programmers, believe it to be as >clearly defined as it needs to be so that portable programs may be written. The Ada Rapporteur Group (the current instantiation of the Ada LMC), does NOT feel that it is as clearly defined as it needs to be. AI-178 Passing parameters by reference, was discussed again at the meeting in October, and although we are close to a consensus, the AI is being rewritten for the February meeting. Basically, the AI defines when it is legal to pass parameters by reference, and what it means to do so. In spite of some of the comments here, there are many cases where non-scalar parameters must be passed by copy to conform to Ada semantics. However, there are some questionable cases which this AI attempts to resolve. For example, if A and B are arrays stored in adjacent locations in memory, is it legal to pass A&B by reference? The AI says no, but currently allows A(1..10) to be passed by reference, and is being reworded to require (A) to be passed by copy. If this issue is important to you, get the current version from ajpo.sei.cmu.edu, and send any comments to ada-comment@ajpo.sei.cmu.edu. Please, read the entire AI and any current comments before commenting on it yourself. This is an issue where programming style and what users think are important, but there are some real gotchas that have to be taken into account. Robert I. Eachus with STANDARD_DISCLAIMER; use STANDARD_DISCLAIMER; function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...