Library support for linking foreign code

The Structs and Objects packages (see str and obj) allow Prolog to hold pointers to C data structures and arrays and access and store into fields in those data structures in a very efficient way.

Support for translating between Prolog terms and C data structures is provided by library(terms) and lists can be mapped to C arrays with library(vectors). These are useful when you want to pass a complete copy of the data structure over to the other language. If you only want to access parts of a structure then the Structs and Objects packages are recommended.