var 
  Arg1, Arg2, Arg3: P_TPARGUMENT;
begin

{ Check if the correct version }
if Version <> TP_EXTERNAL_VERSION then
  begin
  Result := TP_HALT; { Return HALT because incorrect version }
  Exit;
end;

{ Check the arity of the prolog predicate }
if Call^._Arity <> 3 then
begin
  Result := TP_UNKNOWN; {Not mul/3, so return UNKNOWN predicate }
  Exit;
end;

{ Get the parameters }
Arg1 := First;
Arg2 := Arg1^._Next;
Arg3 := Arg2^._Next;

 

 

info@trinc-prolog.com