title: How to initialize array in Pascal using type?
body: <p>For the sake of fun, I'd like to refresh my Pascal knowledge, so gotta review the basics again.</p>
  <p>Let's see this Java code:</p>
  <pre><code>class ArrayTest {
  
      public static void main(String args[]){
          int[] numArray = new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
      }
  }
  </code></pre>
  <p>Rewrite that into Pascal:</p>
  <pre><code>type
      arrNum = array[1..10] of integer;
  var
      BBB: arrNum;
  
  begin
      BBB := [1,2,3,4,5,6,7,8,8,10];
  end.
  </code></pre>
  <p>Compiling the code with FPC 3.2.2 on MacOS, the result is:</p>
  <blockquote>
  <p>arrnum.pas(7,12) Error: Incompatible types: got &quot;{Array Of Const/Constant Open} Array &gt; of ShortInt&quot; expected &quot;arrNum&quot;</p>
  <p>arrnum.pas(10) Fatal: There were 1 errors compiling module, stopping</p>
  <p>Fatal: Compilation aborted Error: /usr/local/bin/ppcx64 returned an
  error exitcode</p>
  </blockquote>
  <p>What's wrong here?</p>