In recent versions of Jess, fact-slot-value takes a jess.Fact object
as an argument, not an integer, thus avoiding an expensive lookup. In
general, when you bind a fact to a variable in recent Jess versions,
you get a Fact, not an integer, such that you should rarely, if ever,
need to call getFactId or findFactById. So you can simplify code like
this to use the fact directly:

(deffunction moves(?fato)
    (bind ?px-value (fact-slot-value ?fato tx))
    ... rest of the function  


[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hello all,
> 
> I have a problem. Today I downloaded the last version of Jess (60b1)
> and I_m working in a ROBOT project. In my robot exists one function
> wich moves the robot, something like this:
> 
> ;;?fato is of type RU.fact
> ;; tx is slot name to (deftemplate tesis(slot tx))
> (deffunction moves(?fato)
>    (bind ?fact-id (call ?fact getFactId))
>    (bind ?px-value(fact-slot-value ?fact-id tx))
>    ... rest of the function
> )
> 
> The problem is: I need to get the 'tx' value but (fact-slot-value) doesn_t
> works in JESS60b1(???). This function (moves) fires in old versions but
> not fires in Jess60b1. I read all the new docs but don_t solved this
> problem. The Jess60b1 (fact-slot-value) function changes something? Does exists
> conflicts?
> 
> Thanks for any help! Bye!
> 
> 



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