When embedding CLIPS into C Language, what function can used to modify the fact from C program

自闭症网瘾萝莉.ら 提交于 2019-12-24 03:22:37

问题


I have embedded CLIPS into C Language program, I want to modify the facts for example change a certain slot value, which function can I use from C language Program. Otherwise I have to clean all the facts and assert new facts to implement my goal.

Thanks for any idea and suggestions


回答1:


Section 4.4 of the Advanced Programming Guide, http://clipsrules.sourceforge.net/OnlineDocs.html, has a list of functions that can be used on facts. The fact-set queries and distributed actions in section 12.9.12 of the Basic Programming Guide are also useful for retrieving and manipulating facts from a C program. For example, you could use the following function call to retrieve all person deftemplate facts where the value in the age slot was greater than 18:

   DATA_OBJECT result;

   Eval("(find-all-facts ((?p person)) (> ?p:age 18))",&result);


来源:https://stackoverflow.com/questions/22857868/when-embedding-clips-into-c-language-what-function-can-used-to-modify-the-fact

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!