comp.lang.ada
 help / color / mirror / Atom feed
From: Ole-Hjalmar Kristensen <ohk@clustra.com>
Subject: Re: bitwise comparators
Date: 2000/01/19
Date: 2000-01-19T00:00:00+00:00	[thread overview]
Message-ID: <umqaem2zb4o.fsf@gong2.clustra.com> (raw)
In-Reply-To: yecwvp6pspw.fsf@king.cts.com

Keith Thompson <kst@cts.com> writes:

> Gautier <gautier.demontmollin@maths.unine.ch> writes:
> > The situation seems the same to me: both have for and while loops. Ada has
> > a conditionless loop in addition. Isn't there an exit statement in C ?
> 
> Yes, C's break statement is similar to Ada's exit statement.  A major
> difference is that a C break statement terminates the innermost
> enclosing loop or switch statement; it doesn't let you terminate an
> outer loop.
> 
> -- 
> Keith Thompson (The_Other_Keith) kst@cts.com  <http://www.ghoti.net/~kst>
> San Diego Supercomputer Center           <*>  <http://www.sdsc.edu/~kst>
> Welcome to the last year of the 20th century.

C also has the continue statement. which is not so widely used, but
which is handy sometimes. Btw., I really like the Ada loop constructs,
especially the exit <named loop> construct which you mentioned.  The C
for statement is very general, but I have a nagging feeling that in
many instances a construct like Ada's 

loop 
...  
   exit when ...  
...
end loop; 

is a more maintainable alternative than trying to cram too much into
the for(...)  part of a C for loop.

-- 
E pluribus Unix




  reply	other threads:[~2000-01-19  0:00 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-15  0:00 bitwise comparators Alexander Van Hecke
2000-01-15  0:00 ` David C. Hoos, Sr.
2000-01-16  0:00 ` Matthew Heaney
2000-01-16  0:00 ` DuckE
2000-01-17  0:00   ` Alexander Van Hecke
2000-01-17  0:00     ` David C. Hoos, Sr.
2000-01-17  0:00     ` tmoran
2000-01-17  0:00     ` Mike Silva
2000-01-17  0:00       ` Brian Rogoff
2000-02-05  0:00         ` Ashley Deas Eachus
2000-02-05  0:00           ` Jeff Carter
2000-02-06  0:00           ` Andy
2000-02-07  0:00           ` Brian Rogoff
2000-02-09  0:00             ` Robert Iredell Eachus
2000-01-17  0:00       ` Alexander Van Hecke
2000-01-17  0:00         ` Gautier
2000-01-17  0:00         ` David Starner
2000-01-17  0:00         ` Mike Silva
2000-01-18  0:00           ` Charles Hixson
2000-01-17  0:00     ` Matthew Heaney
2000-01-17  0:00     ` Gautier
2000-01-18  0:00       ` Keith Thompson
2000-01-19  0:00         ` Ole-Hjalmar Kristensen [this message]
2000-01-17  0:00     ` Jeff Carter
2000-01-17  0:00       ` Alexander Van Hecke
2000-01-17  0:00         ` David Starner
2000-01-17  0:00           ` Alexander Van Hecke
2000-01-17  0:00             ` David Starner
2000-01-18  0:00             ` Preben Randhol
2000-01-18  0:00             ` Fraser
2000-01-18  0:00               ` Bertrand Augereau
2000-01-19  0:00                 ` Ted Dennison
2000-01-19  0:00                   ` Marin D. Condic
2000-01-19  0:00                     ` Ted Dennison
2000-01-18  0:00           ` Ted Dennison
2000-01-17  0:00         ` Gautier
2000-01-17  0:00           ` Alexander Van Hecke
2000-01-17  0:00             ` David Starner
2000-01-18  0:00             ` Gautier
2000-01-18  0:00           ` Ted Dennison
2000-01-18  0:00         ` Jeff Carter
2000-01-18  0:00           ` Keith Thompson
2000-01-19  0:00             ` Jeff Carter
2000-01-19  0:00               ` David Starner
2000-01-19  0:00               ` Keith Thompson
2000-01-19  0:00             ` Ole-Hjalmar Kristensen
2000-01-19  0:00             ` Gisle S�lensminde
2000-01-18  0:00         ` Pascal Obry
2000-01-21  0:00         ` Ada vs. C/C++ (was re: bitwise something-or-other) Mark Lundquist
2000-01-21  0:00           ` Mark Lundquist
2000-01-24  0:00           ` Hyman Rosen
2000-01-18  0:00     ` bitwise comparators Ted Dennison
2000-01-18  0:00     ` DuckE
2000-01-16  0:00 ` Bryce Bardin
2000-01-16  0:00 ` Jeff Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox