【发布时间】:2020-07-27 04:18:46
【问题描述】:
我正在尝试将 name 的值声明到变量中,但是当我声明它时,值会出现在引号中,并且末尾还有一个额外的空格。
(defrule discount_amt_group
(exists (Student (age 14)(marks ?q&:(> ?q 40))))
=>
(bind ?name "")
(do-for-all-facts ((?p Student))
(or (eq ?p:marks 80)
(eq ?p:marks 75)
(eq ?p:marks 90))
(bind ?name (str-cat ?name ?p:name " "))
(bind ?totalMarks (+ ?totalMarks ?p:marks)))
(assert (StudOut(names ?name)))
预期值将是(名称 Harry Ron Ginger),但现在它变为(名称“Harry Ron Ginger”) 请提出建议。
【问题讨论】:
标签: rules rule-engine clips