In http://clipsrules.sourceforge.net/documentation/v624/bpg.htm :
12.18.1 Sequence Expansion and Rules
The following rules illustrate appropriate use of sequence expansion on the LHS of rules.
(defrule good-rule-1 (pattern $?x&:(> (length$ ?x) 1)) (another-pattern $?y&:(> (length$ ?y) 1)) (test (> (+ $?x) (+ $?y))) =>)
But In CLIPSWIN 6.3, I(ve got the error :
[ARGACCES4] Function + expected at least 2 argument(s)
CLIPS> (defrule good-rule-1 (pattern $?x&:(> (length$ ?x) 1)) (another-pattern $?y&:(> (length$ ?y) 1)) (test (> (+ $?x) (+ $?y))) =>) [ARGACCES4] Function + expected at least 2 argument(s) ERROR: (defrule MAIN::good-rule-1 (pattern $?x&:(> (length$ ?x) 1)) (another-pattern $?y&:(> (length$ ?y) 1)) (test (> (+ $?x) CLIPS> (set-sequence-operator-recognition TRUE) FALSE CLIPS> (defrule good-rule-1 (pattern $?x&:(> (length$ ?x) 1)) (another-pattern $?y&:(> (length$ ?y) 1)) (test (> (+ $?x) (+ $?y))) =>) CLIPS> (assert (pattern 7 8 9)) <Fact-1> CLIPS> (assert (another-pattern 1 5)) <Fact-2> CLIPS> (agenda) 0 good-rule-1: f-1,f-2 For a total of 1 activation. CLIPS>
COOL !!! Thank you
Log in to post a comment.
In http://clipsrules.sourceforge.net/documentation/v624/bpg.htm :
12.18.1 Sequence Expansion and Rules
The following rules illustrate appropriate use of sequence expansion on the LHS of rules.
(defrule good-rule-1
(pattern $?x&:(> (length$ ?x) 1))
(another-pattern $?y&:(> (length$ ?y) 1))
(test (> (+ $?x) (+ $?y)))
=>)
But In CLIPSWIN 6.3, I(ve got the error :
[ARGACCES4] Function + expected at least 2 argument(s)
COOL !!!
Thank you