获取我刚才断言的事实ID



我是否有办法获得我刚刚在规则的RHS中断言的事实的事实ID ?

之类的东西
?f <- (assert (new-fact))
CLIPS> 
(defrule example
   =>
   (bind ?f (assert (new-fact)))
   (bind ?i (fact-index ?f))
   (printout t "The fact index is " ?i crlf))
CLIPS> (reset)
CLIPS> (run)
The fact index is 1
CLIPS> (facts)
f-0     (initial-fact)
f-1     (new-fact)
For a total of 2 facts.
CLIPS> 

最新更新