[ ECLiPSe Predicate Database built-in.|Group Index| Full Index]

current_built_in(?PredSpec)

Succeeds if the predicate defined by PredSpec is a visible built-in predicate.

?PredSpec
Expression of the form Atom/Integer or variable.

Description

Used to check that PredSpec is a built-in predicate visible from the caller module, or else to return on backtracking all the visible built-in predicates.

Fail Conditions

Fails if the predicate defined by PredSpec is not a visible built-in predicate.

Resatisfiable

Yes.

Exceptions

(5) Type error
PredSpec is instantiated, but not to the form Atom/Integer.

Examples


Success:
     [eclipse]: current_built_in(X/Y),!.
     X = findall
     Y = 3
     yes.

     [eclipse]: current_built_in(X).
     X = findall / 3     More? (;)
     X = ! / 0     More? (;)
     X = delayed_goals / 1     More? (;)
     X = delayed_goals / 2     More? (;)   % type <cr>
     yes.
Fail:
     current_built_in(assertz/1).
     current_built_in(reverse/2).

     [eclipse]: [user].
      p.
      user compiled 28 bytes in 0.00 seconds
     yes.
     [eclipse]: get_flag(p/0, type, T).
     T = user
     yes.
     [eclipse]: current_built_in(p/0).
     no.
Error:
     current_built_in(a/a).         (Error 5).


See Also

current_predicate / 1, is_built_in / 1, is_predicate / 1