Xref: utzoo comp.lang.c:38055 comp.std.c:4636 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!mcdphx!behemoth!razdan From: razdan@phx.mcd.mot.com (Anshuman Razdan) Newsgroups: comp.lang.c,comp.std.c Subject: Re: difference between c++; and ++c; Message-ID: Date: 8 Apr 91 17:05:55 GMT References: <1991Apr08.161444.10025@cs.ruu.nl> Sender: news@mcdphx.phx.mcd.mot.com Followup-To: comp.lang.c Organization: Motorola MCD Lines: 43 In-reply-to: hnridder@cs.ruu.nl's message of 8 Apr 91 16:14:44 GMT In article <1991Apr08.161444.10025@cs.ruu.nl> hnridder@cs.ruu.nl (Ernst de Ridder) writes: Path: mcdphx!asuvax!cs.utexas.edu!uunet!mcsun!hp4nl!alchemy!hnridder From: hnridder@cs.ruu.nl (Ernst de Ridder) Newsgroups: comp.lang.c,comp.std.c Summary: Why write ++c; instead of c++ I once read (I'm not sure where, but I believe it was in the C++ programming language) that some C-programmers argue that ++c is neater than c++. (In situations where the side-effect doesn't matter). So they write (just as an illustration) while ( c < 100) ++c; instead of while ( c < 100) c++; Why should one of these forms be preferred over the other in such a situation, apart from personal preferences? Ernst de Ridder ------------------------- ------------------------- I believe the difference would be seen if it were .. while(++c < 100) .....; vs while(c++ < 100) .....; Rest is personal preference. -- Anshuman Razdan ************************************************************ * razdan@toy Test and Methodology Group * * * * razdan@phx.mcd.mot.com Diablo Plant, Tempe Az * ************************************************************