| succeeds if the goal fails and fails if the goal succeeds.
\+(+Goal)
\+ +Goal
'\+'/1 makes negation by failure. That means it succeeds if
Goal fails and fails if Goal succeeds.
Arguments
Goal goal
Examples
| \+fail. |
Succeeds. |
| \+integer(4.76) |
Succeeds. |
| \+((X=either;X=or)),X=neither_nor |
Fails. |
Standard
This predicate is part of the ISO-Prolog Standard.
See also
abort/0,
break/0,
call/1,
fcall/1,
catch/3,
','(conjunction)/2,
'!'(cut)/0,
';'(disjunction)/2,
fail/0,
true/0,
halt/0/1,
'->'(if-then)/2,
';'(if-then-else)/2,
once/1,
repeat/0,
throw/1.
|