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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3834afba374f4cfd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-05 15:14:48 PST Newsgroups: comp.lang.ada Path: newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!uunet!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Requeue and IN OUT parameters Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Sat, 5 May 2001 22:13:26 GMT References: <9cv3e9$gul$1@news.netmar.com> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: newsfeed.google.com comp.lang.ada:7213 Date: 2001-05-05T22:13:26+00:00 List-Id: 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