有什么区别:

procedure InequalityMsg(ABool1, ABool2 : Boolean);
begin
  if ABool1 <> ABool2 then
    ShowMessage('Yeah, they''re not the same');
end;

procedure InequalityMsg(ABool1, ABool2 : Boolean);
begin
  if ABool1 XOR ABool2 then
    ShowMessage('Yeah, they''re not the same');
end;
有帮助吗?

解决方案

不,他们完全一样。 (嗯,生成的代码可能会有所不同,但是行为永远不会显示任何差异。而且,随着绩效的发展,这个问题非常不重要。)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top