문제

Is there any way in Clips to create a rule in which the RHS is a Function call?

도움이 되었습니까?

해결책

Yes:

CLIPS> (deffunction foo()
         (printout t "The function was called." crlf))
CLIPS> (defrule calls-function
         (trigger)
       =>
         (foo)
       )
CLIPS> (reset)
CLIPS> (assert (trigger))
<Fact-1>
CLIPS> (run)
The function was called.
CLIPS> 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top