title: How do I initialise a global array of structs in D?
body: <p>In aid of my one-man quest to populate SO with D questions (=p), I've run into another problem; initialising an array of structs globally. Observe:</p>
  
  <pre><code>struct A
  {
      int a;
      float b;
  }
  
  A[2] as;
  as[0] = {0, 0.0f};
  as[1] = {5, 5.2f};
  
  void main() {}
  </code></pre>
  
  <p>Results in:</p>
  
  <pre><code>$ dmd wtf.d 
  wtf.d(8): no identifier for declarator as[0]
  wtf.d(9): no identifier for declarator as[1]
  </code></pre>
  
  <p>Looking through the docs at <a href="http://www.digitalmars.com/d" rel="nofollow noreferrer">Digital Mars</a>, I can't really see anything entirely obvious to me, so I turn once more to the brave denizens of Stack Overflow! I'm guessing the error message doesn't have much to do with the real problem, as surely as[0] <em>is</em> an identifier (but <code>dmd</code> thinks it's a declarator, which AFAICT looking over the <a href="http://www.digitalmars.com/d" rel="nofollow noreferrer">docs</a>, it isn't)?</p>