Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8009861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:34:12+00:00 2026-06-04T18:34:12+00:00

I am working with CLIPS embedded in a C program, so I have to

  • 0

I am working with CLIPS embedded in a C program, so I have to do everything by C function calls and can’t use the CLIPS command line.

Let’s say I have asserted a few facts like this:

AssertString("(pizza 1)");
AssertString("(cauliflower 7)");
AssertString("(cheesecake 0)");

Obviously I do not get (let alone retain) any pointers to my facts at this point. When I want to retract a fact later by using Retract(factPtr), I obviously need the pointer to the fact I want to retract. So, after the lines above, how would I find the fact (cauliflower 7) again and get a pointer to it?

Do I have to get the entire fact list by GetFactList([...]), loop through it and compare strings? If so, how would I do that in the multifield DATA_OBJECT this function returns? Or is there a better way?

I would be grateful for any ideas or even code examples.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:34:15+00:00Added an answer on June 4, 2026 at 6:34 pm

    You can use the fact query functions to query the fact-list and perform actions. You can invoke this through the EvalFunction:

    DATA_OBJECT result;
    
    Eval("(do-for-all-facts ((?f pizza)) (eq ?f:implied (create$ 1)) (retract ?f))",&result);
    Eval("(do-for-all-facts ((?f cauliflower)) TRUE (retract ?f))",&result);
    

    In the first call, only the pizza fact with the value 1 is retracted. In the second call, all cauliflower facts are retracted.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Working on a rather small, and simple layout, I decided to use Meyer's CSS
Working on joining up two legacy DB systems into new database where I can
I'm working on a project, but I can't seem to get my dropdown-menu to
I'm working on a WPF application that displays video clips as part of the
I am currently working with jPlayer to add some sound clips to my website,
I have the following classes: public class Folder{ private Set<Documents> documents; private Set<Clip> clips;
I have a VS 2005/MSBuild 2.0 project (let's call it Project A) that I
I have the following JS code for ZeroClipBoard : onComplete: function(item) { var text=
i have this site i am working on: www.guygar.com the quicktime renders the video
i have installed clisp in my ubuntu machine. I am trying to use sdraw

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.