Bug 11083 – Whole global matrix initialization

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-09-21T05:34:08Z
Last change time
2020-03-21T03:56:35Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-09-21T05:34:08Z
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 }
Comment #1 by andrej.mitrovich — 2013-09-21T05:54:13Z
(In reply to comment #0) > 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];
Comment #2 by b2.temp — 2019-07-23T00:58:06Z
*** This issue has been marked as a duplicate of issue 8979 ***