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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I see multiple answears 1

Status
Not open for further replies.

puntito

Programmer
Mar 22, 2006
18
In my program I have this:
...
ent(6):- write("Cities"),nl,write("Write a State to know its information: "),nl,
readln(State),cities(State,Stt).

cities(State,Stt):- state(State,_,_,_,_,Stt),
list (Stt,lists).

If a use
goal
cities(State,Stt).

The result es a list of the information of one or all the states, depending on the value of State.
...
State=zacatecas, Stt=villa_de_guadalupe
State=zacatecas, Stt=fresnillo
State=zacatecas, Stt=sombrerete
State=zacatecas, Stt=loreto
434 Solutions


But if i use
goal
ent(6).

The only result is a "yes", because I think it match with the entity.
...
Write a State to know its information:
zacatecas
Yes

Why I can`t see the resulting list?
What do I have to do to see all the results?
 
Hello.
If ent(6) is changed into ent(State, Stt), what will happen?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top