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,075 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 94:28:46 |
| Calls: | 13,798 |
| Calls today: | 1 |
| Files: | 186,989 |
| D/L today: |
6,265 files (1,782M bytes) |
| Messages: | 2,438,400 |