Next Previous Up Top Contents Index

1 Introduction to the FLI

1.1 A simple example of how to interface a foreign function

The following example shows how to use the FLI to call a C function. The function to interface with,FarenheitToCelsius, takes one integer as its argument (the temperature in Farenheit) and returns the result as a single float (the temperature in Celsius).

The example consists of three stages: defining a foreign language interface to the C function, loading the foreign code into the Lisp image, and calling the C function to obtain the results.

1.1.1 - Defining the FLI function
1.1.2 - Loading foreign code
1.1.3 - Calling foreign code

LispWorks Foreign Language Interface - 12 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker