Should the comma operator be removed in D2?

Ellery Newcomer ellery-newcomer at utulsa.edu
Mon Nov 16 15:00:56 PST 2009


Adam D. Ruppe wrote:
> On Mon, Nov 16, 2009 at 10:12:57PM +0000, dsimcha wrote:
>> Can someone please explain to me what the comma operator does? 
> 
> 	a = b, c;
> 
> Is the same as:
> 
> 	b;
> 	a = c;
> 

wrong. assignment has higher precedence than comma.

change the first to

	a = (b, c);

or the second to

	a = b;
	c;



More information about the Digitalmars-d mailing list