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?
...
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?