2
當我試圖將一個變量與一個字符串進行比較時,它給了我一個錯誤。我試圖將其與(= ?a "s")
進行比較。如何將傳遞給函數的變量與CLIPS中的字符串進行比較?
這是產生誤差的完整代碼例如:
(deffunction cierto (?a)
(if (= ?a "s")
then
(printout t TRUE crlf)
else
(printout t FALSE crlf)
)
)
錯誤:
Defining deffunction: cierto
[ARGACCES5] Function = expected argument #2 to be of type integer or float
ERROR:
(deffunction MAIN::cierto
(?a)
(if (= ?a "s")
FALSE
也許發佈錯誤信息? – rbaleksandar
添加錯誤消息 – endikap100