(a,b,c) syntax

Timon Gehr timon.gehr at gmx.ch
Wed Jul 11 07:47:22 PDT 2012


On 07/11/2012 02:44 PM, Andrea Fontana wrote:
> Why this code print "five" ?
>
> writeln(("One", 10, "Five"));
>
> What does ( ... , ... , ...) means?
>

, is the comma operator inherited from C.

a,b means: execute a first, then b, and the result is b.


More information about the Digitalmars-d-learn mailing list