Jess is not a strongly-typed language; all slots and variables can
contain any data type.
If, for some reason, you can't just write your program to only put the
correct data into the correct slot, you could always write a rule
which checked Human-Animal facts for the proper contents of their slots.
On Feb 12, 2009, at 4:48 AM, Nopphadol Chalortham wrote:
Dear all
I have a question follow this example.
I have a template such as
(deftemplate Human-Animal
(slot human (type OBJECT))
(slot animal (type OBJECT))
)
The value of human slot is Person that is define as below
(deftemplate person (slot name) (slot age))
and the value of animal slot is Animal that is defined as below
(deftemplate Animal (slot name)(slot type))
My problem is in applying: Animal can be value in human slot or
animal slot
the same as Person that can be value in human or animal slot.
How to specify value in human slot have to be only Person Object?
thank you
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------