Should the comma operator be removed in D2?

Stewart Gordon smjg_1998 at yahoo.com
Mon Nov 16 15:06:28 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;
<snip>

Wrong:

Expression:
	AssignExpression
	AssignExpression , Expression

So it's the same as

     a = b;
     c;

Stewart.



More information about the Digitalmars-d mailing list