Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!andrew.cmu.edu!bader+ From: bader+@andrew.cmu.edu (Miles Bader) Newsgroups: comp.lang.c Subject: Re: do...while vs. repeat...until (was: Errors aren't that simple) Message-ID: Date: 28 Mar 90 19:59:37 GMT References: , <4543@daffy.cs.wisc.edu> Organization: Information Technology Center, Carnegie Mellon, Pittsburgh, PA Lines: 23 In-Reply-To: <4543@daffy.cs.wisc.edu> schaut@cat9.cs.wisc.edu (Rick Schaut) writes: > This is the second request I've seen for a loop construct that allows an > exit from anywhere in the loop. Is there something drastically wrong with: > > for(;;) { > > if (expr) > break; > > } You could always extend the syntax of the do-while statement: do while ( ) of which the existing do-while is a special case. And just THINK of all the new uncaught errors when someone forgets a semi-colon after a normal do-while! -Miles