Pet*_*ner 2 delphi inequality boolean xor
之间有什么区别:
procedure InequalityMsg(ABool1, ABool2 : Boolean);
begin
if ABool1 <> ABool2 then
ShowMessage('Yeah, they''re not the same');
end;
Run Code Online (Sandbox Code Playgroud)
和
procedure InequalityMsg(ABool1, ABool2 : Boolean);
begin
if ABool1 XOR ABool2 then
ShowMessage('Yeah, they''re not the same');
end;
Run Code Online (Sandbox Code Playgroud)
不,他们完全一样.(好吧,生成的代码可能会有所不同,但行为永远不会显示出任何差异.而且,随着性能的提高,这个问题非常不重要.)
归档时间: |
|
查看次数: |
1794 次 |
最近记录: |