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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9f3d09bde7b33b5d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-09 18:16:07 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: Jeffrey Carter Organization: jrcarter commercial-at acm [period | full stop] org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Pass by reference References: <19b0e504.0404080652.4eab9f80@posting.google.com> <19b0e504.0404090457.52013e4@posting.google.com> In-Reply-To: <19b0e504.0404090457.52013e4@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sat, 10 Apr 2004 01:16:06 GMT NNTP-Posting-Host: 63.184.0.98 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.pas.earthlink.net 1081559766 63.184.0.98 (Fri, 09 Apr 2004 18:16:06 PDT) NNTP-Posting-Date: Fri, 09 Apr 2004 18:16:06 PDT Xref: archiver1.google.com comp.lang.ada:6934 Date: 2004-04-10T01:16:06+00:00 List-Id: Dan McLeran wrote: >>The Ada rules, simple version, for parameter passing mechanisms, are: >> >>Elementary types are always passed by copy. >> >>Tagged and private types are always passed by reference. >> >>Other types have the mechanism chosen by the compiler. > > That's what I thought. The RM is actually very clear about this, but > it seems that alot of people assume compilers have more leeway. Alot > of the answers indicate that people think the compiler is always free > to choose the best convention. I don't believe this is true. A > conforming compiler should do exactly what the RM says, which is what > your short-version says. Except for my mistake in writing "private" instead of "limited". The 2 are unrelated. I suspect the discrepency we're seeing between the ARM and the responses here are more due to the use of informal language than to significant misunderstandings of the ARM. However, the best rule is that you shouldn't care about the parameter passing mechanism [unless it gets you in trouble]. -- Jeff Carter "I'm a kike, a yid, a heebie, a hook nose! I'm Kosher, Mum! I'm a Red Sea pedestrian, and proud of it!" Monty Python's Life of Brian 77