[Up] [Contents] [Index] [Summary]

5.6.12 Environment Control from Foreign Code

int PL_action(int, C_type)
Perform some action on the Prolog system. int describes the action, C_type provides the argument if necessary. The actions are listed in table 6.

PL_ACTION_TRACEStart Prolog tracer
PL_ACTION_DEBUGSwitch on Prolog debug mode
PL_ACTION_BACKTRACEPrint backtrace on current output stream. The argument (an int) is the number of frames printed.
PL_ACTION_HALTHalt Prolog execution. This action should be called rather than Unix exit() to give Prolog the opportunity to clean up. This call does not return.
PL_ACTION_ABORTGenerate a Prolog abort. This call does not return.
PL_ACTION_BREAKCreate a standard Prolog break environment. Returns after the user types control-D.
PL_ACTION_SYMBOLFILEThe argument (a char *) is considered to be hold the symbolfile for further incremental loading. Should be called by user applications that perform incremental loading as well and want to inform Prolog of the new symbol table.

Table 6 : PL_action() options