users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variable heads of terms


From: Cliff Bender
Subject: Re: variable heads of terms
Date: Tue, 14 Feb 2006 17:56:15 -0500

Everyone,

It works! Thank you for your prompt help! I appreciate it very much.

Thank you again,
CB

On 2/14/06, Gregory Bourassa <address@hidden> wrote:
> Cliff,
>
> I think you are looking for something like the "univ" operator of the
> form:
>
>         Term =.. List
>
> example:
>
>         Term =.. [reads,tom,book]
>
> after which Term is bound to reads(tom,book).
>
> It can both compose and decompose terms.
>
> Regards.
>
> Gregory Bourassa
>
> On Tue, 14 Feb 2006 12:13:54 -0500, Cliff Bender wrote:
>
> >Hello
> >
> >I'd like to be able to do something like the following:
> >
> >X=reads, FACT=X(tom,book).
> >
> >is there anything that will allow me to do this? Unfortunately, the
> >previous code gives the following error:
> >
> >| ?- X=reads, FACT=X(tom,book).
> >uncaught exception: error(syntax_error('user_input:12 (char:16) . or
> >operator expected after expression'),read_term/3)
> >
> >Thanks for any help you can provide!
> >
> >CB
> >
> >
> >_______________________________________________
> >Users-prolog mailing list
> >address@hidden
> >http://lists.gnu.org/mailman/listinfo/users-prolog
> >
>
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]