Menu

#7 Provide find-indexed-fact function

CLIPS
closed
None
5
2025-01-27
2024-09-19
No

Provide a find-indexed-fact CLIPS function that exposes FindIndexedFact via a FindIndexedFactFunction that looks something like this:

void FindIndexedFactFunction(
  Environment *theEnv,
  UDFContext *context,
  UDFValue *returnValue)
  {
      Fact *fact;
      UDFValue theArg;
      UDFFirstArgument(context, INTEGER_BIT, &theArg);
      long long id = theArg.integerValue->contents;
       fact = FindIndexedFact(theEnv, id);
      if (fact) {
          returnValue->factValue = fact;
      }
  }

Discussion

  • Gary Riley

    Gary Riley - 2025-01-27

    Added a function called fact-index-to-fact to the 6.4.2 release.

     
  • Gary Riley

    Gary Riley - 2025-01-27
    • status: open --> closed
    • assigned_to: Gary Riley