A Discussion of Tuple Syntax

bearophile bearophileHUGS at lycos.com
Mon Aug 19 15:36:32 PDT 2013


ixid:

> auto assoc_array = [1 : (2 : 3)]; // A tuple associative value
> auto assoc_array2 = [(1 : 2) : 3]; // A tuple associative key
>
> auto ternary = value? (1 : 2) : (3 : 4); // tuple values in a 
> ternary operator
>
> It's nicer looking than #().

Are singleton tuples represented with (1:) ?

Bye,
bearophile


More information about the Digitalmars-d mailing list