I'm trying to integrate CLIPS and C# application.I'm a newbie at CLIPS so I can't understand how to get expression from "printout t" construction.
I've load .clp
file, assert facts, run it, but now I want to redirect output to my application in C#.
Sorry for dumb question but I will be grateful if you will show me example or links to samples.
For example,
(deftemplate 1Data (slot name)(slot age))
(defrule 1Data (1Data (name Tim)(age ?age))=>
(printout t crlf "Tim is " ?age " years old" crlf))
I need to get and use "Tim is " ?age " years old" expression in .Net project.
You need to use the router system defined in Section 7 of the Advanced Programming Guide, http://clipsrules.sourceforge.net/documentation/v630/apg.pdf. For use in C#, you will probably need to wrap the C code with a C# class for use in C#. There's a project at http://sourceforge.net/projects/clipsnet/ that contains code that may be useful in doing this. I couldn't get the projects to compile, but the source code can give you some ideas on how to get started.