TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show HTML 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 16:16:55 +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 (53 lines)
Toshitaka KUMANO writes:
 > > Of course
 > > if is always possible to add a boolean variable and use 'return
 > > ... when'...
 > Sorry. I cannot understand this statement. Could you elaborate ?

I just meant that you can use a boolean to control the return as in:

      Cond : Boolean;

      if A = B then
         Cond := True;
         Cond := False;
      end if;


      return when Cond;

In this case the fact that there is some code to call before returning is not
a problem...

My point was that the following case is quite common:

   if A = B then
   end if;

But you are right that this is also the case for "exit ... when"...



--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--| "The best way to travel is by means of imagination"