comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <OneWingedShark@gmail.com>
Subject: Re: calling function inside procedure call
Date: Fri, 03 Oct 2014 23:12:43 -0700
Date: 2014-10-03T23:12:43-07:00	[thread overview]
Message-ID: <jjLXv.281294$DX.121948@fx06.iad> (raw)
In-Reply-To: <m0nt68$gfu$1@dont-email.me>

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.

  reply	other threads:[~2014-10-04  6:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 19:50 calling function inside procedure call Stribor40
2014-10-03 19:56 ` Adam Beneschan
2014-10-03 19:57   ` Stribor40
2014-10-03 20:42 ` Marius Amado-Alves
2014-10-04  1:07   ` Stribor40
2014-10-04  3:33     ` Shark8
2014-10-04  4:31       ` Jeffrey Carter
2014-10-04  6:12         ` Shark8 [this message]
2014-10-04  1:08   ` Stribor40
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox