function DLL_TPVersion: Integer
| func |
Return the version number of the current interface of the DLL. |
| pre |
TRUE |
| post |
The version number was returned. |
function DLL_TPInit: Integer
| func |
Initialize the Trinc-Prolog DLL. The instance handle of the DLL is used to
initialize it. |
| pre |
TRUE |
| post |
If the DLL was correct initialized then was TP_TRUE returned, else a
negative result code was returned. |
function DLL_TPInit( Instance: LongInt ): Integer
| func |
Initialize the Trinc-Prolog DLL with the supplied instance handle. |
| pre |
TRUE |
| post |
If the DLL was correct initialized then was TP_TRUE returned, else a
negative result code was returned. |
procedure DLL_TPExit
| func |
Stop using the Trinc-Prolog DLL. Any still present prolog engine instances
are deleted. |
| pre |
TRUE |
| post |
The DLL can no longer be used, all the allocated resources of the DLL were
released. |
procedure DLL_TPExit( Instance: LongInt )
| func |
Stop using the Trinc-Prolog DLL. The same Instance handle as used for
initialization is used to release the allocated resources. Any still present prolog engine
instances are deleted. |
| pre |
The same instance handle must have been used for initialization. |
| post |
The DLL can no longer be used, all the allocated resources of the DLL were
released. |
function DLL_TPNewEngine: Integer
| func |
Create a new prolog engine instance and initialize it. |
| pre |
The DLL must have been successfully initialized. |
| post |
The engine identifier of the new prolog engine instance was returned, if
there was an error then a negative error code was returned (< 0). |
procedure DLL_TPDeleteEngine( EngineId: Integer )
| func |
Delete the engine specified by the identifier "EngineId". |
| pre |
TRUE. |
| post |
The engine with the same identification number was deleted. |
function DLL_TPProve( EngineId:Integer; Goal:string ): Integer
| func |
Have the specified goal proven by the engine identified by
"EngineId". |
| pre |
The parameter "Goal" may not be NULL. |
| post |
If the goal was proven successfully and a solution was found was
TP_SOLUTION returned, if the goal failed then was TP_FAIL returned, else one of the
following error codes: "TPERROR_INCORRECT_GOAL",
"TPERROR_UNKNOWN_ENGINE" or "TPERROR_PROVE" was returned. |
function DLL_TPContinue( EngineId: Integer ): Integer
| func |
Continue proving the current goal of the engine until the next solution. |
| pre |
A solution must have been found by a previous call to the function Prove. |
| post |
If the goal was proven successfully and a solution was found was
TP_SOLUTION returned, if the goal failed then was TP_NO returned, else one of the
following error codes: "TPERROR_INCORRECT_GOAL",
"TPERROR_UNKNOWN_ENGINE" or "TPERROR_PROVE" was returned. |
function DLL_TPNumVars( EngineId: Integer ): Integer
| func |
Retrieve the number of variables in the last solution found by the
specified engine. |
| pre |
A solution was found. |
| post |
The number of variables was returned, if the engine was not found then
TPERROR_UNKNOWN_ENGINE was returned, else the number of variables was returned. |
function DLL_TPVarName( EngineId, Index: Integer ): pchar
| func |
Get the name of the specified variable of the last solution generated by
the engine identified by "EngineId". |
| pre |
A solution was found AND "Index" >= 0 AND "Index"
< "NumVars". |
| post |
If the variable was found then the name of it was returned, else was NIL
returned. To store the name of the variable create a copy of the returned character
string. |
function DLL_TPVarValue( EngineId, Index: Integer ): pchar
| func |
Get the value of the specified variable of the last solution generated by
the engine identified by "EngineId". |
| pre |
A solution was found AND "Index" >= 0 AND "Index"
< "NumVars". |
| post |
If the variable was found then the value was returned, else was NIL
returned. To store the value of the variable create a copy of the returned character
string. |
function DLL_TPVarType( EngineId, Index: Integer ): Integer
| func |
Get the type of the value of the specified variable of the last solution
generated by the engine identified by "EngineId". |
| pre |
A solution was found AND "Index" >= 0 AND "Index"
< "NumVars". |
| post |
If the variable was found then the type of the value was returned, else
was TPTYPE_UNKNOWN returned. The following type constants are defined:
TPTYPE_UNKNOWN = No value or unknown type.
TPTYPE_EMPTYLIST = An empty list.
TPTYPE_LIST = A list with elements.
TPTYPE_EMPTY = An empty variable.
TPTYPE_INTEGER = An integer number value.
TPTYPE_FLOAT = A floating point value.
TPTYPE_STRUCTURE = A structure value.
TPTYPE_ATOM = An atom value. |
procedure DLL_TPPutDLLSettings( AppName, AppVersion, AppHelpFile, AppCopyright,
AppCompanyName: string )
| func |
Set the name, version, help file name, copyright message and company name
of the application. These values are displayed if the user, for instance opens the About
dialog from inside a TPWin application being interpreted by the Trinc-Prolog DLL. |
| pre |
Any of the parameters may be NIL. |
| post |
The supplied values were stored. |
| remark |
There is another version of this procedure that uses the pchar type
instead of the string type for the parameters, this version of the function is called
DLL_TPPutSettings. |
|