سؤال

Is there any difference between :

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

and

procedure InequalityMsg(ABool1, ABool2 : Boolean);
begin
  if ABool1 XOR ABool2 then
    ShowMessage('Yeah, they''re not the same');
end;
هل كانت مفيدة؟

المحلول

No, they are exactly the same. (Well, the generated code might differ, but the behaviour will never show any difference. And, as performance goes, this question is very unimportant.)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top