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,ede2fcfbef7f3092 X-Google-Attributes: gid103376,public Path: controlnews3.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!transit.news.xs4all.nl!195.241.76.212.MISMATCH!tiscali!transit1.news.tiscali.nl!dreader2.news.tiscali.nl!not-for-mail Newsgroups: comp.lang.ada Subject: Re: "out" parameters References: From: Ludovic Brenta Date: Fri, 21 May 2004 01:53:53 +0200 Message-ID: <874qqairji.fsf@insalien.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:qGN4dR04IfDIP6xV/JPTwcecAuk= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: Tiscali bv NNTP-Posting-Date: 21 May 2004 01:52:43 CEST NNTP-Posting-Host: 83.134.237.195 X-Trace: 1085097163 dreader2.news.tiscali.nl 41764 83.134.237.195:34108 X-Complaints-To: abuse@tiscali.nl Xref: controlnews3.google.com comp.lang.ada:715 Date: 2004-05-21T01:52:43+02:00 List-Id: Jo writes: > Does anyone happen to know whether an "out" parameter in Ada is > being passed by-copy or by-reference? > > If the parameter is a record with neither elementary nor access type > component in it, then is it true that whether the "out" parameter is > passed by-copy or by-reference is totally compiler dependent? Yes, the compiler decides. Only for tagged types, parameters are passed by reference no matter what the mode. Besides by-copy and by-reference, there is also the possibility of passing parameters in processor registers. The mechanism chosen also depends on whether or not the called subprogram is inlined. -- Ludovic Brenta.