Re: Lost value.
- From: Trap D <joel.foutelet@xxxxxxx>
- Date: Tue, 06 Nov 2007 11:28:45 -0800
On 6 nov, 16:22, Wit Jakuczun <w...@xxxxxxxxxxxxx> wrote:
Dnia Tue, 06 Nov 2007 07:14:08 -0800
Trap D <joel.foute...@xxxxxxx> napisa³(a):
Hi everyone.
I use SWI-Prolog version 5.6.27.
Here is my code :
go :-
write('y or n : '),
read(X),
% Here I get what I wrote
writeln(X),
X == y, writeln(yes);
% Here, the value is lost
writeln(X), writeln(no).
Why do I obtain this ?
Because of ; I think.
You could try using if-then-else construction.
Best regards
--
[ Wit Jakuczun <W.Jakuczun [at] wlogsolutions.com> ]
[ WLOG Solutions http://www.wlogsolutions.com]- Masquer le texte des messages précédents -
- Afficher le texte des messages précédents -
I tried, it's the same thing.
.
- Follow-Ups:
- Re: Lost value.
- From: Wit Jakuczun
- Re: Lost value.
- References:
- Lost value.
- From: Trap D
- Re: Lost value.
- From: Wit Jakuczun
- Lost value.
- Prev by Date: Re: Lost value.
- Next by Date: Re: Lost value.
- Previous by thread: Re: Lost value.
- Next by thread: Re: Lost value.
- Index(es):