Hello, World in the interactive interpreter
To print "Hello, World!" in the Prolog interpreter (here we are using swipl, the shell for SWI Prolog):
$ swipl
<...banner...>
?- write('Hello, World!'), nl.
?- is the system prompt: it indicates that the system is ready for the user...