Re: retrieve functor name knowing its parameters

Paulo Moura <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 20/11/2013, at 21:24, adnan <[email protected]> wrote:

> How I can retrieve functor name knowing its parameters , my functors are
> dynamic and not staic I tried this code Fun=..[Functor,1,2],call(Fun). But I
> got error of not sufficient instanciation .Is there another possible way to
> have it?

By using the standard current_predicate/1 predicate? Maybe also the predicate_property/2 standard predicate? Check the documentation on these predicates.

Cheers,

Paulo

-----------------------------------------------------------------
Paulo Moura
Logtalk developer

Email: <mailto:[email protected]>
Web:   <http://logtalk.org/>
-----------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.