next up previous
Next: Compound Terms Up: Prolog Terms Previous: Numbers

Variables

A variable is:

The Prolog built-in predicate var/1 will tell you if a given term is or isn't a variable. It gives the following behaviour:

 
| ?- var(Foo).
     Foo=_125459 
yes
| ?- var(_).
yes
| ?- var(foo).
no



Dave Stuart Robertson
Tue Jul 7 10:44:26 BST 1998