call, ..= operator, records (newbie)
- From: "levilista@xxxxxxxxx" <levilista@xxxxxxxxx>
- Date: Wed, 21 May 2008 04:30:30 -0700 (PDT)
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.
.
- Follow-Ups:
- Re: call, ..= operator, records (newbie)
- From: Martin Riener
- Re: call, ..= operator, records (newbie)
- From: levilista@xxxxxxxxx
- Re: call, ..= operator, records (newbie)
- Prev by Date: large databases
- Next by Date: Re: call, ..= operator, records (newbie)
- Previous by thread: large databases
- Next by thread: Re: call, ..= operator, records (newbie)
- Index(es):