Top "Prolog-toplevel" questions

The "toplevel" or "top level loop" is Prolog's REPL.

Prolog: Making a procedure to print Hello World

I want to load this simple something into my Editor: Write:-repeat,write("hi"),nl,fail. So that it prints "…

procedure swi-prolog prolog-toplevel
Prolog gives error "undefined procedure" when trying to use :-

I'm using SWI-Prolog on Windows and am getting the following error: 14 ?- parent(X, Y) :- child(Y, X). ERROR: …

prolog prolog-toplevel
SWI-Prolog - show long list

I'm using SWI-Prolog and I'm trying to print a list but if the list has more than 9 items - it …

prolog swi-prolog prolog-toplevel
Why is this prolog query both true and false?

My SWI-Prolog knowledge base contains the following two facts: f(a,b). f(a,c). Now if I pose the …

prolog swi-prolog prolog-toplevel
Make Prolog return one solution and stop showing the query option

I'm new to prolog, and am experimenting with how to get it to stop querying after it finds one answer. …

prolog format prolog-cut prolog-toplevel
Prolog anonymous variable

Here is what I have understood about Prolog variables. A single underscore stands for anonymous variable, which is like a …

prolog prolog-toplevel prolog-anonymous-variable
Implementing "last" in Prolog

I am trying to get a feel for Prolog programming by going through Ulle Endriss' lecture notes. When my solution …

list prolog prolog-toplevel