But I think he closes this on the third line.

On Dec 18, 2006, at 9:11 PM, Ernest Friedman-Hill wrote:

On Dec 18, 2006, at 10:13 PM, Mike Stacey wrote:


(defrule TA::Initiates
 (mon (reading ?r&:(>= ?r 143))
 (tstamp ?t&:(> ?t 0))
 (posLshift (truth_val false)))
 =>
 (assert posLshift(truth_val 1))
 (printout t "Initiates: Data "?r" bpm, timestamp "?t", Fluent truth
count:  "  crlf))


Error is:

"Jess reported an error in routine Jesp.parsePattern
while executing (batch rules/ec-1.clp).
Message: No such slot posLshift in template MAIN::mon at token
'posLshift'."


There's a missing close-parenthesis on the first line (three open, only two close) so Jess thinks you mean to test the contents of the "tstamp" and "posLshift" slots in a "mon" fact.

The JessDE is pretty good at helping you spot this sort of problem. Besides formatting your code so that your errors are more obvious, this kind of error will lead to a train wreck with all sorts of error markers from this point on in the file, giving you a strong hint that something is wrong. If you can't use the JessDE, use the Lisp mode in any programmer's editor -- it will know how to format Jess code to point out this error.

---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 [EMAIL PROTECTED]
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 owner-jess- [EMAIL PROTECTED]
--------------------------------------------------------------------

--------------------------------------------------------------------
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]
--------------------------------------------------------------------

Reply via email to