I think =?iso-8859-1?q?Aby?= wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi,
> A very basic question from a 10 day old Jess user. :)
> How do I add value to a multislot? I can use cerate$ to initialise value to a 
> multislot as in:
>  
> (deftemplate alphalist (multislot alpha))
>  
> (assert (alphalist (alpha (create$ a b c ))))
>  
> Now, how do I add 'd e f' to this fact?
>  

If you have a variable "?f" referring to the fact, and "?c" referring
to the current contents of the slot then you'd say

(modify ?f (alpha (create$ ?c d e f)))

For example in a rule like

(defrule modify-slot
  ?f <- (alphalist (alphalist $?c))
  =>
  (modify ?f (alpha (create$ ?c d e f))))


---------------------------------------------------------
Ernest Friedman-Hill  
Advanced Software Research          Phone: (925) 294-2154
Sandia National Labs                FAX:   (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]
--------------------------------------------------------------------

Reply via email to