What does "?" Mean - means in the Prolog?

What does it mean ?- in Prolog?

eg:

 ?- consult(solve) 
+4
source share
2 answers

?- usually a top-level invitation or top-level shell; which is the place where you can ask queries and enter commands. It has similar functionality as the read-eval-print loop in other languages.

On some systems, this prompt is used or used as | ?- | ?- which is a more traditional invitation. This invitation comes from one of 1978's early Prolog systems, DECsystem 10 Prolog. The operating system request for input was | , and the user had to enter ?- X is 1+1. to enter a request.

+4
source

In the prologue-interpreter, you can request data (mainly executing prolog-scripts), the system answers yes or no. The interpreter signals with ?- that it is waiting for a request.

Example:

 ?- male(adam). yes. ?- male(eve). no. 

More details in the wikipedia article for him

+2
source

All Articles