Number equality test fails in CLIPS pattern matching?

后端 未结 3 2058
清歌不尽
清歌不尽 2021-01-25 10:02

I have this following rule in my CLIPS file:

(defrule check-final (declare (salience 12))
    ?scnt <- (set-count (value ?v) (class ?c))
    (test (= ?v ?*tot         


        
3条回答
  •  长情又很酷
    2021-01-25 10:40

    Found part of the problem: I'm using the global ?*total* and according to the CLIPS Manual

    Global variables can be accessed as part of the pattern‑matching process, but changing them does not invoke the pattern‑matching process.

    But this does not explain the equality test failure

提交回复
热议问题