!TITLE Nested executions - break and abort
!KEY
The Prolog system provides a way to suspend the execution of your  program  and
to  enter  a new incarnation of the top-level where you can issue directives to
solve goals etc.  This is achieved using the evaluable predicate:

            break

The message:

            [ Break  (level 1) ]

will then be displayed.  This signals the start of a break-level and except for
the effect of aborts (see below), it is as if the interpreter was at top-level.
If break is called within a break-level, then another recursive break-level  is
started  (and  the  message  will  say  (level  2)  etc).   Break-levels may be
arbitrarily nested.

A ^Y (Control Y) character, signifying  end-of-file  from  the  terminal,  will
close the break-level and resume the execution which was suspended, starting at
the procedure call where the suspension took place.

To  abort  the  current  execution,  i.e.  to force an immediate failure of the
directive currently being executed at the  interpreter's  top-level,  call  the
evaluable  predicate  abort,  either  from  the  program  or  by  executing the
directive:

            | ?- abort.

within a break.  In this case no ^Y is needed to close the break,  because  ALL
break  levels are discarded and the system returns right back to top-level. The
"Int:a" interrupt (described above) can also be used to force an abort.
