Hello,
sorry, another newbie here - anyway, I have two questions:
1) (a easy one i hope)
How do I retrieve a slot value from a fact?
e.g.:
------------------------------------------------------
(deftemplate aCar
(slot color)
)
(deffunction printCar (?car)
; HERE IS THE PROBLEM
; fact-slot-value exists in CLIPS, but not in JESS (?)
; but it looks like a very basic functionality ?!
; (printout t "This car is: " (fact-slot-value ?car color) crlf)
)
(defrule listCars
?car <- (aCar (color red))
=>
(printCar car)
)
------------------------------------------------------
2) (a harder one)
- As i understood JESS Objects / Templates do not support inheritance,
such as
(deftemplate aVehicle)
(slot numberOfWheels)
)
What is the appropriate way now to mimick inheritance, such as
(deftemplate aCar) ; is aVehicle
(slot isAVehicle) ; this won't work, but I would have liked it
(slot hasHorsePower)
)
(detemplate aBicycle) ; is aVehicle
...
)
- can slot values be templates again?
- or should one use multislots preferably to templates
- or should one use only ordered facts, where each level of inheritance
adds new items?
Thank you,
Frank Meineke
__________________________________________________________________________
Dipl.Inform. Frank Meineke [EMAIL PROTECTED]
Institut fuer Medizinische Informatik, Statistik und Epidemiologie (IMISE)
Tel:+49-(0)341-9716111 Fax:9716109 URL:www.imise.uni-leipzig.de/~frank
---------------------------------------------------------------------
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]
---------------------------------------------------------------------