projog

3.11. nonvar(X) - checks that a term is not an uninstantiated variable.

nonvar(X) succeeds if X is not an uninstantiated variable.

Examples

?- nonvar(abc).

yes

?- nonvar(1).

yes

?- nonvar(a(b,c)).

yes

?- nonvar([a,b,c]).

yes

?- X=1, nonvar(X).
X = 1

yes

?- nonvar(X).

no

?- X=Y, nonvar(X).

no

?- nonvar(_).

no