for i:=1 to n do
begin
  ..
  x:=i;
  if x=100 then break;
  ..
end;
以上是退出循环,不过你说是程序中断不知是什么意思?如果程序中断的话,用
application.terminate;可能拼写有错,你查一下TApplicaton对象。

解决方案 »

  1.   

    ...
    x:=i;
    if x=100 then break;(退出for循环)
                  exit;(退出过程)
                  close;(关闭窗体,如果是主窗体,就关闭程序)
                  application.terminate;(彻底关闭程序)
      

  2.   

    在该处设置断点,
    然后在那个红点上点击右键,选择BreakPoint Properties...
    在弹出的对话框中的Condition输入x=100 。
      

  3.   

    哇塞,我看错了,wingsun 说的是你要的吧