title: Why Pascal const arrays aren't actually constants?
body: <pre><code>  Program ConstTest;
    Const constVar = 1;
    Begin
      constVar := 3;
      WriteLn(constVar);
    End.
  </code></pre>
  
  <p>It's pretty obvious that the above code will not compile, because it's not right to change the value of a constant.
  However, following code will compile, and will return "1; 5; 3;", even though the array is a const:</p>
  
  <pre><code>Program ConstTest;
    Const constArr:Array [1..3] Of ShortInt = (1,2,3);
    Var i:ShortInt;
    Begin
      constArr[2] := 5;
      For i:=1 To 3 Do WriteLn(constArr[i],'; ');
    End.
  </code></pre>
  
  <p>So, what causes this behavior? Why a constant isn't actually a constant?</p>
  
  <p>I'm using FreePascal Compiler 2.2.0 for Win32.</p>