Hi All,

Assuming there are two facts, one is a class and another one is a method,
definitions of two facts are:

(deftemplate class (slot className))

(deftemplate method (slot className)(slot methodName))

(defrule a-class-has-more-than-10-methods
 (class (className ?clsName))
 ; (method (className ?clsName)(methodName ?mtdName)
 ; I want to get the number of methods in this class
 =>
(printout t ?clsName " has more than 10 methods" crlf)
)

I want to get how many methods in each class, is there a Jess function which
does what I want? If there isn't such function, would you please tell me how
to do it?

Thanks a lot.

Reply via email to