Path: utzoo!attcan!uunet!mcvax!ukc!warwick!maujt From: maujt@warwick.ac.uk (Richard J Cox) Newsgroups: comp.lang.c Subject: Re: Suggested new C loop syntax (was `if (a = b)') Message-ID: <75@poppy.warwick.ac.uk> Date: 10 Jan 89 13:24:12 GMT References: <5@rsoft.UUCP> <1071@goofy.megatest.UUCP> <861@quintus.UUCP> <3049@arcturus> <2485@ficc.uu.net> <264@twwells.uucp> Reply-To: maujt@warwick.ac.uk (Richard J Cox) Organization: Computing Services, Warwick University, UK Lines: 34 In article <264@twwells.uucp> bill@twwells.UUCP (T. William Wells) writes: (stuff deleted) > > 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. > >I'll stick to using a break. > >--- >Bill >{uunet|novavax}!proxftl!twwells!bill This is exactly the same as: for(expr; expr; expr); statment which every C programmer has to be able to spot anyway - so whats the problem? - RC /*--------------------------------------------------------------------------*/ JANET: maujt@uk.ac.warwick.cu BITNET: maujt%uk.ac.warwick.cu@UKACRL ARPA: maujt@cu.warwick.ac.uk UUCP: maujt%cu.warwick.ac.uk@ukc.uucp Richard Cox, 84 St. Georges Rd, Coventry, CV1 2DL; UK PHONE: (0203) 520995