<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>single equal sign, must be double:</div><div><blockquote type="cite"><b><pre>attrA = "foo"</pre></b></blockquote><div><br></div></div><div><br></div><br><div><div>On 22 Oct 2012, at 20:44, Cotton.Ben <<a href="mailto:ben.d.cotton.iii@gmail.com">ben.d.cotton.iii@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi,
I am a DROOLS newbie. I apologize if this has been asked before.
This rule (R1) is not syntactically correct in the Eclipse .DRL view.
<b><pre>
rule "R1"
when
Message(
((attrA = "foo" && _attrB == "bar") || AttrA== "foo") //syntax error (curious, why?)
)
then
System.out.println( "R1 pattern-matched Message. DROOLS Consequence executing now." );
end
</pre></b>
but R2 is syntactically correct =
<b><pre>
rule "R2"
when
Message( attrA = "foo" && _attrB == "bar") ||
Message (AttrA== "foo")
then
System.out.println( "R2 pattern-matched Message. DROOLS Consequence executing now." );
end
</pre></b>
In Drools 5.2, are R1 and R2 semantically equivalent?
        
        
        
<br><hr align="left" width="300">
View this message in context: <a href="http://drools.46999.n3.nabble.com/semantically-equivalent-DROOLS-L-value-expressions-tp4020423.html">semantically equivalent DROOLS L-value expressions?</a><br>
Sent from the <a href="http://drools.46999.n3.nabble.com/Drools-User-forum-f47000.html">Drools: User forum mailing list archive</a> at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></body></html>