title: SIGFPE Error, Why?
body: <p>I have the following code:</p>
  
  <pre><code>procedure TForm1.FormCreate(Sender: TObject);
  var
    cpic: tcomponent;
    whichcol: integer; // have tried extended types
    whichrow: integer; // have tried extended types
  begin
    for cpic in form1 do
    begin
      if (cpic.ClassType = timage) and (cpic.Tag = 10) then
      begin
        whichcol := timage(cpic).left - left div gap;
        whichrow := timage(cpic).Top - top div gap;
      end;
    end;
  end;
  </code></pre>
  
  <p>This results in the following error:</p>
  
  <blockquote>
    <p>Error</p>
    
    <p>Project project1.exe raised exception class 'External: SIGFPE'.</p>
  </blockquote>
  
  <p>With: as the outlined error:</p>
  
  <pre><code>whichcol := (timage(cpic).left - left) div gap;
  </code></pre>
  
  <p>Should the equation not just return a number value?</p>