sets a backtrack point
getbacktrack(handle)
cutbacktrack(BackTrackPoint) (i)
handle(BackTrackPoint) (i) A virtual handle to be used with cut().
Together with cut () this predicate may be
used to effect backtracking. Its effect is, that when backtracking takes place
back to the cut() goal, the execution flow takes a short-cut back to the position
where the associated getbacktrack() goal was done.
Instead of using set_cut() and cut() you may also use getbacktrack
() and cutbacktrack () to achieve
the same purpose. set_cut()/cut() are more comfortable in a way that you may
use virtual handle, but they work sufficiently slower.
repeat, set_cut(start), for(1,5,X), write(X), X = 3, cut(start), fail.
This will cause the following output: 123123123 ...
A runtime error in case of misuse of virtual handles. However, misuse may crash the system.
prolog-process, client-server, object
! , cut , cutbacktrack , getbacktrack