Domanda

C'è qualche differenza tra:

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

e

procedure InequalityMsg(ABool1, ABool2 : Boolean);
begin
  if ABool1 XOR ABool2 then
    ShowMessage('Yeah, they''re not the same');
end;
È stato utile?

Soluzione

No, sono esattamente gli stessi. (Beh, il codice generato potrebbe differire, ma il comportamento non mostrerà mai alcuna differenza. E, le prestazioni va, questa domanda è molto importante.)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top