problem in clips programming
-
hi every one, 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:
Quote:
;;;************
;;;* 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)
)
;;;**************************** -
hi every one, 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:
Quote:
;;;************
;;;* 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)
)
;;;**************************** -
I am certainly not an expert but I am quite sure that the code that you posted is not C, C++ or MFC. At least it is no variant of C, C++ or MFC that I recognize. You sure you are in the right forum?
-
I'm not sure where should I post this but it's part of the code in Clips (C Language Integrated Production System ) environment which is software tool for building expert systems. please let me know where should I post it?
-
I'm not sure where should I post this but it's part of the code in Clips (C Language Integrated Production System ) environment which is software tool for building expert systems. please let me know where should I post it?
-
I already gave you a link to the Clips page. You need to try there, as that is where you will find other people who understand that system.
Use the best guess
-
hi every one, 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:
Quote:
;;;************
;;;* 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)
)
;;;****************************You've been told that this forum isn't suitable, yet have decided to post here again. No matter how may times you post CLIPS != c || c++, the c=part denotes it can be integrated with c-based systems. Additionally CLIPS is relatively specialised, rule based programming is different to the way c operates. All this adds up to one thing: the advice I have seen here so far is spot-on: don't post this here as this isn't the correct forum and few people here will have an interest in CLIPS, your chances will be vastly improved by posting on a specialised CLIPS forum where everyone is there as they know about/are interested in it. The defrule for Rule0 has an unbalanced number of brackets BTW my guess is there is one missing at the end of the "not" line, and the ? after tank-is-full looks suspicious. Of course I know next to nothing about CLIPS, which is why going to a CLIPS forum would be so handy.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed”
“One of the greatest problems of our time is that many are schooled but few are educated”Sir Thomas More (1478 – 1535)
-
You've been told that this forum isn't suitable, yet have decided to post here again. No matter how may times you post CLIPS != c || c++, the c=part denotes it can be integrated with c-based systems. Additionally CLIPS is relatively specialised, rule based programming is different to the way c operates. All this adds up to one thing: the advice I have seen here so far is spot-on: don't post this here as this isn't the correct forum and few people here will have an interest in CLIPS, your chances will be vastly improved by posting on a specialised CLIPS forum where everyone is there as they know about/are interested in it. The defrule for Rule0 has an unbalanced number of brackets BTW my guess is there is one missing at the end of the "not" line, and the ? after tank-is-full looks suspicious. Of course I know next to nothing about CLIPS, which is why going to a CLIPS forum would be so handy.
“Education is not the piling on of learning, information, data, facts, skills, or abilities - that's training or instruction - but is rather making visible what is hidden as a seed”
“One of the greatest problems of our time is that many are schooled but few are educated”Sir Thomas More (1478 – 1535)
yeah, I do that but I didn't get any answer so I post here. yours help a lot because every time I check every thing else rather than brackets. I didn't pay attention to that at all, it was just frustrating to check sth again and again and don't know what to do. my problems solved, THX
-
yeah, I do that but I didn't get any answer so I post here. yours help a lot because every time I check every thing else rather than brackets. I didn't pay attention to that at all, it was just frustrating to check sth again and again and don't know what to do. my problems solved, THX
A couple of weeks ago, I got this nasty rash on my mouse clicking finger. I posted a question to a medical site but nobody answered. I figured that since I was writing a C++ program when it started to hurt that I would repost my question here. Need fix urgentzzz pleez reply asap thx.
-- Harvey