I think Moore, David             [IES] wrote:
> 
>               (defrule age
>               (benefit-seeking)                          
>               =>
>               (printout t "Please enter your age (in years) " crlf)
>               (assert (age(read))))
> 
> The disappointment is that the value for "age" does not appear to be one
> that can subsequently be processed mathematically. 

This should work fine; you would end up with a fact (age 37), where 37
is an INTEGER. (read) tokenizes its input exactly as if it were
parsing Jess source code.


> I would like a subsequent
> rule to have in its left hand side the condition that age is less than 70,
> but can't get this to happen.

Would look like

(defrule less-than-70
  (age ?a&:(< ?a 70))
  =>
  ; .. whatever
  )



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

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