Hello folks -

We noticed something weird today, and was hopeing that someone here might be 
able to explain it for us a bit.. Here's the rule we had:

eval( -1 < 0 or
8 > 1 or
182 < 0 or
0 == 0);

This was failing, but doesn't it seem like it should work? To get it to work, 
we tried this:

eval( (-1 < 0) or
(8 > 1) or
(182 < 0) or
(0 == 0));

... but that didn't compile. We then tried this (and it worked!):

eval( (-1 < 0) ||
(8 > 1) ||
(182 < 0) ||
(0 == 0));

So, my question is simply - why? What's the difference between "or" and || - 
and when should we use them?

Thanks for your time!

Matthew Runo
Software Engineer, Zappos.com
[email protected] - 702-943-7833


_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to