title: How do I declare a list of fixed length in specman?
body: <p>In E (specman) I want to declare variables that are lists, and I want to fix their lengths.</p>
  
  <p>It's easy to do for a member of a struct:</p>
  
  <pre><code>thread[2] : list of thread_t;
  </code></pre>
  
  <p>while for a "regular" variable in a function the above doesn't work, and I have to do something like:</p>
  
  <pre><code>var warned : list of bool;
  gen warned keeping {
      it.size() == 5;
  };
  </code></pre>
  
  <p>Is there a better way to declare a list of fixed size?</p>