Why doesn't gnu prolog support the "false" predicate? (I've changed to swi)
I've bee开发者_开发知识库n using the gprolog thingy to do some things in prolog. But now when testing some more code I discovered that it does not support "false". Which is supported by swi?
Use fail
instead of false
. I believe the former is in the ISO standard for Prolog. Otherwise, define it yourself:
false :- 0=1.
or
fail :- 0=1.
Recent versions of GNU Prolog (1.4.0) do support false/0
.
false/0
is not defined in the original ISO standard of 1995, but is part of Cor.2:2012.
精彩评论