A.2 Syntax

Common Prolog uses a Lisp-like syntax in which variables are prefixed with "?" and normal Lisp prefix notation is used. Goals are represented as either lists or simple vectors e.g.
(reverse (1 2 3) ?x) or #(member ?x (1 2 3))
. A symbol beginning with
?
may be escaped by prefixing another
?
.i.e.
?foo
is the variable named
foo
;
??foo
is the symbol
?foo
.