next up previous

3.4 IMPLIED DEFTEMPLATES

Asserting or referring to an ordered fact (such as in a LHS pattern) creates an ìimpliedî deftemplate with a single implied multifield slot. The implied multifield slotís name is not printed when the fact is printed. The implied deftemplate can be manipulated and examined identically to any user defined deftemplate (although it has no pretty print form).

Example

CLIPS> (clear)
CLIPS> (assert (foo 1 2 3))
<Fact-0>
CLIPS> (defrule yak (bar 4 5 6) =>)
CLIPS> (list-deftemplates)
initial-fact
foo
bar
For a total of 3 deftemplates.
CLIPS> (facts)
f-0     (foo 1 2 3)
For a total of 1 fact.
CLIPS>



next up previous