Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!necntc!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!cae780!tektronix!tekcrl!tekfdi!bobb From: bobb@tekfdi.TEK.COM (Robert Bales) Newsgroups: comp.sys.amiga Subject: Re: Manx C Message-ID: <1207@tekfdi.TEK.COM> Date: Wed, 31-Dec-69 18:59:59 EDT Article-I.D.: tekfdi.1207 Posted: Wed Dec 31 18:59:59 1969 Date-Received: Tue, 11-Aug-87 05:46:55 EDT References: <4540@jade.BERKELEY.EDU> <1836@vax135.UUCP> <4595@jade.BERKELEY.EDU> <3199@zen.berkeley.edu> <17827@amdcad.AMD.COM> <3211@zen.berkeley.edu> Reply-To: bobb@tekfdi.UUCP (Robert Bales) Distribution: comp Organization: Tektronix, Inc., Beaverton, OR. Lines: 19 Keywords: look at the assembly. In article <3211@zen.berkeley.edu> waterman@cory.Berkeley.EDU.UUCP (T.S. Alan Waterman) writes: > What I don't get is this-- (!ptr) seems more straightforward, > you never have to worry about types, and it makes smaller code > than (ptr == 0) anyway. Why use the second expression? (with > pointers, at least.) Speaking just for myself: :) What does "if (!ptr)" mean? (rhetorical question) As we all know, it means the same as "if (ptr == 0)" However, interpreting the first form requires knowledge that the C "if" statement compares against 0, while the second form makes the desired test explicit and is, therefore -- I feel -- clearer. Bob Bales Tektronix, Inc. I help Tektronix make their instruments. They don't help me make my opinions.