Path: utzoo!attcan!uunet!ns-mx!iowasp!deimos.cis.ksu.edu!ux1.cso.uiuc.edu!uwm.edu!uwvax!daffy!cat9.cs.wisc.edu!schaut From: schaut@cat9.cs.wisc.edu (Rick Schaut) Newsgroups: comp.lang.c Subject: Re: do...while vs. repeat...until (was: Errors aren't that simple) Message-ID: <4543@daffy.cs.wisc.edu> Date: 28 Mar 90 13:36:04 GMT References: Sender: news@daffy.cs.wisc.edu Organization: U of Wisconsin CS Dept Lines: 24 In article night@pawl.rpi.edu (Trip Martin) writes: | An interesting note that might give some perspective to this issue is how | Plus, a little-known language that I'm somewhat familiar with, handles loops. | Instead of having both while and do..while forms of loops, it uses one form | called cycle. Cycle is an infinite loop. You can then stick exit statements | anywhere in the loop (and then can be conditional, with both flavors of tests | supported). Conceptually, it's a more general way of handling loops. 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; } or have I missed something here? -- Rick (schaut@garfield.cs.wisc.edu) "I'm a theory geek; we use Turing machines!"--Gary Lewandowski