Navigation  without Java Scripts

Open System

Visual Prolog programs can be easily interfaced with code from any other language that produces standard format object files, including Borland C and C++, Microsoft C and Assembler. Not only can Visual Prolog call routines written in other languages, but routines in other languages can also call Visual Prolog predicates, providing even non-Prolog programmers with access to a powerful logic-programming subsystem. This allows you to use each language where it is most appropriate, or simply to integrate existing modules from previous work.

Also, Visual Prolog programs can both call .DLL's and also be placed in .DLL's.

All non-Prolog procedures can be declared to the Prolog compiler as predicates, and PDC's argument type-checking helps guarantee safe and consistent call of foreign functions. Such declarations also form a reference document for coordinating a number of programmers in a multi-language project.

It is possible to call the foreign language routines directly (as if they were Prolog) without any special glue code by:

  1. declaring Global 'prolog' predicates as being of language C, Pascal, stdcall atc.   calling convention, 
  2. declaring the argument types and the input/output flow patterns,  

This interface works in both directions, when the predicates are being declared as language XX, they can be called directly from the XX language routines!

GLOBAL PREDICATES
  procedure LONG vpi_LoadDll( STRING ) - (I) language c
  procedure vpi_FreeDll( LONG ) - (I) language c
  procedure LONG vpi_GetDllProc( LONG, STRING ProcName ) - (I,I) language c