<br>   Left hand side of a constraint must always be a field name. If you need expression there, either do what wolfgang suggested or wrap the whole thing in an eval().<br><br>   []s<br>   Edson<br><br><div class="gmail_quote">
2009/10/2 Greg Barton <span dir="ltr">&lt;<a href="mailto:greg_barton@yahoo.com">greg_barton@yahoo.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Try wrapping it in parentheses:<br>
<div class="im"><br>
A ($b:b, $c:c, ($b/$c) &lt;=105)<br>
<br>
<br>
<br>
</div><div><div></div><div class="h5">----- Original Message ----<br>
From: skasab2s &lt;<a href="mailto:skasab2s@smail.inf.fh-brs.de">skasab2s@smail.inf.fh-brs.de</a>&gt;<br>
To: <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
Sent: Friday, October 2, 2009 10:20:52 AM<br>
Subject: [rules-users]  Division Operator in a Rule Condition<br>
<br>
<br>
Hello guys,<br>
<br>
I have this problem:<br>
<br>
I have an object A with fields b and c. I have to check if b/c &lt;= 105 (if<br>
the division of the both fields is less than 105).<br>
<br>
When I try the condition  A ($b:b, $c:c, $b/$c &lt;=105), I get the error<br>
message &quot;No viable alternative for /&quot;.<br>
<br>
How to check this one correctly in a rule condition?<br>
<br>
Thanks a lot for any ideas!<br>
<br>
skasab2s<br>
<br>
<br>
--<br>
View this message in context: <a href="http://www.nabble.com/Division-Operator-in-a-Rule-Condition-tp25716712p25716712.html" target="_blank">http://www.nabble.com/Division-Operator-in-a-Rule-Condition-tp25716712p25716712.html</a><br>

Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto: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>
<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto: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>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>  Edson Tirelli<br>  JBoss Drools Core Development<br>  JBoss by Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>