1
코드에서 쿼리를 어떻게 실행합니까? 예를 들어코드의 프롤로그 쿼리
는 : 사람 (X, Y) :
person(abe,instructor).
person(bob,student).
person(cindy,student).
person(david,student).
person(abe,student).
% Like this, but this does not work
% :- person(X,Y).
프로그램을로드 한 후에, 나는 다음과 같은 쿼리를 실행할 수 있습니다. 여기
X = abe,
Y = instructor ;
X = bob,
Y = student ;
X = cindy,
Y = student ;
X = david,
Y = student ;
X = abe,
Y = student.