开发者

How to do boolean exclusive or?

Apparently there is no boolean version of the bitwise exclusive开发者_运维百科-or operator (^^^)... what to do?


This is provided by the not-equal operator <>.


let inline xor a b = (a || b) && not (a && b)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜