Re: call, ..= operator, records (newbie)



On May 21, 4:04 pm, Martin Riener <e9927...@xxxxxxxxxxxxxxxxxxxx>
wrote:
levili...@xxxxxxxxx wrote:
I define a 'toy predicate' plus:

plus(X,Y):- Y is X+1.

Then I try the following:

24 ?- F=plus,F(2,X).
ERROR: Syntax error: Operator expected
ERROR: F=plus,F(2,X
ERROR: ** here **
ERROR: ) .

Why do I get an error here?
I know it can be solved with the introduction of a new variable (see
below) , but I'm just curious why.

26 ?- F=plus,X=..[F,2,Z], call(X).
F = plus,
X = plus(2, 3),
Z = 3.

:- X=..[plus,2,Y], X.

works for me too (swi)... as for why higher order predicates have to be
explicit, i am too unaware of the context of the
creation/standardisation of the language. i guess that seperate
atom/function/predicate spaces play a role in this, but perhaps some of
the prolog implementors on the list could help us out?

greetings Martin

Thanks.
.



Relevant Pages

  • RE: How do I use the INSERT INTO Statement in VBA?
    ... When the fields name contain two seperate names you need to put then in ... > Syntax error in INSERT INTO Statement. ... Prev by Date: ...
    (microsoft.public.access.modulesdaovba)
  • RE: How do I use the INSERT INTO Statement in VBA?
    ... "Ofer" wrote: ... > When the fields name contain two seperate names you need to put then in ... >> Syntax error in INSERT INTO Statement. ... Prev by Date: ...
    (microsoft.public.access.modulesdaovba)
  • Re: call, ..= operator, records (newbie)
    ... ERROR: Syntax error: Operator expected ... as for why higher order predicates have to be explicit, i am too unaware of the context of the creation/standardisation of the language. ... i guess that seperate atom/function/predicate spaces play a role in this, but perhaps some of the prolog implementors on the list could help us out? ...
    (comp.lang.prolog)
  • Re: PARAMETER C_SPLIT error
    ... Olaf wrote: ... This looks like a syntax error. ... a seperate line. ... Best regards, ...
    (comp.arch.fpga)