【发布时间】:2011-01-27 23:13:43
【问题描述】:
有什么区别:
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;
【问题讨论】:
-
我原以为
<>是 Delphi 中的替代xor运算符...但很快意识到这只是ABool1 != ABool2,我很傻。
标签: delphi boolean xor inequality