Hi Wolfgang 

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...".

Anyway thanks for confirming that there is no difference other than coding style.

Regards

Iftikhar 

On Wednesday, 19 June 2013, Wolfgang Laun wrote:
On 19/06/2013, droolster <quant.coder@gmail.com> wrote:
> Hello,
>
> I saw the following in the "Design Patterns for PRS system" pdf and could
> not understand the difference between the two statements (they look the
> same
> to me). Please can the community clarify what the difference is:

Just count the keystrokes :-) Probably easier to read, too.
-W

>
> A multiple choice could be written using the same syntactic form, e.g.,
>
> Type( strField == "Huey" || == "Dewey" || == "Louie" )
>
> but if you are testing for equality, the MultiValueRestriction is to be
> preferred, so that the preceding
> pattern is better written as
>
> Type( strField in ( "Huey", "Dewey", "Louie" ) )
>
> Thank you,
>
> Iftikhar
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/MultiValueRestriction-tp4024384.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


--
Sent from Gmail Mobile