fail
BAP Online Manuals : Library
Reference : Library by Name
: fail
Previous: exit
Next: file_str
BAP Online Manuals : Library Reference : Library by Name : fail
Previous: exit
Next: file_str
Previous: exit
Next: file_str
6.2.49. fail
always fails
SYNOPSIS
fail !,fail
SYNTAX
fail
ARGUMENTS
(none)
DESCRIPTION
This is a standard PROLOG predicate. It never succeeds, thus causes backtracking to start. Fail may be used to program endless loops, or in combination with ' ! (cut) ' causes a predicate to definitely fail.
EXAMPLE
member(X,[a,b,c]), write(X),nl, fail.
member(X,[a,b,c,ende,d,e]), write(X),nl, X = ende,!,fail.
ERRORS
No runtime errors.
LAYERS
prolog-process, client-server, object
RELATED PREDICATES
BAP Online Manuals : Library Reference : Library by Name : fail
Previous: exit
Next: file_str