Prolog attempts to find a proof of your query. If your query has variables, it prints a value that makes them true.
Q: Are there any prime numbers that are even? A: Yes - 2 is even and prime
It'll keep giving you more proofs as long as you type ; Eventually it'll run out, and respond false.
Q: Are there any prime numbers that are even? A: Yes - 2 is even and prime Q: Are there any more? A: false.
What you want is for your program to perform output. There's a number of library predicates to do this. The most flexible is format/2
myprogram :-
my_old_program, !,
format('yup, that sure is right!~n', []).
myprogram :-
format('nope, nope, no way in heck!~n', []).