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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a37312089c9aa81b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!v16g2000vbq.googlegroups.com!not-for-mail From: Syntax Issues Newsgroups: comp.lang.ada Subject: Re: Order of execution of subprogram parameters Date: Sat, 19 Mar 2011 12:51:25 -0700 (PDT) Organization: http://groups.google.com Message-ID: <362b2da7-c3dd-47f6-a056-4cb5165ca871@v16g2000vbq.googlegroups.com> References: NNTP-Posting-Host: 130.207.218.196 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1300564286 8948 127.0.0.1 (19 Mar 2011 19:51:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 19 Mar 2011 19:51:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v16g2000vbq.googlegroups.com; posting-host=130.207.218.196; posting-account=iBd8kwoAAADZsnwFNFLVlwsLLxwDLPUm User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19292 Date: 2011-03-19T12:51:25-07:00 List-Id: On Mar 19, 2:58=A0pm, Jeffrey Carter wrote: > On 03/19/2011 10:10 AM, Syntax Issues wrote: > > > Across ada compilers what is the order of execution for subprogram > > parameters? Is it left-to-right, right-to-left, and does it matter if > > I use labels out of order? > > ARM 6.4 says, > > "For the execution of a subprogram call, the name or prefix of the call i= s > evaluated, and each parameter_association is evaluated (see 6.4.1). If a > default_expression is used, an implicit parameter_association is assumed = for > this rule. These evaluations are done in an arbitrary order." > > > Animation.Joints.Append( > > =A0 =A0(Name =A0 =3D> =A0Remove_Quotes(Next_String(File, Current_Line))= , > > =A0 =A0 Parent =3D> =A0Next_Integer_4_Signed(File, Current_Line), > > =A0 =A0 Flags =A0=3D> =A0Next_Integer_1_Unsigned(File, Current_Line), > > =A0 =A0 Start =A0=3D> =A0Next_Integer_4_Signed(File, Current_Line)); > > However, what you have here is not evaluation of subprogram parameters bu= t > evaluation of aggregate components. The answer, from ARM 4.3, is the same= : > > "For the evaluation of an aggregate, an anonymous object is created and v= alues > for the components or ancestor part are obtained (as described in the sub= sequent > subclause for each kind of the aggregate) and assigned into the correspon= ding > components or ancestor part of the anonymous object. Obtaining the values= and > the assignments occur in an arbitrary order." > > -- > Jeff Carter > "C++: The power, elegance and simplicity of a hand grenade." > Ole-Hjalmar Kristensen > 90 Great, thanks for the reply. I'll make sure to better job searching the ARM before I post questions like this next time.