TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Mime-Version: 1.0
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Date: Sat, 21 Mar 1998 18:06:56 -0500
Reply-To: Mike Kamrad <[log in to unmask]>
From: Mike Kamrad <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset="us-ascii"
Parts/Attachments: text/plain (36 lines)
At 12:00 PM 3/20/98 -0700, [log in to unmask] wrote:
>There is a way to simulate Continue without using any Goto:
>   Any_Loop:
>      loop
>         Continue_Loop:
>            loop
>               -- this loop is not a real one.
>               -- it is not eexecuted more than once at a time.
>               ...
>               -- Continue
>               exit Continue_Loop;
>               ...
>               exit Continue_Loop;
>            end loop Continue_Loop;
>       end loop Any_Loop;
>I agree it is rather ugly, but at least for those that are prohibited from
>using Gotos, they can simulate Continue; and the efficiency should be quite
>-- Vincent


I thought of this one too as an alternative to the goto but I thought it
was uglier and muddles the intent of the exit.  The goto to a null last
statement of the loop makes the intent more clear...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