www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11083] New: Whole global matrix initialization

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11083

           Summary: Whole global matrix initialization
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc



I am not sure if this is an enhancement request, but I'd like to initialized
the whole module-level 'a' to a given value:


double[2][2] a = 0.0; // error
void main() {
    double[2][2] b = 0.0; // OK
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 21 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11083


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



05:54:13 PDT ---

 double[2][2] a = 0.0; // error
I think it's actually just a bug that it's not accepted. Workaround: double[2][2] a = [0.0]; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 21 2013