TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To: Toshitaka KUMANO <[log in to unmask]>
Date: Thu, 23 Aug 2001 09:51:14 +0200
Reply-To: Pascal Obry <[log in to unmask]>
From: Pascal Obry <[log in to unmask]>
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Parts/Attachments: text/plain (32 lines)
Toshitaka KUMANO writes:
 > Such codes below are frequent in programs.
 >
 > if Found_Error then
 >    raise Some_Exception;
 > end if;
 > ...
 > if No_Need_Go_Further then
 >    return [Value];       --  function/procedure
 > end if;
 >

It seems nice but in real program I have rarely see this kind of code. In the
case of raise statement there is almost always some recovery code before the
raise and also more and more we use of Exceptions.Raise_Exception. In the case
of the return, there is often in a branch with some code before... Of course
if is always possible to add a boolean variable and use 'return ... when'...

Anyway that's my 2 cents :)

Pascal.

--

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"

ATOM RSS1 RSS2