From: Pascal Obry <pascal@obry.net>
To: Anh Vo <anhvofrcaus@gmail.com>
Subject: Re: Extended Return Statement with exception
Date: Tue, 22 Nov 2005 22:46:55 +0100
Date: 2005-11-22T22:46:57+01:00 [thread overview]
Message-ID: <438391CF.6040404@obry.net> (raw)
In-Reply-To: <1132687889.831797.109510@o13g2000cwo.googlegroups.com>
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
next prev parent reply other threads:[~2005-11-22 21:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-22 19:31 Extended Return Statement with exception Anh Vo
2005-11-22 21:46 ` Pascal Obry [this message]
2005-11-22 22:27 ` Anh Vo
2005-11-23 0:06 ` Randy Brukardt
2005-11-23 2:49 ` Anh Vo
2005-11-23 9:24 ` Georg Bauhaus
2005-11-23 14:36 ` Anh Vo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox