Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond!diamond From: diamond@diamond.csl.sony.junet (Norman Diamond) Newsgroups: comp.lang.c Subject: Re: comma operator: keep away? Message-ID: <10187@socslgw.csl.sony.JUNET> Date: 26 Apr 89 03:45:13 GMT References: <19913@iuvax.cs.indiana.edu> <10092@smoke.BRL.MIL> <19926@iuvax.cs.indiana.edu> <8284@chinet.chi.il.us> Sender: news@csl.sony.JUNET Reply-To: diamond@csl.sony.junet (Norman Diamond) Organization: /usr/lib/news/organization Lines: 26 In article <19926@iuvax.cs.indiana.edu> bobmon@iuvax.cs.indiana.edu (RAMontante) writes: >>>>Is there a circumstance in which the comma operator is required, where >>>>the compound statement cannot be broken into multiple statements? >>> >>I said "required", not "useful". In article <8284@chinet.chi.il.us> les@chinet.chi.il.us (Leslie Mikesell) writes: >How about the more common: > >for (x=0, y=0; x <100 ; x++, y++) { > stuff ... >} > >Of course this could also be done other ways - the only thing "required" >in a programming language is an assignment and a test-and-branch operator. >The rest is merely "useful". Why two operators? The sole required operator is "subtract, assign, and branch if negative." Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.jp@relay.cs.net) The above opinions are my own. | Why are programmers criticized for If they're also your opinions, | re-inventing the wheel, when car you're infringing my copyright. | manufacturers are praised for it?