(eq) is a very strong test; (eq 1 1.0) is FALSE, as are (eq 1 "1"),
(eq "1" 1.0), and all the permutations. Both the types and the values
of the variables must match. STRING, INTEGER, and FLOAT are all
different types. My guess is that ?quality and ?t have different
types.

The "=" function is much looser, and will convert types as needed:
(= 1 1.0), (= "1" 1.0), etc. are all TRUE. Try using "=" instead of
"eq". 

I think Vincent Wolowski wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> I have the following rule:
> 
> (defrule match-price-and-quality
>     (Tag (TagName "price") (Text ?u))
>     (Tag (TagName "quality") (Text ?t))
>     (servicequality ?quality) 
>     (serviceprice ?price) 
>     (test (and (eq ?quality ?t) (<= ?u ?price)))
>     =>
>     (printout t "---- price ----------- : " ?u crlf )
>     (printout t "---- quality --------- : " ?t crlf )
>     (printout t "---- serviceprice ---- : " ?price crlf )
>     (printout t "---- servicequality -- : " ?quality crlf )) 
> 
> If I comment the test CE, the rule gets activated and fires.
> The values of the variables are OK.
> I have no idea, why it doesn_t work with the test CE.
> Thanks for any help!
> 
> Vincent
> ______________________________________________________________________________
> FreeMail in der Premiumversion! Mit mehr Speicher, mehr Leistung, mehr 
> Erlebnis und mehr Pr_mie. Jetzt unter http://club.web.de/?mc=021105
> 
> 
> 
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]
> --------------------------------------------------------------------
> 



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to