While (not tbClients.eof) or Printer.Aborted do
begin
...
end;这个程序是《Delphi5开发人员指南》里面一个程序中的一部分程序段,
书上提示“在While not Table.eof循环中不断检查Printer.Aborted的值是否True,当为True时,程序从正在执行的打印过程中退出。”但我觉得上面这个程序中的条件设置是否有问题?好像在没有到数据表尾话,就是Printer.Aborted为任何值,程序也不会从打印过程中退出.请问上面这段小程序中,
1、在(not tbClients.eof)=true时,如果Printer.Aborted为True的时,会执行循环吗?(应该会吧)如果Printer.Aborted为False时,会执行循环吗?(也会吧)
2、在((not tbClients.eof)=false时,如果Printer.Aborted为True的时,会执行循环吗?(应该会吧)如果Printer.Aborted为False时,会执行循环吗?(这时就不会了吧)
------------
未到数据表尾 Printer.Aborted(是否中止?) 执行循环体
True True True (*)
True False True
False True True (*)
False False False
好像是有点问题.....应该写成 While (not Table.eof) and not Printer.Aborted do
...
或 While not (Table.eof or Printer.Aborted) do ....如果 Printer.Aborted 表示"中止打印" 的话