Re: JESS: Problems with function test in version 70a2

2004-10-30 Thread ejfried
I think Sven Siorpaes wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
 Hello,
 
 I encountered a problem with the test function
 used in a rule within a module. 

I can confirm that this is a bug in 7.0a2. I've already fixed it and
7.0a3 will contain the patch.


-
Ernest Friedman-Hill  
Advanced Software Research  Phone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov


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]




RE: JESS: Problems with function test in version 70a2

2004-10-26 Thread Jason Morris
I think that Sven Siorpaes wrote:
 I encountered a problem with the test function used in a rule within a
module.
 Has there been any changes working with modules?

Hi Sven,
Note that Jess's reserved symbols are case sensitive, so the symbol true
is not the same as the correct one TRUE -- p.43 of JIA makes this
important distinction.  However, changing just that in your code did not fix
the problem.  I tried different versions of your code, and the (test) CE and
auto-focus work fine.  I verified that your code does indeed work in version
6.1p7, so I'll escalate the issue to Ernest when he returns from vacation --
could be a regression.

In the meantime, you can always use an equals constraint inside your LHS
patterns to do exactly what a test CE does.

For example,

(defrule TEST::testfunction
  (declare (auto-focus TRUE))
  ;; This is pattern ...
  (foo (x ?x) (y ?y))
  (test ( ?y ?x))
  ;; is equivalent to this pattern
  ;; (foo (x ?x) (y ?y:( ?y ?x))
  =
  (printout t Test successful))

Cheers,
Jason
--
 Jason Morris - Assistant Moderator
 Jess Listserver - [EMAIL PROTECTED]
 email: [EMAIL PROTECTED]
 www.morristechnicalsolutions.com
 fax/phone: 503.692.1088





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]