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=unavailable autolearn_force=no version=3.4.4 Path: Xl.tags.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 25 Nov 2014 12:32:52 -0600 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: How to get nice with GNAT? Date: Tue, 25 Nov 2014 13:33:01 -0500 Organization: IISS Elusive Unicorn Message-ID: References: <0d8452a9-68c9-4835-b6f3-17407132ca9f@googlegroups.com> <8194a204-7b15-463d-a2fd-4d3ba342fe97@googlegroups.com> X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.79.223.64 X-Trace: sv3-7tmTTgQlkcp1xgafo9bAMZdAgaLiTdTEnXiq9xCOi7omOfl1aZllaJ2moYUuaFl2PpkHD/MMX9sfyi4!aXc3lC7078AevYNsZmF43VB4lcI0ytCxIr3n/uG4oOgyDxNUSHnvkV8iJ1g+txtpSBF5uOdttuT+!kYVvwg6RyMF/rZ9bGQ19SUZe0Ew= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3395 Xref: number.nntp.giganews.com comp.lang.ada:191022 Date: 2014-11-25T13:33:01-05:00 List-Id: On Tue, 25 Nov 2014 05:45:45 -0800 (PST), brbarkstrom@gmail.com declaimed the following: >2) An exception is raised without an exception handler in the called procedure: >the exception is propagated back to the caller. I believe a pass-by-copy >parameter that is an "out" parameter in the interface propagates out to the >caller with the last assigned value. > >These behaviors are consistent with what I've observed in the execution of the >compiled versions of the code I provided in previous posts. I think the only >question about whether different compilers would implement this behavior is >item 2), although I have not been able to find a clear statement in RM as >to whether not passing back a pass-by-copy value is left to the implementer >in the event of the exception being raised. Have to dig up some ancient history... http://archive.adaic.com/standards/83rat/html/ratl-08-02.html#8.2.3 """ If the execution of a subprogram is abandoned as the result of an exception not handled locally, then the final value of an actual parameter that is associated with a formal parameter of mode in out may depend on the parameter passing mechanism: If by copy, the final value will still be the initial value before the call. """ Does leave OUT only parameters hanging, unless one just takes the view that IN OUT and OUT both rely upon copying from procedure local memory to return parameter memory at the same point (and an IN OUT copies from the parameter memory to local memory upon entry). """ The allowed mechanisms follow from the above considerations. a. For scalar types, and for all modes, all parameter passing must be achieved by copy. The same treatment applies to access types, for the reasons given in the previous section. b. For record and array types, the language does not specify whether parameter passing is achieved by reference or by copy. ... """ -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/