결국 프로그램이 백분율 확실성을 인쇄한다고 가정하면 프로그램이 중단됩니다. 무엇이 잘못 되었을까요? 제거 할 때 백분율이 아닌 데이터가 인쇄되므로 백분율 계산 규칙이어야합니다.CLIPS 간단한 백분율 오류
(defmodule PRINT-RESULTS (import MAIN ?ALL))
(defrule PRINT-RESULTS::calculate-percentages
?var <- (religion (name ?religion) (aspects $?aspects) (certainty ?certainty))
=>
(modify ?var (certainty =(*(/ ?certainty 700)100))))
(defrule PRINT-RESULTS::print-religion
?rel <- (religion (name ?religion) (aspects $?aspects) (certainty ?certainty))
=>
(retract ?rel)
(printout t crlf RELIGION: " "
?religion crlf ASPECTS: " "
?aspects crlf CERTAINTY: " "
?certainty crlf))