QP_action()

Synopsis

     #include <quintus/quintus.h>
     
     int QP_action(action)
     int action;
     

Called to request certain actions of Prolog.

Arguments

action is one of:


QP_ABORT
*Abort to the current break level
QP_REALLY_ABORT
*Abort to top level
QP_STOP
Stop (suspend) process
QP_IGNORE
Do nothing
QP_EXIT
Exit Prolog immediately
QP_MENU
Present action menu
QP_TRACE
Turn on trace mode
QP_DEBUG
Turn on debugging

Description

This function allows the user to make Prolog abort, exit, suspend execution, turn on debugging, or prompt for the desired action.

Calls to QP_action() from an interrupt handler must be viewed as requests. They are requests that will definitely be honored, but not always at the time of the call to QP_action(). If Prolog is in a critical region the action might be delayed to when it has exitted the critical region.

Return Value


QP_ERROR

QP_SUCCESS

Errors

For systems that do not have a toplevel, the actions marked with an asterisk (*) will have no effect other than to make QP_action() return QP_ERROR.

Examples

For a full discussion of QP_action() and examples of its use, see ref-iex-iha