| { The Prolog engine that must prove the goal } ExtEvent._EngineId := Call^._EngineId; { Trinc-Prolog ID for an instance, if send to an instance, else assign 0 } ExtEvent._TPId := 0; { No instance to send it to } { Get the value of the first parameter and create a prolog query } s := 'prove(' + First^._Lexeme + ').'; { Allocate a buffer to store the Prolog goal in } ExtEvent._GoalPtr := TP_MEMALLOC( StrLen(PChar(s))+1 ); { Copy the goal to character array that will be send to Trinc-Prolog } StrPCopy(ExtEvent._GoalPtr, s); |