Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!lcc.dan@UCLA-LOCUS.ARPA From: lcc.dan@UCLA-LOCUS.ARPA (Dan McMullen) Newsgroups: net.lang.c Subject: increment operator Message-ID: <11536@brl-tgr.ARPA> Date: Fri, 12-Jul-85 16:32:31 EDT Article-I.D.: brl-tgr.11536 Posted: Fri Jul 12 16:32:31 1985 Date-Received: Sat, 13-Jul-85 16:58:24 EDT Sender: news@brl-tgr.ARPA Lines: 21 having perused the discussion of 'i++' vs. 'i = i + 1' for a few weeks now, i am reminded a little of the Light Beer commercial - 'Tastes great!' vs. 'Less Filling'. at any rate, to throw a new (or maybe old) worm on the pile, consider the operation of incrementing a pointer: int *ip; ip++; vs. ip = ip + 1; this may be a case where the '++' construct is clearer. any comments? for myself, the '++' construct in general is more *intuitive* than the altern- ative. it denotes a *single* operation, whether on an interger or a pointer, whereas 'i = i + 1' denotes two (or three if fetching the value of 'i' is included. this is a beneficial economy of thought as i read a program. what is intuitive for me, however, may not be as intuitive for others, and the discussion goes on. thanks to all who contribute. the exchange is both enjoy- able and instructive for me. dan