Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site luke.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!oliveb!bene!luke!itkin From: itkin@luke.UUCP (Steven List) Newsgroups: net.lang.c Subject: Re: Use of i++; Re: C programming style Message-ID: <284@luke.UUCP> Date: Sat, 20-Jul-85 15:30:43 EDT Article-I.D.: luke.284 Posted: Sat Jul 20 15:30:43 1985 Date-Received: Mon, 22-Jul-85 08:24:39 EDT References: <11434@brl-tgr.ARPA> <508@oliveb.UUCP> Reply-To: itkin@luke.UUCP (Steven List) Organization: Benetics Corp, Mt.View, CA Lines: 30 Summary: Having read through much of the recent discussion, I'm amused by one omission: ++i (and it's relatives)! The original poster (at least I think it was the original) suggests a function (or macro) "increment(i)". The function/macro approach does not deal with the sequence of events. The nominal case of incrementing a variable in a simple expression i++; is trivial. How about in a loop: char buf[80]; char *cp = buf; /* always leave the first character alone */ while (*(++cp)); searching for the first NUL in a string. This is not necessarily a useful example, but does demonstrate the case. How do you use the function/macro? It requires more statements and is not as clear, to me. I've been told that I write/understand cryptic C. This is not cryptic to me. It is concise and clear. What's the objection to using the language as designed? Why NOT use features? -- *** * Steven List @ Benetics Corporation, Mt. View, CA * Just part of the stock at "Uncle Bene's Farm" * {cdp,greipa,idi,oliveb,sun,tolerant}!bene!luke!itkin ***