title: In Delphi 7, why can I assign a value to a const?
body: <p>I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this:</p>
  
  <pre><code>procedure TForm1.CalculateGP(..)
  const
     Price : money = 0;
  begin
     ...
     Price := 1.0;
     ...
  end;
  </code></pre>
  
  <p>So in the new project, Delphi complains that "left side cannot be assigned to" - understandable! But this code compiles in the old project. So my question is, <strong>why</strong>? Is there a compiler switch to allow consts to be reassigned? How does that even work? I thought consts were replaced by their values at compile time?</p>