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,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-04-08 07:52:05 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: dan.r.mcleran@seagate.com (Dan McLeran) Newsgroups: comp.lang.ada Subject: Pass by reference Date: 8 Apr 2004 07:52:04 -0700 Organization: http://groups.google.com Message-ID: <19b0e504.0404080652.4eab9f80@posting.google.com> NNTP-Posting-Host: 192.55.20.36 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1081435924 19778 127.0.0.1 (8 Apr 2004 14:52:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 8 Apr 2004 14:52:04 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:6851 Date: 2004-04-08T07:52:04-07:00 List-Id: I am investigating using Ada for a project at work and I have a question I hope someone can answer. If I am interpreting the RM section 6.2 correctly, an array of elementary types does not meet the criteria of a by-reference type. But, when looking at the disassembly, it seems that passing an array of elementary types to a function as an in-mode parameter is passing by reference. Does this mean that an array of elementary types is an unspecfied type? A 2nd part to my question is: Does Ada automatically pass tagged types by reference no matter what mode the parameter is specfied (in, in out, or out)? The language RM 6.2 seems to suggest this is so. If so, does this mean that there is no way to pass a tagged type by value? I believe C# works this way without programmer intervention. I am using Aonix's ObjectAda V7.2.2, by the way. I have not tried GNAT for comparison. Thanks, Dan McLeran