Path: utzoo!attcan!uunet!husc6!bloom-beacon!athena.mit.edu!jfc From: jfc@athena.mit.edu (John F Carr) Newsgroups: comp.lang.c Subject: Re: Suggested new C loop syntax Message-ID: <8558@bloom-beacon.MIT.EDU> Date: 23 Dec 88 08:04:00 GMT References: <5@rsoft.UUCP> <264@twwells.uucp> Sender: root@bloom-beacon.MIT.EDU Reply-To: jfc@athena.mit.edu (John F Carr) Organization: Massachusetts Institute of Technology Lines: 29 In article <264@twwells.uucp> bill@twwells.UUCP (T. William Wells) writes: >This is a bad syntax. > do > statement > while (expr); > statement > >See the difference? Well, in case you didn't, it is the semicolon at >the end of the while expression. This is damned hard to spot and does >not lead to a syntax error. Do you never use loops in C? If you do, you are vulnerable to the same mistake regardless of which variety you use. while(expr); statement and for(;;); are legal under the current C standard. I do not see how the proposed extension creates any new potential for failure. -- John Carr "When they turn the pages of history, jfc@Athena.mit.edu When these days have passed long ago, bloom-beacon! Will they read of us with sadness athena.mit.edu!jfc For the seeds that we let grow?" --Neil Peart