next up previous contents index
Next: Querying Prolog Up: The Foreign Include File Previous: Errors and warnings   Contents   Index

Environment Control from Foreign Code

intPL_actionint, ... Perform some action on the Prolog system. int describes the action, Remaining arguments depend on the requested action. The actions are listed in action.


Table: PL_action options
PL_ACTION_TRACE Start Prolog tracer (trace0). Requires no arguments.
PL_ACTION_DEBUG Switch on Prolog debug mode (debug0). Requires no arguments.
PL_ACTION_BACKTRACE Print backtrace on current output stream. The argument (an int) is the number of frames printed.
PL_ACTION_HALT 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 halt1.
PL_ACTION_ABORT Generate a Prolog abort (abort0). This call does not return. Requires no arguments.
PL_ACTION_BREAK Create a standard Prolog break environment (break0). Returns after the user types the end-of-file character. Requires no arguments.
PL_ACTION_GUIAPP Win32: Used to indicate 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 simply prints the error and exits otherwise.
PL_ACTION_WRITE Write the argument, a char * to the current output stream.
PL_ACTION_FLUSH Flush the current output stream. Requires no arguments.



next up previous contents index
Next: Querying Prolog Up: The Foreign Include File Previous: Errors and warnings   Contents   Index
Dr. Richard Botting 2001-12-12