I think Thomas Barnekow wrote:
> Readers of the Jess Manual ;-) will recall, that
>
> (bind <variable> <expression>)
>
> assigns <expression> to <variable> and returns the given value. Therefore,
> you can modify your rule as follows:
>
> (defrule somerule
> ?a <- (aclass (OBJECT ?o))
> (test (< (call (bind ?vector (call ?o getVectorBasedOnSomeConditions 5))
> size) 0))
> =>
> (printout t "Size = " (call ?vector size) crlf))
>
> Hope that helps.
>
> Thomas
Unfortunately, this doesn't work. There's no way to bind a variable
on the LHS of a rule that can be accessed from the RHS, except by
pattern-matching it.
---------------------------------------------------------
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]
---------------------------------------------------------------------