Path: utzoo!mnetor!uunet!husc6!sri-unix!quintus!sun!decwrl!pyramid!prls!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: comp.lang.c Subject: Re: Why NULL is 0 Message-ID: <2771@mmintl.UUCP> Date: 17 Mar 88 15:46:18 GMT References: <10576@mimsy.UUCP> <124@polygen.UUCP> <800@zippy.eecs.umich.edu> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Ashton-Tate Corporation, East Hartford Development Center Lines: 17 In article <800@zippy.eecs.umich.edu> janc@palam.eecs.umich.edu (Jan Wolter) writes: >As I read K&R, a null pointer is only produced when a *constant* 0 is assigned >to a pointer. When an integer is assigned to a zero, K&R seems to suggest >that a bitwise copy is done, which may not be the same thing at all. This >seems to be the only case in C where "a=(b=c)" is not equivalent to "a=c,b=c". It isn't. Try: double d; int i; d = (i = 1.5); In general, "a=(b=c)" is eqivalent to "b=c,a=b". -- Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Ashton-Tate 52 Oakland Ave North E. Hartford, CT 06108