Hi,
UWN wrote:
?- call((!,false->true;true)).
false, unexpected.
true. % expected, but not found. Works in 14 other systems.
Nope, I get:
/* Dogelog Player */
?- call((!,false->true;true)).
🚨 Fehler: Prädikat false/0 undefiniert.
user auf 1
But this here works:
/* Dogelog Player */
?- call((!,fail->true;true)).
true.
LoL
Bye
Hi,
Because Prolog has no false/0. It
only has fail/0, everything else is
Negation as Failure interpretation:
\+ P If the goal P has a solution, fail,
otherwise succeed. This is not real negation
("P is false"), but a kind of pseudo-negation
meaning "P is not provable". It is defined as if by
\+(P) :- P, !, fail.
\+(_).
https://userweb.fct.unl.pt/~lmp/publications/online-papers/DECsystem-10%20PROLOG%20USER%27S%20MANUAL.pdf
Bye
Mild Shock schrieb:
Hi,
UWN wrote:
?- call((!,false->true;true)).
false, unexpected.
true. % expected, but not found. Works in 14 other systems.
Nope, I get:
/* Dogelog Player */
?- call((!,false->true;true)).
🚨 Fehler: Prädikat false/0 undefiniert.
user auf 1
But this here works:
/* Dogelog Player */
?- call((!,fail->true;true)).
true.
LoL
Bye
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,073 |
Nodes: | 10 (0 / 10) |
Uptime: | 212:28:25 |
Calls: | 13,782 |
Calls today: | 1 |
Files: | 186,987 |
D/L today: |
4,570 files (1,250M bytes) |
Messages: | 2,434,557 |