Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. problem in clips programming

problem in clips programming

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    a fatemeh
    wrote on last edited by
    #1

    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)
    )
    ;;;****************************

    L K 2 Replies Last reply
    0
    • A a fatemeh

      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)
      )
      ;;;****************************

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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?

      A 1 Reply Last reply
      0
      • L Lost User

        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?

        A Offline
        A Offline
        a fatemeh
        wrote on last edited by
        #3

        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?

        L 2 Replies Last reply
        0
        • A a fatemeh

          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?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          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

          A 1 Reply Last reply
          0
          • A a fatemeh

            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?

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            a.fatemeh wrote:

            please let me know where should I post it

            If it were me looking to know about someone else's language or IDE, I would go to the source and ask them. For CLIPS, I would go here[^]

            1 Reply Last reply
            0
            • L Lost User

              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

              A Offline
              A Offline
              a fatemeh
              wrote on last edited by
              #6

              thanks,I have used that link but I think may be I could find my answer here. thanks i'll try once more

              1 Reply Last reply
              0
              • A a fatemeh

                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)
                )
                ;;;****************************

                K Offline
                K Offline
                Keith Barrow
                wrote on last edited by
                #7

                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)

                A 1 Reply Last reply
                0
                • K Keith Barrow

                  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)

                  A Offline
                  A Offline
                  a fatemeh
                  wrote on last edited by
                  #8

                  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

                  H 1 Reply Last reply
                  0
                  • A a fatemeh

                    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

                    H Offline
                    H Offline
                    H Brydon
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups