how has C bitten you? (Really,

darryl at ISM780.UUCP darryl at ISM780.UUCP
Thu Aug 29 22:48:00 AEST 1985


[]

One final, subtle, point.  K&R does not guarantee that the *value* 0 is
distinguishable from all other pointers, but rather, that the *constant* 0
is.  That is to say, you may compare against 0 to determine the validity of
a pointer (or assign to guarantee invalidity), but you may not assume that
comparison against (or assignment of) an int variable whose value is 0 will
have the same result.  This picky distinction probably doesn't affect any
of the better known chips, but might be important on a machine where a null
pointer is not a bit string of 0s.

	    --Darryl Richman, INTERACTIVE Systems Corp.
	    ...!cca!ima!ism780!darryl
	    The views expressed above are my opinions only.

P.S.:  I know that this sounds amazing, so look at the top of K&R p190,
under the section 7.7, equality operators (second paragraph), and again
on top of p192, section 7.14, assignment operators.



More information about the Comp.lang.c mailing list