Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!im4u!oakhill!tomc From: tomc@oakhill.UUCP (Tom Cunningham) Newsgroups: net.lang.c Subject: Expression sequencing query Message-ID: <760@oakhill.UUCP> Date: Fri, 5-Sep-86 18:16:30 EDT Article-I.D.: oakhill.760 Posted: Fri Sep 5 18:16:30 1986 Date-Received: Fri, 5-Sep-86 22:17:24 EDT Organization: Motorola Inc. Austin, Tx Lines: 15 Sorry if this topic has been overly exercised already. In the following code fragment: /* a = b + b + b */ a = ((b=1),b) + ((b=2),b) + ((b=3),b) I expected the result to be 6. With the Microsoft C compiler and the compiler on the Sun 3, the result is 9. Apparently the parenthetical assignments are all getting done before the comma and addition. Any thoughts on thi Tom Cunningham "Good, fast, cheap -- select two." USPS: Motorola Inc. 6501 William Cannon Dr. W. Austin, TX 78735-8598 UUCP: {ihnp4,seismo,ctvax,gatech}!ut-sally!oakhill!tomc Phone: 512-440-2953