comma operator

Andrew Koenig ark at alice.UUCP
Sat Aug 5 07:21:54 AEST 1989


In article <2135 at zaphod.axion.bt.co.uk>, skilbane at zaphod.axion.bt.co.uk (Steven Kilbane) writes:

> Personally, I think it is worse that {;}. If you have something of the form

> 	x = Expr1 , Expr2;

> then Expr2 will be assigned to x, rather than Expr1.

Nope.  = binds more tightly than , so

	x = Expr1 , Expr2;

means the same as

	(x = Expr1) , Expr2;
-- 
				--Andrew Koenig
				  ark at europa.att.com



More information about the Comp.lang.c mailing list