Reputation: 13
Is there any way in Clips to create a rule in which the RHS is a Function call?
Upvotes: 0
Views: 1969
Reputation: 19179
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>
Upvotes: 2