hn • r/hackernews
Comment on: Rethinking Prolog
I installed SWI prolog, and I can not figure out how to run the example code I found on the internet.Here's hello.pl: main :- write('This is a sample Prolog program'),
write(' This program is written into hello.pl file').
Trying to run hello.pl Welcome to SWI-Prolog (threaded, 64 bits, version 9.0.4)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
.
1 ?- [hello.pl].
ERROR: Type err