Commands That Change The Flow Of Control

The debugger also has these commands that alter the flow of control of your program.


retry
This can be used at any of the seven ports (although at the Call port it has no effect). Control is transferred back to the Call port of the box. It allows you to restart an invocation when, for example, you find yourself leaving with some incorrect result. The state of execution is exactly the same as when you originally called the procedure, except that clauses that have been changed by the database modification predicates will not be changed back to their original state.
fail
This is similar to Retry except that it transfers control to the Fail port of the current box. It places your execution in a situation in which it is about to backtrack out of the current invocation, having failed the goal.