Directives  are  either  commands or questions.  Both are ways of directing
the system to execute some goal or goals.

Suppose list membership has been defined by:-

     member(X, [X, .._]).
     member(X, [_, ..L]) :- member(X, L).

Note the use of anonymous variables written "_".  The command:-

                         member(3,[1,2,3]), print(yes)!

directs the system to check whether 3 belongs to the list [1, 2, 3], and to
output  "yes"  if so.  Execution of a command terminates when all the goals
in   the  command  have  been  successfully  executed.   Other  alternative
solutions  are  not sought; one may imagine an implicit "cut" at the end of
the command.  If no solution can be found, the system simply returns with a
prompt.

The  syntax of a question is the same as a command, except that it is ended
by  "?" instead of "!" If the specified goal(s) can be satisfied, the final
value  of  each  distinct  variable  is  displayed  (except  for  anonymous
variables).

The outcome of some questions is shown below.

     member(X, [tom, dick, harry])?
     X = tom
     X = dick
     X = harry

     member(X, [a, b, f(Y, c)]), member(X, [f(b, Z), d])?
     Y = b
     X = f(b,c)
     Z = c

     member(X, [f(_), g])?
     X = f(_)
     X = g


It  is  also  possible  to  ask a question which involves no variables, for
example,
                               member(3,[1,2,3])?

If  the  goal  is satisfied, as would be the case in this example, then the
system responds
                                     ** yes

If  the  goal  can  be  satisfied  in  more  than one way, this response is
repeated.  For example, the question

                            member(1, [1,2,3,1,1])?

would result in the response
                                     ** yes
                                     ** yes
                                     ** yes

If the goal is not satisfied, the system responds with "** no".

Note:   For compatibility with Prolog-10 the prefix operators ":-" and "?-"
may also be used for commands and queries.
