TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Pascal Obry <[log in to unmask]>
Thu, 23 Aug 2001 09:51:14 +0200
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 Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--| "The best way to travel is by means of imagination"