12.3.42 SP_initialize() [macro]

Synopsis

     #include <sicstus/sicstus.h>
     
     int
     SP_initialize(int argc,
     	      char **argv,
     	      void *reserved);

Initializes the Prolog engine.

Arguments

argc
The number of elements of the argv vector.
argv
A vector of strings that can be accessed by prolog_flag(argv,X).
reserved
Should be NULL

Return Value

SP_SUCCESS if initialization was successful. If initialization was successful, further calls to SP_initialize() will be no-ops (and return SP_SUCCESS).

Description

This must be done before any interface functions are called, except those annotated as [preinit]. The function will allocate data areas used by Prolog, initialize command line arguments so that they can be accessed by the argv Prolog flag, and load the Runtime Library.

See Also

Initializing the Prolog Engine.


Send feedback on this subject.