开发者

Beanshell XOR throwing error

When I try to use the xor operator:

if(a ^ b)
开发者_开发知识库

I get the following error:

internal Error: unimplemented binary operator

Is there another way to do it in beanshell, or should I just do:

if((a && !b) || (!a && b))


if(a != b) is equivalent to XOR (a ^ b) for booleans.


In Beanshell2 the xor operator is implemented, see http://code.google.com/p/beanshell2

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜