title: Loading StringGrid from text file
body: <p>How can I load text file with integer numbers separated with space to StringGrid? Each number to each cell. Grid has to be a rectangle, so if some number is missing it should be filled with 0.</p>
  
  <p>Here's what I did so far, but it need to have already set row and column count. </p>
  
  <pre><code>  while not eof(f) do
    begin
      while not eoln(f) do
      begin
        read(f, data);
        StringGrid1.Cells[p, l] := data;
        inc(p);
      end;
      p := 0;
      readln(f);
      inc(l);
    end;
  </code></pre>