Re: Floyd warshall
- From: andrea <kerny404@xxxxxxxxx>
- Date: Fri, 31 Aug 2007 01:44:29 -0700
On 31 Ago, 09:17, Bart Demoen <b...@xxxxxxxxxxxxxxxxx> wrote:
andrea wrote:
I tried with a very small example
prova(X,Y) :-
dist(X,Y,Z), Z > 2 ->
write('maggiore'); write('minore'),write(Z).
?- prova(0,1).
minore_L136
So in the "else branch" Z is not unified anymore, why?? I dont' find a
suitable explanation..
How can I translate this little piece of code?
Suppose you had written (sorry for my indentation, I hope it is still readable to you)
f(X) :-
(test(X) ->
true
;
write(X)
).
test(foo) :- fail.
What value would you like to see on the output ?
Cheers
Bart Demoen
In this case nothing, but my test is not true, so it should enter in
the else branch, am I missing something??
.
- Follow-Ups:
- Re: Floyd warshall
- From: bart demoen
- Re: Floyd warshall
- From: andrea
- Re: Floyd warshall
- References:
- Re: Floyd warshall
- From: andrea
- Re: Floyd warshall
- From: andrea
- Re: Floyd warshall
- From: andrea
- Re: Floyd warshall
- From: andrea
- Re: Floyd warshall
- From: Bart Demoen
- Re: Floyd warshall
- Prev by Date: Re: how to rename variables?
- Next by Date: Re: how to rename variables?
- Previous by thread: Re: Floyd warshall
- Next by thread: Re: Floyd warshall
- Index(es):
Relevant Pages
|
|