Little quiz
Jacob Carlborg
doob at me.com
Fri Mar 25 08:21:03 PDT 2011
On 2011-03-25 12:32, bearophile wrote:
> Jacob Carlborg:
>
>> I would guess it prints the values of all the fields in the struct
>> returned by "tuple".
>
> That was of course my purpose, because tuples are a way to implement multiple return values, and in some situations I want to print all the items of such return tuple, on separated lines, for debugging purposes, etc. But unfortunately (for me too) that's not the right answer. Try again... I have found a little surprise.
>
> Bye,
> bearophile
I'm not just meaning the expected values you pass in to the function,
I'm also referring to any additional fields that might be present in the
struct.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list