I hate to be a pain but Ernest replied to my first Jess Query and then moved my post to "Other Java Products and Servers" but as far as I can see that part of the forum is rather dead and I am really anxious to get a reply from Ernest or anyone else who can help. Here is my code and what I'm hoping to do:
(deffunction under-16 () (printout t "How old are you?") (assert (Patient(age (read)))))
I want to create a function which asks a question such as "How old are you?" and then get Jess to compare the integer entered with the criteria specified in my rule(s). I already have a template called Patient with a slot named age. When I use the above it just gives 0. Here is my first rule:
(defrule eligibility-rule1 (Patient (age ?age& < ?age 16))) => (printout t "You are eligible for free prescriptions. (Rule: 1)" crlf) )
Thanks a million. [ December 01, 2005: Message edited by: Jonathan Goode ]
Joined: Dec 01, 2005
Thanks very much for your help. I've managed to get it all working - just in time for my hand in date of tomorrow! Topic can be closed.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com