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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!husc6!encore!jcallen From: jcallen@Encore.COM (Jerry Callen) Newsgroups: comp.lang.ada Subject: Re: semantics of exception when exiting a procedure Summary: Don't trust "out" parameters Keywords: exception out-parameter Message-ID: <12489@encore.Encore.COM> Date: 15 Aug 90 17:08:25 GMT References: <1616@kuling.UUCP> Reply-To: jcallen@encore.com (Jerry Callen) Organization: Encore Computer Corp, Marlboro, MA List-Id: In article <1616@kuling.UUCP> daniel@mizar.docs.uu.se (Daniel Wengelin) writes: >Question: >What are the semantics when a procedure with out parameters is >exited by an exception. Can the out parameters be used, if they >have been assigned prior to the exception ? > > [example deleted] This whole area is described in something less than lucid detail in section 11.6 (Exceptions and Optimization). The example and comments in paragraphs 10 and 11 are helpful. Basically, if the exception is raised in the body, you can depend only upon initializations done in the declarations. In other words, the value of out parameters is undefined. -- Jerry Callen jcallen@encore.com