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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b3f788f59498d3af X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Exceptions and out procedure arguments (using GNAT GPL) Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <79c673pq5htg508nkoi935n3udqg5ps7r8@4ax.com> Date: Sat, 16 Jun 2007 08:55:44 +0200 Message-ID: <1rtyporytkm2u.dyecl8roox43$.dlg@40tude.net> NNTP-Posting-Date: 16 Jun 2007 08:55:37 CEST NNTP-Posting-Host: b5c07e75.newsspool4.arcor-online.net X-Trace: DXC=6ddQF4oh]gIlU`@c^jLCbJ4IUK On Sat, 16 Jun 2007 01:05:10 GMT, Fionn Mac Cumhaill wrote: > Consider a procedure that starts like this: > > procedure My_Procedure ( > O: out integer > ) > is > begin > > -- various statements follow > > O := 999; > > -- more statements follow > > raise My_Exception; If you want to keep side effects on a parameter upon raising an exception, then you should use access to Integer, because Integer is not a by-reference type: procedure My_Procedure (O: access integer) is begin ... O.all := 999; ... raise My_Exception; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de