object(candle,red,small,1).
object(apple,red,small,1).
object(apple,green,small,1).
object(table,blue,big,50).
location_s(object(candle,red,small,1),kitchen).
location_s(object(apple,red,small,1),kitchen).
location_s(object(apple,green,small,1),kitchen).
location_s(object(table,blue,big,50),kitchen).
list_things_s(Place):-
location_s(object(Thing,Color,Size,Weight),Place),
write('A'),tab(1),write(Size),tab(1),
write(Color),tab(1),
write(Thing),write(' weighing'),tab(1),
write(Weight),tab(1),write(' pounds'),nl,fail.
list_things_s(_).
=====================================================
consult(kitchen).
list_things_s(kitchen).
No comments:
Post a Comment