You can't explicitly bind a variable in one pattern and expect to
access it from another -- it won't be there. Similarly, you can't use
"bind" to bind a value to a variable on the LHS and then use that
variable on the RHS -- again, it won't be there. Jess just doesn't
work that way. There is no "execution context" that is carried from
one pattern to the next, nor is there one that goes from the LHS to
the RHS. The only way to pass information from one pattern to the
next, or from the LHS to the RHS of a rule, is via pattern-matching.

If you want to group a set of function calls on the LHS of a rule so
they can pass variables between them, you can use (progn), or you can
write a deffunction and call it. 

I think Mahesh Gandhe wrote:
> 
>  Hi ,
> I need to call the functions of class in the body  and head of the rule.
> It gives me not bound error.
> 
>  
> 
>  (defrule abc
> 
> (test (bind ?vt (new java.util.Hashtable)))
> 
> (test (call ?vt  put �key� �value�))
> 
> => (call ?vt get "key"))
> 
>  
> 
> can you tell me how to use call function in the head and body  part of the rule ? 
> 
> and how to invoke the methods of the class attached to a  bound a variable?
> 
>  
> 
> if this does not work , can i just call  the methods of the static class which need 
>not be 
> 
> instantiated and call methods like
> 
> (test (call staticClass.MethodName))
> 
> in the body of a rule.
> 
> Regards,
> 
> Mahesh G. 
> 
>   
> 
> 
> 
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax



---------------------------------------------------------
Ernest Friedman-Hill  
Distributed Systems Research        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
Org. 8920, MS 9012                  [EMAIL PROTECTED]
PO Box 969                  http://herzberg.ca.sandia.gov
Livermore, CA 94550

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