error in generate template code

3 views
Skip to first unread message

John Hennessy

unread,
Jun 29, 2009, 10:21:06 AM6/29/09
to CLIPSESG
Using 6.3, and small system - one template, essentially (deftemplate
x (slot a) (slot b) (slot c)) - the generated code for struct
templateSlot omits the struct expr *facetList initializer, resulting a
a somewhat less than friendly compiler error. I've inserted NULL for
the values and things seem to run fine, but I know that is wrong on oh-
so-many levels.

CLIPS Support

unread,
Jul 22, 2009, 5:58:16 PM7/22/09
to CLIPSESG
You can fix this in the CLIPS source code in the SlotToCode function
in tmpltcmp.c, by adding the lines

fprintf(theFile,",");
PrintHashedExpressionReference(theEnv,theFile,theSlot-
>facetList,imageID,maxIndices);

after

fprintf(theFile,",");
PrintHashedExpressionReference(theEnv,theFile,theSlot-
>defaultList,imageID,maxIndices);
Reply all
Reply to author
Forward
0 new messages