Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another Question (write does not appear)

Status
Not open for further replies.

Tenes

IS-IT--Management
Mar 26, 2010
6
GR
Hello,

I just want to know If it's a way to print the Ok.
I cant understand why it doesnt show up.
---------------------------------------------------------
testpass(test,test,blue,ten,zer,ben).

start:- write('username:'),
read(A),nl,

write('password :'),
read(B),nl,
number(0).

number(0):-
writeln('Favourite colour:'),
read(C),
testpass(Dbusername,Dbpassword,Colour,_,_,_),
A==Dbusername,
B==Dbpassword,
C==Colour,
write('Ok').
-----------------------------------------------------------
1 ?- start.
username:test.

password :test.

true.
-----------------------------------------------------------
Thanks
 
A is not bound, neither B in number(0), so A == Dbusername fails.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top