CLIPS Basic Syntax

Learning Path

crlf is carriage return line feed (printout t “Hello World” crlf)

(printout t “Product " (* 8 8) crlf crlf)

In the line below the person is object, comments are optional, slot is used for defining attributes. (deftemplate person “comments " (slot personsName)) (assert (person (personsName “ali”))) retract with fact number is used to remove fact from working memory. (retract 1) to list facts type (facts)

(unwatch facts) (watch facts)

(defrule A “comment” (person (personsName “ali”)) => (printout t “Found Person Ali” crlf crlf) )