Re: assigning constant to variable
- From: none <kaizer@xxxxxxx>
- Date: Sun, 28 May 2006 19:13:02 +0100
Hello,
just found a way to do this.
findname(X, 0, [X|S).
Thanks.
none wrote:
Hello,.
What's the way to assign a constant value to a variable?
ERROR: is/2: Arithmetic: `lady/0' is not a function
This is after calling a functor like
/*
R is result,
P is position,
S is set
*/
findname(R, 0, [X|S]) :-
R is X.
The set is filled with constants. Example:
[lady, in, red]
Thanks.
- References:
- assigning constant to variable
- From: none
- assigning constant to variable
- Prev by Date: Please help me... term_expansion/2 and goal_expansion/2 under SWI
- Next by Date: "Undefined procedure" error
- Previous by thread: assigning constant to variable
- Next by thread: Please help me... term_expansion/2 and goal_expansion/2 under SWI
- Index(es):