Menu ▾ ▴

#9 Rule: call the property directly from the handler

2.0
new
None
2016-10-12
2016-10-12
No

Usually to access an instance's property I write:
(defrule check-property
?room <- (object (is-a ROOM) (property ?property))
=>
(printout ?debug-print "Property is " ?property crlf))

There should be a quickest way to call the property directly from the handler.

For example (?room:property is not a valid syntax now):
(defrule check-property
?room <- (object (is-a ROOM))
=>
(printout ?debug-print "Property is " ?room:property crlf))

Discussion


Log in to post a comment.