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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx06.iad.POSTED!not-for-mail From: Shark8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:35.0) Gecko/20100101 Thunderbird/35.0a1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: calling function inside procedure call References: <78448f04-9371-4537-a40a-11bbbfb9b3d8@googlegroups.com> <6c03d8ce-6f9c-4ae6-83a1-af7baa31b144@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Sat, 04 Oct 2014 05:10:39 UTC Organization: TeraNews.com Date: Fri, 03 Oct 2014 23:12:43 -0700 X-Received-Bytes: 1509 X-Received-Body-CRC: 3652369487 Xref: news.eternal-september.org comp.lang.ada:22075 Date: 2014-10-03T23:12:43-07:00 List-Id: On 10/3/2014 9:31 PM, Jeffrey Carter wrote: > On 10/03/2014 08:33 PM, Shark8 wrote: >> >> return Some_Record'( >> A => Get_Segment, >> B => Get_Segment, >> C => Get_Segment, >> D => Get_Segment >> ); > > You're relying on the order of evaluation, which is an error. The compiler may > evaluate the expressions for the record components in any order, which is > clearly not acceptable here. > Good catch; I "overoptomized". In the code that I have the components are local variables, so there's no order of evaluation issue.