| tests whether the argument is a variable.
var(+Term)
var/1 succeeds if Term is a variable otherwise it fails.
Arguments
Term term
Examples
| var(Variable). |
Succeeds. |
| var(X), X=f(a,b). |
Succeeds. |
| X=f(a,b), var(X). |
Fails. |
| var(ab). |
Fails.
|
Standard
This predicate is part of the ISO-Prolog Standard.
See also
atom/1,
atomic/1,
compound/1,
float/1,
integer/1,
nonvar/1,
number/1.
|