title: Why we cannot declare local const variables in inno-setup [Code]?
body: <p>Do you know why when declaring <b>local const vars</b>, the script cannot compile?
  Sorry, I know very little pascal and cannot figure out why this is not working!</p>
  
  <p>This example (see <b><i>function CircleArea</i></b>) shows that my syntax should be fine.
  <a href="http://www.tutorialspoint.com/pascal/pascal_quick_guide.htm" rel="noreferrer">http://www.tutorialspoint.com/pascal/pascal_quick_guide.htm</a></p>
  
  <p>This is what I am trying to do:</p>
  
  <pre><code>//---placed within [Code]
  procedure MyLog(const _functionName, _msg: String);
  begin
    Log(_functionName + '(): ' + _msg);
  end;
  
  function MyExec(const _filename, _params, _dir: String): Boolean;
  const // &lt;--- compilation fails in this line!
    MethodName = 'MyExec';
  var
    ResultCode: Integer;
  begin
    MyLog(MethodName, _filename);
    // ... invoke Exec(), etc. ...
  end;
  //---
  </code></pre>