next up previous
Next: Disjunction Up: prolog Previous: Interactive Definitions

Logical Operators

a :- b. /* a if b */
a :- b,c. /* a if b and c. */
a :- b;c. /* a if b or c. */
a :- \++ b. /* a if b is not provable */
a :- not b. /* a if b fails */
a :- b -> c;d. /* a if (if b then c else d) */