On Sun, 30 Oct 2011 03:39:57 +0300, Mehrdad <wfunct...@hotmail.com> wrote:

I tried converting some C code I found on the internet to D.

Reduced version:

import std.stdio;

static double[1][] f()
{
    auto array = new double[1][2];
    array[0][0] = 1;
    return array;
}

void main()
{
    const result = f();
    pragma(msg, result); // [[1],[1]]
    writeln(result);     // [[1], [nan]]
}

I don't know what's going on here.

--
Best regards,
 Vladimir                            mailto:vladi...@thecybershadow.net

Reply via email to