Hi all,

I have a question and I don't know if it's possible to resolve it

I explain me with an example

(deftemplate participant "a participant"
  (slot nom (type STRING))
  (slot Question (default 0))
  (slot Answer (default 0))
  (slot Aknowledge (default 0))
  ...
)

The I assert a participant
(assert (participant (nom "Duke")))

Inside a rule, I want to access a slot with a variable

(defrule newMessage
  ?message<-(message ?p ?t)
  ?participant<-(participant (nom ?p) (?t ?val)  ; here's the problem
  =>
  (modify ?participant (?t (+ ?val 1)) ) ; and there's too
  (retract ?message)
)

and then I assert a message

(assert (message "Duke" Question))

But it doesn't work ...
The problem is (participant (?t ?val))
How to transform a variable into a name of a field ?

Thanks for answers or comments

 S�bastien George


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