Hallo, dieser Code lässt sich nicht übersetzen.
Habe ich irgend etwas vergesse anzugeben: Bibliotheken, . . . https://www.swi-prolog.org/pldoc/man?section=quickstart
?- likes(sam, X).
X = dahl ;
X = tandoori ;
…
X = chips.
Es passiert folgendes:
[user].
|: likes(sam,X).
Warning: user://1:8:
Singleton variables:
|: X = dahl;
|: X = tandoori;
|: X = chips.
ERROR: user://1:12:
No permission to modify static procedure `(;)/2’
Defined at /usr/lib/swi-prolog/boot/init.pl:209
|: ^D% user://1 compiled 0.01 sec, 1 clauses
true.
Auch wenn ich diesen File standardmäßig übersetze, komme ich zum Fehler.
Was Tun?
Gruß edsw
Note: In the next step you can use another directory that your login user has write access, just be consistent.
Note: The file will be a Prolog module. It is really better to start off using Prolog modules because if you eventually do production code you will need modules.