- int PL_action(int,
- Perform some action on the Prolog system. int describes the
action. Remaining arguments depend on the requested action. The actions
are listed below:
- Start Prolog tracer (trace/0).
Requires no arguments.
- Switch on Prolog debug mode (debug/0).
Requires no arguments.
- Print backtrace on current output stream. The argument (an
is the number of frames printed.
- Halt Prolog execution. This action should be called rather than Unix
exit() to give Prolog the opportunity to clean up. This call does not
return. The argument (an
int) is the exit code. See halt/1.
- Generate a Prolog abort (abort/0).
This call does not return. Requires no arguments.
- Create a standard Prolog break environment (break/0).
Returns after the user types the end-of-file character. Requires no
- Windows: Used to indicate to the kernel that the application is a GUI
application if the argument is not 0, and a console application if the
argument is 0. If a fatal error occurs, the system uses a windows
messagebox to report this on a GUI application, and otherwise simply
prints the error and exits.
- Same effect as using --traditional. Must be called
- Write the argument, a
char * to the current output stream.
- Flush the current output stream. Requires no arguments.
- Attach a console to a thread if it does not have one. See
- Takes an integer argument. If
TRUE, the GMP allocations are
immediately bound to the Prolog functions. If
SWI-Prolog will never rebind the GMP allocation functions. See
mp_set_memory_functions() in the GMP documentation. The action returns
FALSE if there is no GMP support or GMP is already
- unsigned int PL_version_info(int
- Query version information. This function may be called before
If the key is unknown the function returns 0. See section
2.22 for a more in-depth discussion on binary compatibility.
Versions upto SWI-Prolog 8.5.2 defined this function as PL_version().
It was renamed to avoid a conflict with Perl affecting
PL_version() is provided as a macro for compatibility. Defined
- SWI-Prolog version as 10,000 × major + 100 × minor +
- Incremented if the foreign interface defined in this chapter changes in
a way that breaks backward compatibility.
- Incremented if the binary representation of terms as used by
- Incremented if the QLF file format changes.
- Represents the oldest loadable QLF file format version.
- A hash that represents the VM instructions and their arguments.
- A hash that represents the names, arities and properties of all built-in
predicates defined in C. If this function is called before PL_initialise()
it returns 0.