Hi,
I'm using CLIPS within a C program. I would like to define some defglobals directly from C via a buffer.
Something like this: void *theEnv; char buffer[1000];
theEnv = GetCurrentEnvironment(); sprintf(buffer, "(defglobal ?*var1* = 123 ?*var2* = 456)"); ParseDefglobal(theEnv, buffer);
Is this possible?
Regards,
Rob
Use the Build function, Section 4.1.7 of the Advanced Programming Guide. In your function, you'd use either
Build(buffer);
or
EnvBuild(theEnv,buffer);
Log in to post a comment.
Hi,
I'm using CLIPS within a C program. I would like to define some defglobals directly from C via a buffer.
Something like this:
void *theEnv;
char buffer[1000];
theEnv = GetCurrentEnvironment();
sprintf(buffer, "(defglobal ?*var1* = 123 ?*var2* = 456)");
ParseDefglobal(theEnv, buffer);
Is this possible?
Regards,
Rob
Use the Build function, Section 4.1.7 of the Advanced Programming Guide. In your function, you'd use either
Build(buffer);
or
EnvBuild(theEnv,buffer);