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-Thread: 103376,a37312089c9aa81b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!weretis.net!feeder4.news.weretis.net!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Order of execution of subprogram parameters Date: Sat, 19 Mar 2011 11:58:22 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: NNTP-Posting-Host: 01e149a6c37f610546b9c6a3a25f088d Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: 2d53ce62e63d10b56daaba19369d65bf X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=2d53ce62e63d10b56daaba19369d65bf X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news2.google.com comp.lang.ada:19291 Date: 2011-03-19T11:58:22-07:00 List-Id: 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 is 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( > (Name => Remove_Quotes(Next_String(File, Current_Line)), > Parent => Next_Integer_4_Signed(File, Current_Line), > Flags => Next_Integer_1_Unsigned(File, Current_Line), > Start => Next_Integer_4_Signed(File, Current_Line)); However, what you have here is not evaluation of subprogram parameters but 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 values for the components or ancestor part are obtained (as described in the subsequent subclause for each kind of the aggregate) and assigned into the corresponding 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