Re: Lost value.



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.

.