I think that Chirag wrote:
>>?fact <-  (MAIN::findwherecontains productType CVBND ?fc) in the rule
always stops the rule from activating.

Hi Chirag,
You might be violating the Zen of Jess
http://herzberg.ca.sandia.gov/jess/zen.shtml.

In your code

  ?fact <-  (MAIN::findwherecontains productType CVBND ?fc)

you are trying to use the explicit pattern binding mechanism, "<-", to bind
the results of a function call to a variable, which as far as I know, won't
work.  Patterns binding are just that: a means to bind the actual fact
reference of a fact that matches a particular pattern to a variable for use
on the RHS of a rule.

>>I do not understand why.

Jess is looking for an ordered fact named (MAIN::findwherecontains)
containing a list of three values in its single slot, and it's rightly not
finding any, so the rule never activates.

Also, if you look at your function

  (deffunction MAIN::findwherecontains (?detail ?value ?col) ...

you have it returning either 0, a fact reference, or FALSE depending on
where the control flows.  Then, you're trying to bind that to a variable
that's clearly intended to hold a fact reference later... a sure source of
future bugs.

See if that helps.
Cheers!

-Jason

------------------------

Jason Morris
Morris Technical Solutions
[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]
--------------------------------------------------------------------

Reply via email to