
call(+Goal, +Module)

   Succeeds if Goal (which is visible in module Module) succeeds.



Arguments
   Goal                Atom or compound term.
   Module              Atom.

Type
   Obsolete

Description
   Calls a goal Goal from the module Module.  This predicate is used to
   call goals whose functors and visibility are known only at the time they
   are called.  It may be used to implement tool bodies.


   Note that !/0 does not cut through call/2.




Fail Conditions
   Fails if Goal fails

Resatisfiable
   Resatisfiable if Goal is resatisfiable

Exceptions
     4 --- Goal is not instantiated.
     4 --- Module is not instantiated.
     5 --- Goal is neither an atom nor a compound term.
     5 --- Module is not an atom.
    68 --- Goal is an undefined procedure in Module.

Examples
   
Success:
      [eclipse]: [user].
       :-module(m).
       p.
       user        compiled 28 bytes in 0.00 seconds
      yes.
      [eclipse]: p.
      calling an undefined procedure p in module eclipse
      [eclipse]: call(p, m).
      yes.

Fail: call(fail, any).

Error:
      call(Var,eclipse).                (Error 4).
      call(ls,Var).                     (Error 4).
      call("write(a)",eclipse).         (Error 5).
      call(foo(a),eclipse).             (Error 68).





See Also
   call / 1, @ / 2, : / 2
