Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!pwa-b!mmintl!franka From: franka@mmintl.UUCP (Frank Adams) Newsgroups: net.lang Subject: Re: Re: Multiple assignments Message-ID: <1516@mmintl.UUCP> Date: Fri, 30-May-86 09:38:38 EDT Article-I.D.: mmintl.1516 Posted: Fri May 30 09:38:38 1986 Date-Received: Sun, 1-Jun-86 08:35:01 EDT References: <1455@mmintl.UUCP> <825@bentley.UUCP> <1482@mmintl.UUCP> <201@cdx39.UUCP> <2846@utcsri.UUCP> Reply-To: franka@mmintl.UUCP (Frank Adams) Organization: Multimate International, E. Hartford, CT Lines: 26 In article <2846@utcsri.UUCP> greg@utcsri.UUCP (Gregory Smith) writes: >It becomes the same as > x = 0; > y = x; /* actually y=(double)x */ > >Are you suggesting that given (x,y)=0; it will be easier for a compiler >to detect the incompatibility and generate > x = 0; > y = 0.0; ???? >I don't really think so. Yes, because "(x,y)=0;" is equivalent to "x=0; y=0;", unlike "x=y=0", which as you note is equivalent to "y=0; x=y;". On the flip side, a naive compiler will generate less efficient code for something like: int i, j; float a; (i,j)=a; than it would when the last line is "i=j=a"; it will do the float to int conversion twice. Frank Adams ihnp4!philabs!pwa-b!mmintl!franka Multimate International 52 Oakland Ave North E. Hartford, CT 06108