July 11, 2012 (a,b,c) syntax | ||||
---|---|---|---|---|
| ||||
Attachments:
| Why this code print "five" ? writeln(("One", 10, "Five")); What does ( ... , ... , ...) means? |
July 11, 2012 Re: (a,b,c) syntax | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrea Fontana | 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.
|
Copyright © 1999-2021 by the D Language Foundation