Pascal Obry wrote:
> It seems nice but in real program I have rarely see this kind of code.
You may rarely see.
I see and write lots.
How about many of GNAT runtime, for example,
ADA.NUMERICS.GENERIC_ELEMENTARY_FUNCTIONS ?
> In the
> case of raise statement there is almost always some recovery code before the
> raise
If the subprogram does not update some library level resources
nor out paremters, no recovery is necessary.
There can be many situation with no recovery ?
> and also more and more we use of Exceptions.Raise_Exception.
Only to add Message string ?
# There is another room for language extension :-)
# Such as
# raise Argument_Error when Left > Right
# with "Invalid Combination";
# :-)
> In the case
> of the return, there is often in a branch with some code before...
There may be. Yet it may be unnecessary in some cases.
Your mention here is true for "exit when" ? :-)
> Of course
> if is always possible to add a boolean variable and use 'return ... when'...
Sorry. I cannot understand this statement. Could you elaborate ?
Regards,
--
------------------------------------------------------------------------
Toshitaka KUMANO <[log in to unmask]>