[Issue 1869] Semantically returning an array from a funciton is	difficult
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Feb 26 02:26:03 PST 2008
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=1869
------- Comment #14 from jason at spashett.com  2008-02-26 04:26 -------
Thanks for the comments, it's more or less as I suspected. The ways of
returning an arrays pointed out by Janice Caron and others seem to feel like a
'workaround' to me.
I don't quite understand why the code below does not (or cannot work). The pass
by reference semantics of arrays don't have to apply for function return do
they? It might create a special case though I suppose.
int[4][4] f()
{
    int a[4][4];
    return a;
}
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list