As already mentioned earlier, external predicates can also be suspended. The macro
is used to mark a variable which is not instantiated and therefore responsible for suspending a call. var is a pointer to the variable. If this macro is used in a normal external predicate which itself will delay, it must return to the system using the macroMark_Suspending_Variable(var)
Delay
For example, we could define a predicate atomd/1 which is like atom/1 but instead of failing it delays if its argument is not instantiated:
p_atomd(v1, t1) value v1; type t1; { if (IsRef(t1)) { Mark_Suspending_Variable(v1.ptr); Delay; } else Succeed_If(IsAtom(t1)); }