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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!bu.edu!inmet!stt From: stt@inmet.inmet.com Newsgroups: comp.lang.ada Subject: Re: Updating IN OUT's after exceptions Message-ID: <20600103@inmet> Date: 1 May 91 22:56:00 GMT References: <33747@mimsy.umd.edu> Nf-ID: #R:mimsy.umd.edu:33747:inmet:20600103:000:1096 Nf-From: inmet.inmet.com!stt May 1 18:56:00 1991 List-Id: Re: Updating IN OUT's after exceptions Query on 5:18 am Apr 30, 1991 by stuartw@tove.cs.umd.edu > In the enclosed program, I raise an exception inside a subroutine after > making an assignment to an IN OUT parameter. In the first case, the > parameter is a scalar, in the second it is not. Everything else is the > same, except the resulting behavior. Is this permitted by the LRM? > I know that compilers can pass non-scalar parameters by copy-in/copy-out > or reference, but should that effect exception handling? Is Ada/9x > addressing this? > > Thanks. > > Stuart. (weinstei@kong.gsfc.nasa.gov) The Good Old Reference Manual, section 6.2:12 says the following: If the execution of a subprogram is abandoned as a result of an exception, the final value of an actual parameter [...] can be either its value before the call [if passed by copy] or a value assigned to the formal parameter during the execution of the subprogram [if passed by reference]. In other words, the compiler "does the right thing." S. Tucker Taft Intermetrics, Inc. Cambridge, MA 02138