这两种方式有什么区别:
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
,我真傻。 - undefined