Xref: utzoo comp.lang.c:38053 comp.std.c:4635 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!unmvax!bbx!bbxsda!scott From: scott@bbxsda.UUCP (Scott Amspoker) Newsgroups: comp.lang.c,comp.std.c Subject: Re: difference between c++; and ++c; Keywords: pre post increment decrement grammar style Message-ID: <1817@bbxsda.UUCP> Date: 8 Apr 91 19:14:02 GMT References: <1991Apr08.161444.10025@cs.ruu.nl> Reply-To: scott@bbxsda.UUCP (Scott Amspoker) Organization: Basis International, Albuquerque, NM Lines: 21 In article <1991Apr08.161444.10025@cs.ruu.nl> hnridder@cs.ruu.nl (Ernst de Ridder) writes: > 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? Apart from personal preference - none. Some people (like myself) prefer the first form (++c) because the second form (c++) *implies* preserving the current value of c prior to incrementing. Sure, that really doesn't happen but you know how wierd programmers can be. -- Scott Amspoker | Touch the peripheral convex of every Basis International, Albuquerque, NM | kind, then various kinds of blaming (505) 345-5232 | sound can be sent forth. unmvax.cs.unm.edu!bbx!bbxsda!scott | - Instructions for a little box that | blurts out obscenities.