I am trying to use some of the many features of Jess.
The manual has few example to go by.
If I have:
(deftemplate meal
(slot name)
(slot time)
(slot calories)
(slot fats)
(slot carbos)
(slot prots)
)
I have other rules that assert instances of this template:
(assert (meal (name breakfast) (time 0830) (cals 350) (fats 45) (carbos
205) (prots 100)))
(assert (meal (name lunch) (time 1230) (cals 550) (fats 95) (carbos 255)
(prots 200)))
I would like to use a foreach to go through each meal and do some
processing:
(defrule
(meal ?all)
=>
(foreach ?all
(printout t "Meal: " name time cals fats carbos prots)
)
)
I know this isn't right, but am I going in the right direction?
I guess the answers to these questions would be in the CLIPS manual?
I can't find mine at the moment.
Thanks
Christo
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------