There exist more drastic means of interrupting the normal control flow. To invoke a recursive top-level, use:
To exit from Prolog, use:
To exit from Prolog with return code Code, use:
To abort the execution of the current query and return to the top-level, use:
abort/0are implemented by throwing a reserved exception, which has a handler at the top-level of development systems and executables built with the spld tool. Thus they give the opportunity for cleanup goals (see
call_cleanup/2) to run.