TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Mime-Version:
1.0
Sender:
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
X-To:
"Robert I. Eachus" <[log in to unmask]>
Date:
Sat, 21 Mar 1998 18:14:43 -0500
Reply-To:
Mike Kamrad <[log in to unmask]>
Subject:
From:
Mike Kamrad <[log in to unmask]>
In-Reply-To:
Content-Type:
text/plain; charset="us-ascii"
Parts/Attachments:
text/plain (43 lines)
At 06:38 PM 3/20/98 -0500, Robert I. Eachus wrote:
>At 05:51 PM 3/19/98 -0500, Mike Kamrad wrote:
>>  Does anyone with a Rationale for Ada83 (mine's packed away)
>>or a good memory tell me why continue wasn't included in the language?

>
>    ...
>    when D =>
>      Do_Some_Processing;
>      if Condition
>      then
>        Error_Message;
>        continue;
>      end if;
>      More_Processing;
>    when E => ...
>
>     and of course what we really write in Ada is:
>    ...
>    when D =>
>      Do_Some_Processing;
>      if Condition
>      then
>        Error_Message;
>      else
>        More_Processing;
>      end if;
>    when E => ...
>
>    (Or possibly "if not Condition"  but I like to put the (shorter)error
>cases first.)  In any case, I have yet to use a goto or even want a
>continue in such code.

thanks for this compelling example.  I sometimes forget there are very good
alternatives in Ada without resorting to gotos...mike

------------------------------------------------------
Mike Kamrad                             [log in to unmask]
BlazeNet                                1.508.370.4343 x139
Suite 300                               1.508.370.4344 FAX
1671 Worcester Road
Framingham MA 01701

ATOM RSS1 RSS2