The following runs as I'd expect in Jess 4.1 final:
(deftemplate OBJECT (multislot names))
(assert (OBJECT (names A B C)))
(defrule test-rule
(OBJECT (names $?x))
=>
(bind ?size (length$ $?x))
(bind ?first (nth$ 1 $?x))
(printout t ?size " " ?first crlf))
;; prints "3 A"
Can you be more specific?
I think Venkat wrote:
>
> Hi,
>
> The following multifield functions work well under CLIPS but
> not with JESS - however, no errors are reported in Jess.
> Code snippet :
> ...
>
> (OBJECT (names $?x)) - defined suitably with multislot for names
> ...
> ...
>
> (bind ?size (length $?x))
>
> (bind ?first-name (nth 1 $?x))
>
> I have tried (bind ?size (length$ ?x)) which gives the same response - no
> errors reported but does not work as expected.
>
> Any information will be useful.
>
> Venkat
>
> ---------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the
> list. List problems? Notify [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> mailbox was /var/mail/ejfried
> 5976, 5976
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (510) 294-2154
Sandia National Labs FAX: (510) 294-2234
Org. 8920, MS 9214 [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. List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------