<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to Discussion</title><link>https://sourceforge.net/p/clipsrules/discussion/</link><description>Recent posts to Discussion</description><atom:link href="https://sourceforge.net/p/clipsrules/discussion/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 20 Apr 2026 06:36:47 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/clipsrules/discussion/feed.rss" rel="self" type="application/rss+xml"/><item><title>How to return to the CLIPS a value from UDF?</title><link>https://sourceforge.net/p/clipsrules/discussion/776946/thread/f2a167df60/?limit=25#ed14</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you, Gary&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sergey Piskunov</dc:creator><pubDate>Mon, 20 Apr 2026 06:36:47 -0000</pubDate><guid>https://sourceforge.netd36cb2ce7bd80bc106a81608b855ffb743df6763</guid></item><item><title>How to return to the CLIPS a value from UDF?</title><link>https://sourceforge.net/p/clipsrules/discussion/776946/thread/f2a167df60/?limit=25#e1aa</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Section 8 of the Advanced Programming Guide has ten examples of adding UDFs. Here's the first one:&lt;/p&gt;
&lt;p&gt;8.4.1 Euler’s Number&lt;br/&gt;
This example demonstrates returning a mathematical constant, Euler’s number, from a user&lt;br/&gt;
defined function.&lt;/p&gt;
&lt;p&gt;The AddUDF function call required in UserFunctions specifies that the CLIPS function name is&lt;br/&gt;
e; the return value type is a float; the UDF does not expect any arguments; and the C&lt;br/&gt;
implementation of the UDF is the function EulersNumber.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;void UserFunctions(
  Environment *env)
  {
   AddUDF(env,"e","d",0,0,NULL,EulersNumber,"EulersNumber",NULL);
  }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The implementation of the CLIPS function e in the C function EulersNumber uses the function&lt;br/&gt;
CreateFloat to create the return value. The C library function exp is used to calculate the value&lt;br/&gt;
for Euler’s number.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cpf"&gt;&amp;lt;math.h&amp;gt;&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;EulersNumber&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;Environment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;UDFContext&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;udfc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;UDFValue&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;floatValue&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CreateFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;exp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;After creating a new executable including the UDF code, the function e can be invoked within&lt;br/&gt;
CLIPS.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;CLIPS&amp;gt; (e)
2.71828182845905
CLIPS&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gary Riley</dc:creator><pubDate>Sun, 19 Apr 2026 20:26:56 -0000</pubDate><guid>https://sourceforge.netd5c875de87ed38e126924e8e8c87da45ef99dc9e</guid></item><item><title>How to return to the CLIPS a value from UDF?</title><link>https://sourceforge.net/p/clipsrules/discussion/776946/thread/f2a167df60/?limit=25#d028</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello.&lt;br/&gt;
I want to add a fact like this one - Mode 10&lt;br/&gt;
(assert (Mode (get_answer_from_udf_function))) &lt;/p&gt;
&lt;p&gt;How can do that?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sergey Piskunov</dc:creator><pubDate>Sun, 19 Apr 2026 19:05:09 -0000</pubDate><guid>https://sourceforge.net24d92aa18c876dbbf40ac923e274858c430414a0</guid></item><item><title>Problem with g++ compiler</title><link>https://sourceforge.net/p/clipsrules/discussion/776946/thread/e0535702d5/?limit=25#536f</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you, Gary&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sergey Piskunov</dc:creator><pubDate>Tue, 17 Mar 2026 18:43:36 -0000</pubDate><guid>https://sourceforge.netebadc3c17458fea112e6518d96d073f8963dac58</guid></item><item><title>Problem with g++ compiler</title><link>https://sourceforge.net/p/clipsrules/discussion/776946/thread/e0535702d5/?limit=25#128f</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The linker handles references differently between files compiled as C and files compiled as C++. If you're using the make file that came with CLIPS, create the library using "make release_cpp". That will create the library using the g++ compiler.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;core % make        
   .
   .
   .            
core % gcc -Wall -o main main.c -L. -lclips -lm
core % g++ -Wall -o main main.c -L. -lclips -lm
clang++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
Undefined symbols for architecture x86_64:
  "CommandLoop(environmentData*)", referenced from:
      _main in main-386a03.o
   NOTE: found '_CommandLoop' in libclips.a[15](commline.o), declaration possibly missing 'extern "C"'
   .
   .
   .            
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
core % rm *.o
core % make release_cpp
   .
   .
   .            
core % gcc -Wall -o main main.c -L. -lclips -lm
Undefined symbols for architecture x86_64:
  "_CommandLoop", referenced from:
      _main in main-ae571b.o
   .
   .
   .            
clang: error: linker command failed with exit code 1 (use -v to see invocation)
core % g++ -Wall -x c++ -o main main.c -L. -lclips -lm 
core % mv libclips.a libclips++.a
core % g++ -Wall -x c++ -o main main.c -L. -lclips++    
core %
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gary Riley</dc:creator><pubDate>Tue, 17 Mar 2026 18:09:58 -0000</pubDate><guid>https://sourceforge.net84e05f7ae9250ad70ae91e44f0c8f3dd10f8eaf4</guid></item><item><title>Problem with g++ compiler</title><link>https://sourceforge.net/p/clipsrules/discussion/776946/thread/e0535702d5/?limit=25#968e</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello.&lt;br/&gt;
I'm trying to compile my small program&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cpf"&gt;"./CLIPS/clips.h"&lt;/span&gt;

&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;Environment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CreateEnvironment&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;Load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"hello.clp"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;Reset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;Run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;-1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;DestroyEnvironment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;env&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;$ ls&lt;br/&gt;
CLIPS  libclips.a  main.c  main.cpp  hello.clp&lt;/p&gt;
&lt;p&gt;When I'm using gcc everything good&lt;br/&gt;
gcc -Wall -o main main.c -L. -lclips -lm&lt;/p&gt;
&lt;p&gt;When I'm using g++ I get errors&lt;br/&gt;
g++ -Wall -o main main.c -L. -lclips -lm&lt;/p&gt;
&lt;p&gt;/usr/bin/ld: /tmp/ccXICXAv.o: in function &lt;code&gt;main':
main.c:(.text+0xd): undefined reference to&lt;/code&gt;CreateEnvironment()'&lt;br/&gt;
/usr/bin/ld: main.c:(.text+0x27): undefined reference to &lt;code&gt;Load(environmentData*, char const*)'
/usr/bin/ld: main.c:(.text+0x33): undefined reference to&lt;/code&gt;Reset(environmentData&lt;em&gt;)'&lt;br/&gt;
/usr/bin/ld: main.c:(.text+0x46): undefined reference to &lt;code&gt;Run(environmentData*, long long)'
/usr/bin/ld: main.c:(.text+0x52): undefined reference to&lt;/code&gt;DestroyEnvironment(environmentData&lt;/em&gt;)'&lt;br/&gt;
collect2: error: ld returned 1 exit status&lt;/p&gt;
&lt;p&gt;so I can't build my c++ program with libclips.a library and i don't know why?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Sergey Piskunov</dc:creator><pubDate>Mon, 16 Mar 2026 17:17:26 -0000</pubDate><guid>https://sourceforge.net965faaf247a5f53fc8231186341f6eda2a5cfe28</guid></item><item><title>Major version ?</title><link>https://sourceforge.net/p/clipsrules/discussion/776945/thread/bc40209181/?limit=25#787d/a22a/85e7/d328</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;It's in the SVN repository for this project under the code tab:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://sourceforge.net/p/clipsrules/code/HEAD/tree/branches/70x/"&gt;https://sourceforge.net/p/clipsrules/code/HEAD/tree/branches/70x/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gary Riley</dc:creator><pubDate>Wed, 25 Feb 2026 18:31:12 -0000</pubDate><guid>https://sourceforge.net07d5d7496ac55772a45d413e1b810394c48652a0</guid></item><item><title>Major version ?</title><link>https://sourceforge.net/p/clipsrules/discussion/776945/thread/bc40209181/?limit=25#787d/a22a</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;If you're willing to compile the exectuables yourself and deal with some incomplete documentation, you can consider it to be a beta release. There's enough new functionality that I'm working on a companion book for it when I eventually do release it. The automatic goal generation doesn't support backtracking like Prolog (which I last used 40 years ago),, so I'm still exploring what can be done with it. It's really quite useful for systems that need to ask questions,, but I want to fully explore other uses. &lt;/p&gt;
&lt;p&gt;I'm hoping I can get a book finished this year and do a release shortly after, but I was thinking I'd get more work done last year but I got sidetracked exploring generative AI. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Gary Riley</dc:creator><pubDate>Wed, 25 Feb 2026 05:27:29 -0000</pubDate><guid>https://sourceforge.net0d45171f5512436cfab58142964eedbae7d52554</guid></item><item><title>Major version ?</title><link>https://sourceforge.net/p/clipsrules/discussion/776945/thread/bc40209181/?limit=25#787d</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The new v7 features look amazing. Especially the backward chaining.&lt;br/&gt;
I was about to start hacking on some native predicates for SWI Prolog to query CLIPS facts but deferring to built-in CLIPS functionality would be much better for my use cases.&lt;/p&gt;
&lt;p&gt;How usable is the v7 branch at the moment?&lt;br/&gt;
Without pressure, do you have a timeline for the v7 release?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nick Main</dc:creator><pubDate>Sat, 21 Feb 2026 22:19:37 -0000</pubDate><guid>https://sourceforge.net66bef94af92d263191ac19d3c44498e8f5e20bb4</guid></item><item><title>Feature request tickets</title><link>https://sourceforge.net/p/clipsrules/discussion/776946/thread/02c85ac2b9/?limit=25#0760</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Since the feature request section doesn't get much traffic,  it may be possible to miss entries present there. So, I'm creating this ticket as an fyi of 4 existing entries there, of which the following 2 are mine:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://sourceforge.net/p/clipsrules/feature-requests/11/"&gt;https://sourceforge.net/p/clipsrules/feature-requests/11/&lt;/a&gt;&lt;br/&gt;
&lt;a href="https://sourceforge.net/p/clipsrules/feature-requests/12/"&gt;https://sourceforge.net/p/clipsrules/feature-requests/12/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">vlad</dc:creator><pubDate>Wed, 18 Feb 2026 18:51:01 -0000</pubDate><guid>https://sourceforge.netc1c65babb7507abb1c1e947e3ad872a116c67edc</guid></item></channel></rss>