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-Thread: 103376,8520d8902b684d8a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!193.252.118.146.MISMATCH!news.wanadoo.fr!news.wanadoo.fr!not-for-mail Message-ID: <438391CF.6040404@obry.net> Date: Tue, 22 Nov 2005 22:46:55 +0100 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: fr, en MIME-Version: 1.0 Newsgroups: comp.lang.ada To: Anh Vo Subject: Re: Extended Return Statement with exception References: <1132687889.831797.109510@o13g2000cwo.googlegroups.com> In-Reply-To: <1132687889.831797.109510@o13g2000cwo.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit NNTP-Posting-Date: 22 Nov 2005 22:46:57 CET NNTP-Posting-Host: 82.120.30.225 X-Trace: 1132696017 news.wanadoo.fr 18311 82.120.30.225:2662 X-Complaints-To: abuse@wanadoo.fr Xref: g2news1.google.com comp.lang.ada:6534 Date: 2005-11-22T22:46:57+01:00 List-Id: Anh, > I have read the Extended Return Statement in Ada 2005 RM and Rationale. > However, I am still not sure how it works. In other word, what will be > returned when an exception occurs and handled the the exception handler > within this extended return statement. Consider the following notional > code, what exactly will be returned? Well what will be returned in this case: function Make (...) return T is R : T; begin ... return R; exception ... handle Constraint_Error here. end Make; I think this is equivalent to what will happen with your example with a structured return statement. Of course I should not think but have a look at the RM but I'm too lazy tonight ;) Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net --| "The best way to travel is by means of imagination" --| --| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595