Hi All,

One more question: consider the following template defs and assertions:

(deftemplate elephant (slot age))
(deftemplate dog (slot weight))

(assert (elephant (age 10)))
(assert (dog (weight 50)))

Does anyone no if it's possible to inspect each assertion to see what type
of slot it contains?

I would guess the following rule, but it seems you can't have a variable
in the first position:

(defrule find-template-with-age
        (?X (slot age)
        =>
        (printout t ?X " has an age slot" crlf))


You can do this w. Java's Reflection tools so I assume it must be possible
in Jess.

Any help would be appreciated,
Scott



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