Re: Getting status of a free variable.
- From: "andrea" <kerny404@xxxxxxxxx>
- Date: 12 Dec 2006 05:27:43 -0800
Yes thank you very much, nonvar/1 was the answer :)
On 12 Dic, 14:01, "Mauro Di Nuzzo" <pico...@xxxxxxxxx> wrote:
I didnt read it carefully. So it seems that the only thing you need is the
predicate nonvar/1, that is
sillabo(Word,[H| T]) :-
nonvar(H), !, ...
sillabo(Word,[H|T]) :- ....
"Mauro Di Nuzzo" <pico...@xxxxxxxxx> ha scritto nel messaggionews:457ea77e$0$4251$4fafbaef@xxxxxxxxxxxxxxxxxxxxxx
I dont know if I understood exactly, but it seems to me that you have just
to invert clauses, that is:
sillabo(Word,[Last,Current | T]) :-
nonvar(Last), !, ...
sillabo(Word,[H|T]) :- ....
Cheers
/\/\
"andrea" <kerny...@xxxxxxxxx> ha scritto nel messaggio
news:1165924229.460939.58060@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello everyone,
Maybe it's very easy but I don't find anywhere a solution.
I need to know if a free variable is unified with any kind of value,
for example:
sillabo(Word,[H|T]) :- ....
sillabo(Word,[Last,Current | T]) :- ...
I want it to go to the second goal only if the actual list has already
a Last element that's unified with a value.
I'm sorry for my english and my prolog dictionary...
I'll try to be clearer if you don't understand my problem.
.
- References:
- Getting status of a free variable.
- From: andrea
- Re: Getting status of a free variable.
- From: Mauro Di Nuzzo
- Re: Getting status of a free variable.
- From: Mauro Di Nuzzo
- Getting status of a free variable.
- Prev by Date: Re: Getting status of a free variable.
- Next by Date: Syntax Error in GNU Prolog 1.2.16
- Previous by thread: Re: Getting status of a free variable.
- Next by thread: Out of stack problem
- Index(es):
Relevant Pages
|
|