title: Missing Operator or Semicolon error
body: <p>Delphi 7 if it matters.</p>
  
  <pre><code>procedure writeLog ( varName, varValue: string );
  var
    length, i :Integer;
  begin
    Append( logFile );
    ShowMessage (varName);
    For i := Length(varName) to 20 do       //line 37
    begin
       varName := varName + ' ';
    end;
    WriteLn( logFile, varName + ': ' + varValue );
    CloseFile( logFile );
  end;
  </code></pre>
  
  <p>I get the error:</p>
  
  <blockquote>
    <p>[Error] felirat.dpr(37): Missing operator or semicolon</p>
  </blockquote>
  
  <p>All the semicolons seem just fine to me. What am I missing?</p>