tests whether the argument is a variable.
var/1 succeeds if Term is a variable otherwise it fails.
Term term
| var(Variable). | Succeeds. |
| var(X), X=f(a,b). | Succeeds. |
| X=f(a,b), var(X). | Fails. |
| var(ab). | Fails. |
This predicate is part of the ISO-Prolog Standard.
| scroll to top |
|