hi every one,I'm just getting familiar with clips so I'm sorry for my simple question.
I'm trying to write a simple code in clips but I'm getting this error which i can't find what the problem is.
I would be grateful if any one could help.
(while (not (member$ ?answer ?values)) do
(printout t ?question)
(bind ?answer(read))
(stringp ?answer)
=>
(bind ?answer(lowcase ?answer))
)
?answer
)
;;;***
;;; ENGINE STATE RULES
;;;***
(defrule Rule0
(not (tank-is-full ?)
=>
(bind ?tank-is-full user-Question("Is there any petrol in the tank(Yes|No)?"yes YES Yes NO no No)
(assert(tank-is-full ?tank-is-full)
)
;;;****
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The rule has multiple missing/misplaced parentheses:
(defrule Rule0
(not (tank-is-full ?))
=>
(bind ?tank-is-full
(user-Question "Is there any petrol in the tank(Yes|No)?"
yes YES Yes NO no No))
(assert (tank-is-full ?tank-is-full)))
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi every one,I'm just getting familiar with clips so I'm sorry for my simple question.
I'm trying to write a simple code in clips but I'm getting this error which i can't find what the problem is.
I would be grateful if any one could help.
Defining deffunction: user-Question
Defining defrule: Rule0
[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule.
ERROR:
(defrule MAIN::Rule0
(not (tank-is-full ?)
=>
this is part of my code:
;;;*
;;; Functions
;;;***
(deffunction user-Question(?question ?answer $?values)
(printout t ?question)
(bind ?answer(read))
(stringp ?answer)
=>
(bind ?answer(lowcase ?answer))
(while (not (member$ ?answer ?values)) do
(printout t ?question)
(bind ?answer(read))
(stringp ?answer)
=>
(bind ?answer(lowcase ?answer))
)
?answer
)
;;;***
;;; ENGINE STATE RULES
;;;***
(defrule Rule0
(not (tank-is-full ?)
=>
(bind ?tank-is-full user-Question("Is there any petrol in the tank(Yes|No)?"yes YES Yes NO no No)
(assert(tank-is-full ?tank-is-full)
)
;;;****
The rule has multiple missing/misplaced parentheses: