Navigation  without Java Scripts

Using Visual Prolog DLLs from Borland Delphi

The directory \Foreign\Examples\Delphi contains examples of how to use a Dynamic Link Library (DLL) created with Visual Prolog in Borland Delphi (see Using Visual Prolog DLLs from other languages for an overview of the examples).

All these examples use the same Visual Prolog DLLs that are found in the DLLS directory, so these have to be compiled before any of the examples are compiled and run.

These examples should be compiled with Borland Delphi 3.0 or later.

Notes for Delphi

Please also read the common notes.

The type of the import function in the Delphi code should be:
procedure - if the predicate does not have a return value, and
function - if the predicate has a return value
 

The following table maps Visual Prolog types to Delphi types:

Visual Prolog Delphi
integer Integer
real Double
long Longint
string Pchar

Output arguments corresponds to var arguments of appropriate types, example:

Visual Prolog Delphi
getReal(real) - (o) getReal(var OutReal: Double)

A Visual Prolog structure corresponds to a record in Delphi, and record arguments are var arguments to appropriate record types.

Examples

NONGUI: Delphi project uses a non-GUI Visual Prolog DLL.

USEVPI: Delphi project uses a Visual Prolog DLL with VPI.