Well, build and eval throw exceptions on failure, and Jess has
exception handling, So you could just try to define the rule, and
recover from any resulting exceptions.
If you know the name of the rule you're testing, you could use
undefrule to remove it on success, if you want; i.e.,
(deffunction check-rule (?text ?name)
(try
(build ?text)
(undefrule ?name)
(return TRUE)
catch ?ERROR
(return FALSE)))
On Sep 1, 2009, at 9:13 AM, jo wrote:
Hi
I am porting a clips script and it uses a function check-syntax
which is used to dismiss bad rules for build-rule.
However this function appears not to exist for jess ? Is there an
equivalent available ?
Tx
Joe
--------------------------------------------------------------------
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]
.
--------------------------------------------------------------------
---------------------------------------------------------
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].
--------------------------------------------------------------------