EDIT
zrobiłem kilka badań. Najwyraźniej tak właśnie robi SWI-Prolog, gdy pytasz go o nieprzypisaną zmienną.
$ prolog
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.6.64)
Copyright (c) 1990-2008 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- X.
% ... 1,000,000 ............ 10,000,000 years later
%
% >> 42 << (last release gives the question)
?-
UPDATE
Zmiana nazwy do utworów małe. Wielkie jest dla zmiennych:
helloworld.prolog:
helloworld:-write('Hello World!'),nl,fail.
Następnie:
$ prolog
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 5.6.64)
Copyright (c) 1990-2008 University of Amsterdam.
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- ['helloworld.prolog'].
% helloworld.prolog compiled 0.00 sec, 1,376 bytes
true.
?- helloworld.
Hello World!
false.
?-
Zauważ, że trzeba najpierw skonsultować plik. Wypróbowałem to i działa na pewno.
Nawiasem mówiąc, ten "komunikat o błędzie" jest odniesieniem do przewodnika autostopowicza do galaktyki. – tloflin
Wiem. Uwielbiam te książki, ale uważam, że wiadomość jest dość głupia. To wymuszony i obraźliwy dowcip. – andandandand
Śmieszne jednak :) –