संपादित
मैं कुछ और अधिक शोध किया। स्पष्ट रूप से यह है कि जब आप इसे एक uninstantiated चर के बारे में पूछते हैं तो एसडब्ल्यूआई-प्रोलॉग करता है।
$ 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)
?-
अद्यतन
लोअरकेस कार्यों के लिए नाम बदल रहा है। अपरकेस चर के लिए है:
helloworld.prolog:
helloworld:-write('Hello World!'),nl,fail.
तब:
$ 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.
?-
सूचना आपको पहले फ़ाइल से परामर्श करना है। मैंने कोशिश की और यह निश्चित रूप से काम करता है।
स्रोत
2010-03-31 20:33:43
वैसे, "त्रुटि संदेश" द हिचिकर गाइड टू द गैलेक्सी का संदर्भ है। – tloflin
मुझे पता है। मुझे उन किताबों से प्यार है, लेकिन मुझे वह संदेश बहुत गूंगा लगता है। यह एक मजबूर और अपमानजनक मजाक है। – andandandand
मजेदार हालांकि :) –