From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Requeue and IN OUT parameters
Date: Sat, 5 May 2001 22:13:26 GMT
Date: 2001-05-05T22:13:26+00:00 [thread overview]
Message-ID: <wcc8zkbsaux.fsf@world.std.com> (raw)
In-Reply-To: 9cv3e9$gul$1@news.netmar.com
adam@irvine.com writes:
> 9.5.4(11) says that if an entry body completes other than by a
> requeue, the program returns to the caller and any copy-back of
> parameters occurs. What happens to the parameters if the entry
> body does a requeue? In this example:
>
> protected PR is
> entry E1 (Count : in out integer);
> entry E2 (Count : in out integer);
> end PR;
>
> protected body PR is
> entry E1 (Count : in out integer) when Some_Condition is
> begin
> if Blah_Blah_Blah then
> Count := Count + 1;
> requeue E2;
> end if;
> Do_A_Bunch_Of_Other_Stuff;
> end E1;
> . . .
>
> In this example, does the effect of the statement "Count := Count + 1"
> become lost?
No.
>... Is the value E2 sees the original value of Count, the
> incremented value, or implementation-dependent?
The incremented value.
> (Actually, I believe this question is pertinent to task entries also.)
Yes, and the answer is the same there.
- Bob
prev parent reply other threads:[~2001-05-05 22:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-04 20:28 Requeue and IN OUT parameters adam
2001-05-05 6:27 ` Mark Biggar
2001-05-05 22:13 ` Robert A Duff [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox