Hi Martina,

Jess quite rightly prints nothing because while you have declared your fact
templates to hold STRINGs, you created your facts with SYMBOLs.  Therefore,
your rule will not activate.  In Jess, as in Java proper, strings are always
in " ".

Try this:

(deftemplate breed
(slot name (type STRING))
(slot standard (type STRING))
)

; Note the quoted strings here in your fact
(deffacts dogs_breed
(breed (name "Cavalier") (standard "Social_breed"))
)

(defrule vypis
(breed (name ?n) (standard ?s))
=>
(printout t "Name of the dog:" ?n crlf)
(printout t "Standard of the dog:" ?s crlf)
)

OR ALTERNATELY

; Note the change in your slot type here
(deftemplate breed
(slot name (type SYMBOL))
(slot standard (type SYMBOL))
)

(deffacts dogs_breed
(breed (name Cavalier) (standard Social_breed))
)

(defrule vypis
(breed (name ?n) (standard ?s))
=>
(printout t "Name of the dog:" ?n crlf)
(printout t "Standard of the dog:" ?s crlf)
)

Cheers,
Jason
-----------------------------------------------------------
Morris Technical Solutions LLC
[EMAIL PROTECTED]
(517) 304-5883

Reply via email to