From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd45e29f9dafca87 X-Google-Attributes: gid103376,public From: Ole-Hjalmar Kristensen Subject: Re: bitwise comparators Date: 2000/01/19 Message-ID: #1/1 X-Deja-AN: 574609677 Sender: ohk@gong2.clustra.com References: <3880D375.7E363123@hotmail.com> <38829638.0@news.pacifier.com> <3882FC1C.2BA8C959@hotmail.com> <3883821A.CBF69D70@maths.unine.ch> X-Complaints-To: abuse@telia.no X-Trace: news.telia.no 948272615 195.204.160.194 (Wed, 19 Jan 2000 10:03:35 CET) Organization: Telia Internet Public Access NNTP-Posting-Date: Wed, 19 Jan 2000 10:03:35 CET Newsgroups: comp.lang.ada Date: 2000-01-19T00:00:00+00:00 List-Id: Keith Thompson writes: > Gautier 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 > San Diego Supercomputer Center <*> > 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 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