Hi Wolfgang <div><br></div><div>My question was more about if the second way of writing was more preferred because of some solid technical reason rather than just a matter of syntax; that's how I interpreted the text as it makes the conditional statement "but if you are testing for equality...".</div>
<div><br></div><div>Anyway thanks for confirming that there is no difference other than coding style.<span></span></div><div><br></div><div>Regards</div><div><br></div><div>Iftikhar <br><br>On Wednesday, 19 June 2013, Wolfgang Laun wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 19/06/2013, droolster <<a href="javascript:;" onclick="_e(event, 'cvml', 'quant.coder@gmail.com')">quant.coder@gmail.com</a>> wrote:<br>
> Hello,<br>
><br>
> I saw the following in the "Design Patterns for PRS system" pdf and could<br>
> not understand the difference between the two statements (they look the<br>
> same<br>
> to me). Please can the community clarify what the difference is:<br>
<br>
Just count the keystrokes :-) Probably easier to read, too.<br>
-W<br>
<br>
><br>
> A multiple choice could be written using the same syntactic form, e.g.,<br>
><br>
> Type( strField == "Huey" || == "Dewey" || == "Louie" )<br>
><br>
> but if you are testing for equality, the MultiValueRestriction is to be<br>
> preferred, so that the preceding<br>
> pattern is better written as<br>
><br>
> Type( strField in ( "Huey", "Dewey", "Louie" ) )<br>
><br>
> Thank you,<br>
><br>
> Iftikhar<br>
><br>
><br>
><br>
> --<br>
> View this message in context:<br>
> <a href="http://drools.46999.n3.nabble.com/MultiValueRestriction-tp4024384.html" target="_blank">http://drools.46999.n3.nabble.com/MultiValueRestriction-tp4024384.html</a><br>
> Sent from the Drools: User forum mailing list archive at Nabble.com.<br>
> _______________________________________________<br>
> rules-users mailing list<br>
> <a href="javascript:;" onclick="_e(event, 'cvml', 'rules-users@lists.jboss.org')">rules-users@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
><br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'rules-users@lists.jboss.org')">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br><br>-- <br>Sent from Gmail Mobile<br>