Re: function returning a tuple

2016-04-08 Thread jmh530 via Digitalmars-d-learn
On Friday, 8 April 2016 at 20:58:46 UTC, Ali Çehreli wrote: And yes, functions can return tuples: :) I was getting that same error recently, but I forgot what was causing it. He mentions AliasSeq above, could the error be referring to compile time argument lists?

Re: function returning a tuple

2016-04-08 Thread Ali Çehreli via Digitalmars-d-learn
On 04/08/2016 01:53 PM, WhatMeWorry wrote: This might be a very simple fix, but I've been fighting this for more hours than I care to admit to. std.typecons says "Tuple of values, for example Tuple!(int, string) is a record that stores an int and a string. Tuple can be used to bundle values to

function returning a tuple

2016-04-08 Thread WhatMeWorry via Digitalmars-d-learn
This might be a very simple fix, but I've been fighting this for more hours than I care to admit to. std.typecons says "Tuple of values, for example Tuple!(int, string) is a record that stores an int and a string. Tuple can be used to bundle values together, notably when returning multiple

Re: Returning a tuple

2012-04-27 Thread Joseph Rushton Wakeling
On 27/04/12 15:40, Simen Kjaeraas wrote: std.typecons has a type called Tuple, which is probably what you want: ... ! Can't believe I missed that. Works perfectly, thanks so much! :-)

Re: Returning a tuple

2012-04-27 Thread Simen Kjaeraas
On Fri, 27 Apr 2012 14:52:08 +0200, Joseph Rushton Wakeling wrote: Hello all, Just recently I tried returning a Tuple from a function and received an error message about this not being allowed. Reading up a bit on the D site I'm not clear -- is it a determined policy for the lan

Returning a tuple

2012-04-27 Thread Joseph Rushton Wakeling
Hello all, Just recently I tried returning a Tuple from a function and received an error message about this not being allowed. Reading up a bit on the D site I'm not clear -- is it a determined policy for the language that it's not possible to return a tuple, or is it just somet