[ Type Testing | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

meta(?Var)

Succeeds if Var is an attributed variable.
Var
Prolog term.

Description

Used to test whether Var is an attributed variable.

CAUTION: this test only detects the presence of any attribute, which is usually not what is required. It is more common to check for the presence of a particular attribute by using a matching clause of the form:

    has_my_attribute(_{my_attr:Attr}) ?-
    	nonvar(Attr).

Modes and Determinism

Fail Conditions

Fails if Var is not an attributed variable

Examples

Success:
      meta(X{a}).
      suspend:(X>0), meta(X).

Fail:
      meta(atom).
      meta(X).



See Also

free / 1, type_of / 2, var / 1